Documente Academic
Documente Profesional
Documente Cultură
With digital signatures getting a nod in many countries, a lot of organizations are looking up to digital
signatures to save the time spent on a redundant task such as, signing the hard copy. By using digital
signatures, a soft copy can be digitally signed and secured.
I have used, ABAP to design the form. The reason of using SFP transaction is, easier integration of
form and interface with various other platforms, that is not easily ans seamlessly possible with WD
JAVA.
The following steps need to be verified by the basis team for digital signature to be active in the
system.
2. Create connection between ADS (Adobe Document Services) and R/3 system – It is recommended
to name the connection, “ADS_HTTPS”
The following steps will create an Adobe for with digital signature.
Go to transaction SFP
Give the interface, you want to design, a name. The interface is that part, in which we write the
logic for pulling data from the tables. Click on create.
Maintain the data to be used in the form under Global Data. Both input and output elements can be
used here. We need to define the name and the type.
Go to Code initialization. Here we write the logic of extracting the data from the tables. Here we need
to define the Input & Output parameters. The Input / Output parameters are the ones, defined in
Global Data. Here we don’t need to define the Type.
Note: The name used in The Input / Output parameters should be the same that is used in
Global Data.
Once the code is written in the interface, save it and go back to Form (Transaction SFP)
In the form properties, provide the name of the interface which the form will call.
In the context, bind the global data with the form context. This can be done by simple drag and drop.
Design the form and bind the UIs with the data available in the data view.
We’ll have to define the HTTP Connection, the position of the Digital Signature UI and the
name of the digital signature in the form.
Following is the code that we need to write to define the above mentioned fields.
Following is the code that needs to be written for digitally signing the form.
FORM_NAME = ‘ZMM_V2V_RATE’.
S_ALSIGN = ‘Umang_Test’.
GS_FPOUTPARAMS–NODIALOG = ‘X’.
GS_FPDOCPARAMS–FILLABLE = ‘X’.
CALL FUNCTION ‘FP_JOB_OPEN’
CHANGING
IE_OUTPUTPARAMS = GS_FPOUTPARAMS
EXCEPTIONS
CANCEL =1
USAGE_ERROR =2
SYSTEM_ERROR =3
INTERNAL_ERROR =4
OTHERS = 5.
IF SY–SUBRC <> 0.
ENDIF.
TRY.
CALL FUNCTION ‘FP_FUNCTION_MODULE_NAME’
EXPORTING
I_NAME = FORM_NAME
IMPORTING
E_FUNCNAME = GV_FMNAME.
CATCH CX_ROOT INTO LV_W_CX_ROOT.
LV_MESG = LV_W_CX_ROOT->GET_TEXT( ).
ENDTRY.
CLEAR: FORMOUTPUT.
CLEAR: L_OUT.
CALL METHOD L_PDFOBJ->EXECUTE( ).
L_PDFOBJ->SET_USAGERIGHTS( DEFAULT_RIGHTS = C_FALSE ).
CALL METHOD L_PDFOBJ->GET_DOCUMENT
IMPORTING
PDFDATA = L_OUT.
* ENDLOOP.
Some times the Image you get is Black but it might not be the mistake at SAP end
while sending the time the background in getting black from UI end.
Its better or advised to save the data in the Z table and then it can be retrieved. You
can create the a field OF DATA TYPE RAWSTRING.
Below example sign field is created with datatype RAWSTRING using predefined
type.
*”———————————————————————-
*”*”Local Interface:
*” IMPORTING
*” REFERENCE(IV_INPUT) TYPE STRING OPTIONAL
*” REFERENCE(IV_NAME) TYPE STXBITMAPS-TDNAME OPTIONAL
*” REFERENCE(IV_DEL) TYPE CHAR01 OPTIONAL
*” EXPORTING
*” REFERENCE(EV_RETURN) TYPE CHAR01
*”———————————————————————-
DATA:
lo_conv_x2c TYPE REF TO cl_abap_conv_in_ce,
base64_string TYPE string,
base64_xstring TYPE xstring,
lv_size TYPE i,
lt_content TYPE TABLE OF lty_bitmap, ” sdokcntbin.
ls_dsign TYPE zfcs_sign_update.
lo_conv_x2c = cl_abap_conv_in_ce=>create( ).
ENDIF.
ENDIF. “Check no error
ENDFUNCTION.