SAP SGRC_ADD_CALLBACK Function Module for Create a callback routine









SGRC_ADD_CALLBACK is a standard sgrc add callback SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Create a callback routine 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 sgrc add callback FM, simply by entering the name SGRC_ADD_CALLBACK into the relevant SAP transaction such as SE37 or SE38.

Function Group: SGRC
Program Name: SAPLSGRC
Main Program:
Appliation area: S
Release date: 21-Oct-1997
Mode(Normal, Remote etc): Normal Function Module
Update:



Function SGRC_ADD_CALLBACK 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 'SGRC_ADD_CALLBACK'"Create a callback routine
EXPORTING
CALL_BACK_FORM = "Form routine
CALL_BACK_PROG = "Form routine module pool
* PBO = "Indicator: Call form routine for PBO
* PAI = "Indicator: Call form routine for PAI
* PAI_INTEREST = "Interest in PAI
WINID = "Window identification
* CONTROL_HANDLE = "Control handle
.



IMPORTING Parameters details for SGRC_ADD_CALLBACK

CALL_BACK_FORM - Form routine

Data type: RSEUR-TDCOMPONT
Optional: No
Call by Reference: No ( called with pass by value option)

CALL_BACK_PROG - Form routine module pool

Data type: RS38M-PROGRAMM
Optional: No
Call by Reference: No ( called with pass by value option)

PBO - Indicator: Call form routine for PBO

Data type: NET_GRAPH-PBO_PAI
Optional: Yes
Call by Reference: No ( called with pass by value option)

PAI - Indicator: Call form routine for PAI

Data type: NET_GRAPH-PBO_PAI
Optional: Yes
Call by Reference: No ( called with pass by value option)

PAI_INTEREST - Interest in PAI

Data type: NET_GRAPH-INTEREST
Optional: Yes
Call by Reference: No ( called with pass by value option)

WINID - Window identification

Data type: NET_GRAPH-WINID
Optional: No
Call by Reference: No ( called with pass by value option)

CONTROL_HANDLE - Control handle

Data type: CNTL_HANDLE
Optional: Yes
Call by Reference: Yes

Copy and paste ABAP code example for SGRC_ADD_CALLBACK 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_call_back_form  TYPE RSEUR-TDCOMPONT, "   
lv_call_back_prog  TYPE RS38M-PROGRAMM, "   
lv_pbo  TYPE NET_GRAPH-PBO_PAI, "   
lv_pai  TYPE NET_GRAPH-PBO_PAI, "   
lv_pai_interest  TYPE NET_GRAPH-INTEREST, "   
lv_winid  TYPE NET_GRAPH-WINID, "   
lv_control_handle  TYPE CNTL_HANDLE. "   

  CALL FUNCTION 'SGRC_ADD_CALLBACK'  "Create a callback routine
    EXPORTING
         CALL_BACK_FORM = lv_call_back_form
         CALL_BACK_PROG = lv_call_back_prog
         PBO = lv_pbo
         PAI = lv_pai
         PAI_INTEREST = lv_pai_interest
         WINID = lv_winid
         CONTROL_HANDLE = lv_control_handle
. " SGRC_ADD_CALLBACK




ABAP code using 7.40 inline data declarations to call FM SGRC_ADD_CALLBACK

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.

"SELECT single TDCOMPONT FROM RSEUR INTO @DATA(ld_call_back_form).
 
"SELECT single PROGRAMM FROM RS38M INTO @DATA(ld_call_back_prog).
 
"SELECT single PBO_PAI FROM NET_GRAPH INTO @DATA(ld_pbo).
 
"SELECT single PBO_PAI FROM NET_GRAPH INTO @DATA(ld_pai).
 
"SELECT single INTEREST FROM NET_GRAPH INTO @DATA(ld_pai_interest).
 
"SELECT single WINID FROM NET_GRAPH INTO @DATA(ld_winid).
 
 


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!