SAP GRFN_CY_API_ACTIVITY Function Module for Get the list of Activity
GRFN_CY_API_ACTIVITY is a standard grfn cy api activity SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Get the list of Activity processing and below is the pattern details for this FM, 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 grfn cy api activity FM, simply by entering the name GRFN_CY_API_ACTIVITY into the relevant SAP transaction such as SE37 or SE38.
Function Group: GRFN_CY_API
Program Name: SAPLGRFN_CY_API
Main Program: SAPLGRFN_CY_API
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:
Function GRFN_CY_API_ACTIVITY 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 'GRFN_CY_API_ACTIVITY'"Get the list of Activity.
EXPORTING
* I_AC = "Activity ID
* I_OU = "Organization ID
* I_PATTERN = "API search pattern
IMPORTING
E_RETURN_CODE = "Natural number
TABLES
ET_MESSAGE = "Error Messages
ET_AC = "Activity Data for Reporting
IMPORTING Parameters details for GRFN_CY_API_ACTIVITY
I_AC - Activity ID
Data type: GRRM_REP_ACTVT_IDOptional: Yes
Call by Reference: No ( called with pass by value option)
I_OU - Organization ID
Data type: GRFN_REP_ORGUNIT_IDOptional: Yes
Call by Reference: No ( called with pass by value option)
I_PATTERN - API search pattern
Data type: GRFN_API_SEARCH_PATTERNOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for GRFN_CY_API_ACTIVITY
E_RETURN_CODE - Natural number
Data type: INT4Optional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for GRFN_CY_API_ACTIVITY
ET_MESSAGE - Error Messages
Data type: BAPIRET2Optional: No
Call by Reference: Yes
ET_AC - Activity Data for Reporting
Data type: GRFN_S_CY_ACTIVITYOptional: No
Call by Reference: Yes
Copy and paste ABAP code example for GRFN_CY_API_ACTIVITY 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_i_ac | TYPE GRRM_REP_ACTVT_ID, " | |||
lt_et_message | TYPE STANDARD TABLE OF BAPIRET2, " | |||
lv_e_return_code | TYPE INT4, " | |||
lv_i_ou | TYPE GRFN_REP_ORGUNIT_ID, " | |||
lt_et_ac | TYPE STANDARD TABLE OF GRFN_S_CY_ACTIVITY, " | |||
lv_i_pattern | TYPE GRFN_API_SEARCH_PATTERN. " |
  CALL FUNCTION 'GRFN_CY_API_ACTIVITY' "Get the list of Activity |
EXPORTING | ||
I_AC | = lv_i_ac | |
I_OU | = lv_i_ou | |
I_PATTERN | = lv_i_pattern | |
IMPORTING | ||
E_RETURN_CODE | = lv_e_return_code | |
TABLES | ||
ET_MESSAGE | = lt_et_message | |
ET_AC | = lt_et_ac | |
. " GRFN_CY_API_ACTIVITY |
ABAP code using 7.40 inline data declarations to call FM GRFN_CY_API_ACTIVITY
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.Search for further information about these or an SAP related objects