SAP Function Modules

SSF_KRN_DIGEST SAP Function module







SSF_KRN_DIGEST 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 SSF_KRN_DIGEST into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM SSF_KRN_DIGEST - SSF KRN DIGEST





CALL FUNCTION 'SSF_KRN_DIGEST' "
  EXPORTING
*   ssftoolkit = ' '            " ssfparms-ssftoolkit
*   str_format = 'PKCS7'        " ssfparms-ssfformat
*   b_detached = ' '            " ssfparms-bdetached
*   b_inenc = 'X'               " ssfparms-binenc
*   io_spec = 'T'               " ssfparms-iospec
    ostr_input_data_l =         " ssfparms-indatalen
*   str_hashalg =               " ssfparms-ssfhashalg
  IMPORTING
    ostr_digested_data_l =      " ssfparms-digdatalen
    crc =                       " ssfparms-ssfcrc  SSF Return code
  TABLES
    ostr_input_data =           "
    ostr_digested_data =        " ssfbin
  EXCEPTIONS
    SSF_KRN_ERROR = 1           "
    SSF_KRN_NOOP = 2            "
    SSF_KRN_NOMEMORY = 3        "               Main Memory Not Sufficient
    SSF_KRN_OPINV = 4           "
    SSF_KRN_NOSSFLIB = 5        "
    SSF_KRN_INPUT_DATA_ERROR = 6  "
    SSF_KRN_INVALID_PAR = 7     "               An SSF Parameter is Erroneous
    SSF_KRN_INVALID_PARLEN = 8  "               Length of an SSF Parameter is Erroneous
    SSF_FB_INPUT_PARAMETER_ERROR = 9  "
    .  "  SSF_KRN_DIGEST

ABAP code example for Function Module SSF_KRN_DIGEST





The ABAP code below is a full code listing to execute function module SSF_KRN_DIGEST 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_ostr_digested_data_l  TYPE SSFPARMS-DIGDATALEN ,
ld_crc  TYPE SSFPARMS-SSFCRC ,
it_ostr_input_data  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_ostr_input_data  LIKE LINE OF it_ostr_input_data ,
it_ostr_digested_data  TYPE STANDARD TABLE OF SSFBIN,"TABLES PARAM
wa_ostr_digested_data  LIKE LINE OF it_ostr_digested_data .


DATA(ld_ssftoolkit) = some text here

DATA(ld_str_format) = some text here

DATA(ld_b_detached) = some text here

DATA(ld_b_inenc) = some text here

DATA(ld_io_spec) = some text here

DATA(ld_ostr_input_data_l) = 123

DATA(ld_str_hashalg) = some text here

"populate fields of struture and append to itab
append wa_ostr_input_data to it_ostr_input_data.

"populate fields of struture and append to itab
append wa_ostr_digested_data to it_ostr_digested_data. . CALL FUNCTION 'SSF_KRN_DIGEST' EXPORTING * ssftoolkit = ld_ssftoolkit * str_format = ld_str_format * b_detached = ld_b_detached * b_inenc = ld_b_inenc * io_spec = ld_io_spec ostr_input_data_l = ld_ostr_input_data_l * str_hashalg = ld_str_hashalg IMPORTING ostr_digested_data_l = ld_ostr_digested_data_l crc = ld_crc TABLES ostr_input_data = it_ostr_input_data ostr_digested_data = it_ostr_digested_data EXCEPTIONS SSF_KRN_ERROR = 1 SSF_KRN_NOOP = 2 SSF_KRN_NOMEMORY = 3 SSF_KRN_OPINV = 4 SSF_KRN_NOSSFLIB = 5 SSF_KRN_INPUT_DATA_ERROR = 6 SSF_KRN_INVALID_PAR = 7 SSF_KRN_INVALID_PARLEN = 8 SSF_FB_INPUT_PARAMETER_ERROR = 9 . " SSF_KRN_DIGEST
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 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_ostr_digested_data_l  TYPE SSFPARMS-DIGDATALEN ,
ld_ssftoolkit  TYPE SSFPARMS-SSFTOOLKIT ,
it_ostr_input_data  TYPE STANDARD TABLE OF STRING ,
wa_ostr_input_data  LIKE LINE OF it_ostr_input_data,
ld_crc  TYPE SSFPARMS-SSFCRC ,
ld_str_format  TYPE SSFPARMS-SSFFORMAT ,
it_ostr_digested_data  TYPE STANDARD TABLE OF SSFBIN ,
wa_ostr_digested_data  LIKE LINE OF it_ostr_digested_data,
ld_b_detached  TYPE SSFPARMS-BDETACHED ,
ld_b_inenc  TYPE SSFPARMS-BINENC ,
ld_io_spec  TYPE SSFPARMS-IOSPEC ,
ld_ostr_input_data_l  TYPE SSFPARMS-INDATALEN ,
ld_str_hashalg  TYPE SSFPARMS-SSFHASHALG .


ld_ssftoolkit = some text here

"populate fields of struture and append to itab
append wa_ostr_input_data to it_ostr_input_data.

ld_str_format = some text here

"populate fields of struture and append to itab
append wa_ostr_digested_data to it_ostr_digested_data.

ld_b_detached = some text here

ld_b_inenc = some text here

ld_io_spec = some text here

ld_ostr_input_data_l = 123

ld_str_hashalg = some text here

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 SSF_KRN_DIGEST or its description.