SAP GET_HMAC_KEY Function Module for









GET_HMAC_KEY is a standard get hmac key SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for get hmac key FM, simply by entering the name GET_HMAC_KEY into the relevant SAP transaction such as SE37 or SE38.

Function Group: SECH
Program Name: SAPLSECH
Main Program: SAPLSECH
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function GET_HMAC_KEY pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'GET_HMAC_KEY'"
EXPORTING
CLIENT_INDEPENDENT = "
* RECORD_NUMBER = '00' "

IMPORTING
KEYXSTR = "
KEYXLEN = "

EXCEPTIONS
PARAM_LENGTH_ERROR = 1 RSEC_ERROR = 10 RECORD_NUMBER_ERROR = 11 RSEC_SYSTEM_DATA_CHANGED = 12 RSEC_SYSTEM_DATA_CHANGED_SID = 13 INTERNAL_ERROR = 2 PARAM_MISSING = 3 MALLOC_ERROR = 4 ABAP_CALLER_ERROR = 5 BASE64_ERROR = 6 RSEC_RECORD_NOT_FOUND = 7 RSEC_RECORD_ACCESS_DENIED = 8 RSEC_SECSTORE_ACCESS_DENIED = 9
.



IMPORTING Parameters details for GET_HMAC_KEY

CLIENT_INDEPENDENT -

Data type: RSECCLINDEP
Optional: No
Call by Reference: Yes

RECORD_NUMBER -

Data type: NUMC2
Default: '00'
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for GET_HMAC_KEY

KEYXSTR -

Data type: XSTRING
Optional: No
Call by Reference: No ( called with pass by value option)

KEYXLEN -

Data type: I
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

PARAM_LENGTH_ERROR -

Data type:
Optional: No
Call by Reference: Yes

RSEC_ERROR -

Data type:
Optional: No
Call by Reference: Yes

RECORD_NUMBER_ERROR -

Data type:
Optional: No
Call by Reference: Yes

RSEC_SYSTEM_DATA_CHANGED -

Data type:
Optional: No
Call by Reference: Yes

RSEC_SYSTEM_DATA_CHANGED_SID -

Data type:
Optional: No
Call by Reference: Yes

INTERNAL_ERROR -

Data type:
Optional: No
Call by Reference: Yes

PARAM_MISSING -

Data type:
Optional: No
Call by Reference: Yes

MALLOC_ERROR -

Data type:
Optional: No
Call by Reference: Yes

ABAP_CALLER_ERROR -

Data type:
Optional: No
Call by Reference: Yes

BASE64_ERROR -

Data type:
Optional: No
Call by Reference: Yes

RSEC_RECORD_NOT_FOUND -

Data type:
Optional: No
Call by Reference: Yes

RSEC_RECORD_ACCESS_DENIED -

Data type:
Optional: No
Call by Reference: Yes

RSEC_SECSTORE_ACCESS_DENIED -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for GET_HMAC_KEY Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lv_keyxstr  TYPE XSTRING, "   
lv_client_independent  TYPE RSECCLINDEP, "   
lv_param_length_error  TYPE RSECCLINDEP, "   
lv_rsec_error  TYPE RSECCLINDEP, "   
lv_record_number_error  TYPE RSECCLINDEP, "   
lv_rsec_system_data_changed  TYPE RSECCLINDEP, "   
lv_rsec_system_data_changed_sid  TYPE RSECCLINDEP, "   
lv_keyxlen  TYPE I, "   
lv_record_number  TYPE NUMC2, "   '00'
lv_internal_error  TYPE NUMC2, "   
lv_param_missing  TYPE NUMC2, "   
lv_malloc_error  TYPE NUMC2, "   
lv_abap_caller_error  TYPE NUMC2, "   
lv_base64_error  TYPE NUMC2, "   
lv_rsec_record_not_found  TYPE NUMC2, "   
lv_rsec_record_access_denied  TYPE NUMC2, "   
lv_rsec_secstore_access_denied  TYPE NUMC2. "   

  CALL FUNCTION 'GET_HMAC_KEY'  "
    EXPORTING
         CLIENT_INDEPENDENT = lv_client_independent
         RECORD_NUMBER = lv_record_number
    IMPORTING
         KEYXSTR = lv_keyxstr
         KEYXLEN = lv_keyxlen
    EXCEPTIONS
        PARAM_LENGTH_ERROR = 1
        RSEC_ERROR = 10
        RECORD_NUMBER_ERROR = 11
        RSEC_SYSTEM_DATA_CHANGED = 12
        RSEC_SYSTEM_DATA_CHANGED_SID = 13
        INTERNAL_ERROR = 2
        PARAM_MISSING = 3
        MALLOC_ERROR = 4
        ABAP_CALLER_ERROR = 5
        BASE64_ERROR = 6
        RSEC_RECORD_NOT_FOUND = 7
        RSEC_RECORD_ACCESS_DENIED = 8
        RSEC_SECSTORE_ACCESS_DENIED = 9
. " GET_HMAC_KEY




ABAP code using 7.40 inline data declarations to call FM GET_HMAC_KEY

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
 
 
 
 
 
 
 
DATA(ld_record_number) = '00'.
 
 
 
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!