SAP Function Modules

AUTH_TRACE_CALC_HASH SAP Function module







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

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


Pattern for FM AUTH_TRACE_CALC_HASH - AUTH TRACE CALC HASH





CALL FUNCTION 'AUTH_TRACE_CALC_HASH' "
  EXPORTING
    pgmid =                     " usobhash-pgmid  Program ID in requests and tasks
    object =                    " usobhash-object  Object Type
    obj_name =                  " usobhash-obj_name  Object Name in Object Directory
    service_type =              " usobhash-service_type  Name of External Service
    service =                   " usobhash-service  Service: Transaction Started Externally
  IMPORTING
    hash_value =                " usobhash-name  Program, transaction or function module name
    hash_value_type =           " usobhash-type  Type of Check Flag and Authorization Default Values
  EXCEPTIONS
    HASH_ERROR = 1              "               Error in hash function
    HASH_INVALID_INPUT = 2      "
    HASH_TOO_LONG = 3           "
    .  "  AUTH_TRACE_CALC_HASH

ABAP code example for Function Module AUTH_TRACE_CALC_HASH





The ABAP code below is a full code listing to execute function module AUTH_TRACE_CALC_HASH 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_hash_value  TYPE USOBHASH-NAME ,
ld_hash_value_type  TYPE USOBHASH-TYPE .


SELECT single PGMID
FROM USOBHASH
INTO @DATA(ld_pgmid).


SELECT single OBJECT
FROM USOBHASH
INTO @DATA(ld_object).


SELECT single OBJ_NAME
FROM USOBHASH
INTO @DATA(ld_obj_name).


SELECT single SERVICE_TYPE
FROM USOBHASH
INTO @DATA(ld_service_type).


SELECT single SERVICE
FROM USOBHASH
INTO @DATA(ld_service).
. CALL FUNCTION 'AUTH_TRACE_CALC_HASH' EXPORTING pgmid = ld_pgmid object = ld_object obj_name = ld_obj_name service_type = ld_service_type service = ld_service IMPORTING hash_value = ld_hash_value hash_value_type = ld_hash_value_type EXCEPTIONS HASH_ERROR = 1 HASH_INVALID_INPUT = 2 HASH_TOO_LONG = 3 . " AUTH_TRACE_CALC_HASH
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 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_hash_value  TYPE USOBHASH-NAME ,
ld_pgmid  TYPE USOBHASH-PGMID ,
ld_hash_value_type  TYPE USOBHASH-TYPE ,
ld_object  TYPE USOBHASH-OBJECT ,
ld_obj_name  TYPE USOBHASH-OBJ_NAME ,
ld_service_type  TYPE USOBHASH-SERVICE_TYPE ,
ld_service  TYPE USOBHASH-SERVICE .


SELECT single PGMID
FROM USOBHASH
INTO ld_pgmid.


SELECT single OBJECT
FROM USOBHASH
INTO ld_object.


SELECT single OBJ_NAME
FROM USOBHASH
INTO ld_obj_name.


SELECT single SERVICE_TYPE
FROM USOBHASH
INTO ld_service_type.


SELECT single SERVICE
FROM USOBHASH
INTO ld_service.

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