SAP Function Modules

GRFN_CY_API_AUD SAP Function module - Audit Log report







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

Associated Function Group: GRFN_CY_API
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM GRFN_CY_API_AUD - GRFN CY API AUD





CALL FUNCTION 'GRFN_CY_API_AUD' "Audit Log report
  EXPORTING
    is_selection =              " grfn_s_rep_selection_alog  Selection data for Audit Log Report
  IMPORTING
    e_return_code =             " int4          Natural number
    es_navigation =             " grfn_s_cy_navigation  Navigation details
  TABLES
    et_result =                 " grfn_s_cy_aud  Audit Log Report
    et_to_hide =                " grfn_s_cy_field  Field for CR
*   et_message =                " bapiret2      Error Messages
    .  "  GRFN_CY_API_AUD

ABAP code example for Function Module GRFN_CY_API_AUD





The ABAP code below is a full code listing to execute function module GRFN_CY_API_AUD 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_return_code  TYPE INT4 ,
ld_es_navigation  TYPE GRFN_S_CY_NAVIGATION ,
it_et_result  TYPE STANDARD TABLE OF GRFN_S_CY_AUD,"TABLES PARAM
wa_et_result  LIKE LINE OF it_et_result ,
it_et_to_hide  TYPE STANDARD TABLE OF GRFN_S_CY_FIELD,"TABLES PARAM
wa_et_to_hide  LIKE LINE OF it_et_to_hide ,
it_et_message  TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM
wa_et_message  LIKE LINE OF it_et_message .

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

"populate fields of struture and append to itab
append wa_et_result to it_et_result.

"populate fields of struture and append to itab
append wa_et_to_hide to it_et_to_hide.

"populate fields of struture and append to itab
append wa_et_message to it_et_message. . CALL FUNCTION 'GRFN_CY_API_AUD' EXPORTING is_selection = ld_is_selection IMPORTING e_return_code = ld_e_return_code es_navigation = ld_es_navigation TABLES et_result = it_et_result et_to_hide = it_et_to_hide * et_message = it_et_message . " GRFN_CY_API_AUD
IF SY-SUBRC EQ 0. "All OK 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_return_code  TYPE INT4 ,
ld_is_selection  TYPE GRFN_S_REP_SELECTION_ALOG ,
it_et_result  TYPE STANDARD TABLE OF GRFN_S_CY_AUD ,
wa_et_result  LIKE LINE OF it_et_result,
ld_es_navigation  TYPE GRFN_S_CY_NAVIGATION ,
it_et_to_hide  TYPE STANDARD TABLE OF GRFN_S_CY_FIELD ,
wa_et_to_hide  LIKE LINE OF it_et_to_hide,
it_et_message  TYPE STANDARD TABLE OF BAPIRET2 ,
wa_et_message  LIKE LINE OF it_et_message.

ld_is_selection = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_et_result to it_et_result.

"populate fields of struture and append to itab
append wa_et_to_hide to it_et_to_hide.

"populate fields of struture and append to itab
append wa_et_message to it_et_message.

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