SAP Function Modules

COPI_CHECK_SIGN_AUTHORIZATION SAP Function module







COPI_CHECK_SIGN_AUTHORIZATION is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name COPI_CHECK_SIGN_AUTHORIZATION into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: COPI
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM COPI_CHECK_SIGN_AUTHORIZATION - COPI CHECK SIGN AUTHORIZATION





CALL FUNCTION 'COPI_CHECK_SIGN_AUTHORIZATION' "
  EXPORTING
    i_message_id =              " rcomep-msid   Message to be processed
    i_werk =                    " cochp-werk    Plant for authorization check
    i_adres =                   " cochp-adres
*   i_elec_sign = SPACE         " c
*   i_phseq =                   " cochp-phseq
  IMPORTING
    e_sign_finished =           " c
    e_last_signer =             " c
    e_sign_strategy =           " tc85-signstrat
    e_sign_mode =               " c
  TABLES
    t_come =                    " rcomep        Message characteristics
    t_cofma =                   " rcofma        Process instruction/message allocation
    t_cofv =                    " rcofvp        Process instruction characteristics
    t_comh =                    " rcomhp
  EXCEPTIONS
    NO_SIGNATURE = 1            "               No signature in message
    NO_AUTHORIZATION = 2        "               No authorization to sign
    NO_IDENTIFICATION = 3       "               User could not be identified
    REFERENCE_ERROR = 4         "               Reference for process instruction not found
    ELEC_SIGN_ERROR = 5         "
    CANCELLED_BY_USER = 6       "
    NO_AUTHORITY_AUTH_GRP = 7   "
    DUPLICATE_SIGNATURE = 8     "
    SIGNING_PROCEDURE_CANCELLED = 9  "
    END_OF_SIGNING_PROCEDURE = 10  "
    .  "  COPI_CHECK_SIGN_AUTHORIZATION

ABAP code example for Function Module COPI_CHECK_SIGN_AUTHORIZATION





The ABAP code below is a full code listing to execute function module COPI_CHECK_SIGN_AUTHORIZATION including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

DATA:
ld_e_sign_finished  TYPE C ,
ld_e_last_signer  TYPE C ,
ld_e_sign_strategy  TYPE TC85-SIGNSTRAT ,
ld_e_sign_mode  TYPE C ,
it_t_come  TYPE STANDARD TABLE OF RCOMEP,"TABLES PARAM
wa_t_come  LIKE LINE OF it_t_come ,
it_t_cofma  TYPE STANDARD TABLE OF RCOFMA,"TABLES PARAM
wa_t_cofma  LIKE LINE OF it_t_cofma ,
it_t_cofv  TYPE STANDARD TABLE OF RCOFVP,"TABLES PARAM
wa_t_cofv  LIKE LINE OF it_t_cofv ,
it_t_comh  TYPE STANDARD TABLE OF RCOMHP,"TABLES PARAM
wa_t_comh  LIKE LINE OF it_t_comh .


DATA(ld_i_message_id) = Check type of data required

SELECT single WERK
FROM COCHP
INTO @DATA(ld_i_werk).


SELECT single ADRES
FROM COCHP
INTO @DATA(ld_i_adres).

DATA(ld_i_elec_sign) = 'Check type of data required'.

SELECT single PHSEQ
FROM COCHP
INTO @DATA(ld_i_phseq).


"populate fields of struture and append to itab
append wa_t_come to it_t_come.

"populate fields of struture and append to itab
append wa_t_cofma to it_t_cofma.

"populate fields of struture and append to itab
append wa_t_cofv to it_t_cofv.

"populate fields of struture and append to itab
append wa_t_comh to it_t_comh. . CALL FUNCTION 'COPI_CHECK_SIGN_AUTHORIZATION' EXPORTING i_message_id = ld_i_message_id i_werk = ld_i_werk i_adres = ld_i_adres * i_elec_sign = ld_i_elec_sign * i_phseq = ld_i_phseq IMPORTING e_sign_finished = ld_e_sign_finished e_last_signer = ld_e_last_signer e_sign_strategy = ld_e_sign_strategy e_sign_mode = ld_e_sign_mode TABLES t_come = it_t_come t_cofma = it_t_cofma t_cofv = it_t_cofv t_comh = it_t_comh EXCEPTIONS NO_SIGNATURE = 1 NO_AUTHORIZATION = 2 NO_IDENTIFICATION = 3 REFERENCE_ERROR = 4 ELEC_SIGN_ERROR = 5 CANCELLED_BY_USER = 6 NO_AUTHORITY_AUTH_GRP = 7 DUPLICATE_SIGNATURE = 8 SIGNING_PROCEDURE_CANCELLED = 9 END_OF_SIGNING_PROCEDURE = 10 . " COPI_CHECK_SIGN_AUTHORIZATION
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 7. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 8. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 9. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 10. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_e_sign_finished  TYPE C ,
ld_i_message_id  TYPE RCOMEP-MSID ,
it_t_come  TYPE STANDARD TABLE OF RCOMEP ,
wa_t_come  LIKE LINE OF it_t_come,
ld_e_last_signer  TYPE C ,
ld_i_werk  TYPE COCHP-WERK ,
it_t_cofma  TYPE STANDARD TABLE OF RCOFMA ,
wa_t_cofma  LIKE LINE OF it_t_cofma,
it_t_cofv  TYPE STANDARD TABLE OF RCOFVP ,
wa_t_cofv  LIKE LINE OF it_t_cofv,
ld_i_adres  TYPE COCHP-ADRES ,
ld_e_sign_strategy  TYPE TC85-SIGNSTRAT ,
ld_i_elec_sign  TYPE C ,
it_t_comh  TYPE STANDARD TABLE OF RCOMHP ,
wa_t_comh  LIKE LINE OF it_t_comh,
ld_e_sign_mode  TYPE C ,
ld_i_phseq  TYPE COCHP-PHSEQ .


ld_i_message_id = Check type of data required

"populate fields of struture and append to itab
append wa_t_come to it_t_come.

SELECT single WERK
FROM COCHP
INTO ld_i_werk.


"populate fields of struture and append to itab
append wa_t_cofma to it_t_cofma.

"populate fields of struture and append to itab
append wa_t_cofv to it_t_cofv.

SELECT single ADRES
FROM COCHP
INTO ld_i_adres.

ld_i_elec_sign = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_comh to it_t_comh.

SELECT single PHSEQ
FROM COCHP
INTO ld_i_phseq.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name COPI_CHECK_SIGN_AUTHORIZATION or its description.