SAP GM_GET_SPONSORED_PROGRAMS Function Module for Lookup sponsored programs









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

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



Function GM_GET_SPONSORED_PROGRAMS 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 'GM_GET_SPONSORED_PROGRAMS'"Lookup sponsored programs
EXPORTING
* I_SEL_TWHERE = "Dynamic selection where clause
* I_P_RESPONSIBILITY = "Type of responsibility within the grant
* I_P_RESP_OBJ_TYPE = "HR planning object
* I_P_RESP_OBJ_ID = "HR planning object ID of resource
* I_SPONSORED_PROG_GRPNAME = "Sponsored Program Set Groupname

TABLES
* I_R_SPONSORED_PROG = "Range for sponsored program
* I_R_CREATED_ON = "Range for programs created on
* I_R_CHANGED_ON = "Range for programs changed on
* I_R_PROGRAM_SEARCH = "Range for search text
* I_R_GRANT_NBR = "Range for all grants numbers
* E_T_GMSPPROGRAM = "Sponsored program master
* E_T_SPONSORED_PROG = "Sponsored program master index

EXCEPTIONS
NOT_FOUND = 1
.



IMPORTING Parameters details for GM_GET_SPONSORED_PROGRAMS

I_SEL_TWHERE - Dynamic selection where clause

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

I_P_RESPONSIBILITY - Type of responsibility within the grant

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

I_P_RESP_OBJ_TYPE - HR planning object

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

I_P_RESP_OBJ_ID - HR planning object ID of resource

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

I_SPONSORED_PROG_GRPNAME - Sponsored Program Set Groupname

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

TABLES Parameters details for GM_GET_SPONSORED_PROGRAMS

I_R_SPONSORED_PROG - Range for sponsored program

Data type:
Optional: Yes
Call by Reference: Yes

I_R_CREATED_ON - Range for programs created on

Data type:
Optional: Yes
Call by Reference: Yes

I_R_CHANGED_ON - Range for programs changed on

Data type:
Optional: Yes
Call by Reference: Yes

I_R_PROGRAM_SEARCH - Range for search text

Data type:
Optional: Yes
Call by Reference: Yes

I_R_GRANT_NBR - Range for all grants numbers

Data type:
Optional: Yes
Call by Reference: Yes

E_T_GMSPPROGRAM - Sponsored program master

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

E_T_SPONSORED_PROG - Sponsored program master index

Data type:
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

NOT_FOUND -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for GM_GET_SPONSORED_PROGRAMS 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_not_found  TYPE STRING, "   
lv_i_sel_twhere  TYPE RSDS_TWHERE, "   
lt_i_r_sponsored_prog  TYPE STANDARD TABLE OF RSDS_TWHERE, "   
lt_i_r_created_on  TYPE STANDARD TABLE OF RSDS_TWHERE, "   
lv_i_p_responsibility  TYPE GMSPRESPONSIBLE-RESPONSIBILITY, "   
lt_i_r_changed_on  TYPE STANDARD TABLE OF GMSPRESPONSIBLE, "   
lv_i_p_resp_obj_type  TYPE GMSPRESPONSIBLE-OBJECT_TYPE, "   
lv_i_p_resp_obj_id  TYPE GMSPRESPONSIBLE-OBJECT_ID, "   
lt_i_r_program_search  TYPE STANDARD TABLE OF GMSPRESPONSIBLE, "   
lt_i_r_grant_nbr  TYPE STANDARD TABLE OF GMSPRESPONSIBLE, "   
lv_i_sponsored_prog_grpname  TYPE GRPNAME, "   
lt_e_t_gmspprogram  TYPE STANDARD TABLE OF GMSPPROGRAM, "   
lt_e_t_sponsored_prog  TYPE STANDARD TABLE OF GMSPPROGRAM. "   

  CALL FUNCTION 'GM_GET_SPONSORED_PROGRAMS'  "Lookup sponsored programs
    EXPORTING
         I_SEL_TWHERE = lv_i_sel_twhere
         I_P_RESPONSIBILITY = lv_i_p_responsibility
         I_P_RESP_OBJ_TYPE = lv_i_p_resp_obj_type
         I_P_RESP_OBJ_ID = lv_i_p_resp_obj_id
         I_SPONSORED_PROG_GRPNAME = lv_i_sponsored_prog_grpname
    TABLES
         I_R_SPONSORED_PROG = lt_i_r_sponsored_prog
         I_R_CREATED_ON = lt_i_r_created_on
         I_R_CHANGED_ON = lt_i_r_changed_on
         I_R_PROGRAM_SEARCH = lt_i_r_program_search
         I_R_GRANT_NBR = lt_i_r_grant_nbr
         E_T_GMSPPROGRAM = lt_e_t_gmspprogram
         E_T_SPONSORED_PROG = lt_e_t_sponsored_prog
    EXCEPTIONS
        NOT_FOUND = 1
. " GM_GET_SPONSORED_PROGRAMS




ABAP code using 7.40 inline data declarations to call FM GM_GET_SPONSORED_PROGRAMS

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 RESPONSIBILITY FROM GMSPRESPONSIBLE INTO @DATA(ld_i_p_responsibility).
 
 
"SELECT single OBJECT_TYPE FROM GMSPRESPONSIBLE INTO @DATA(ld_i_p_resp_obj_type).
 
"SELECT single OBJECT_ID FROM GMSPRESPONSIBLE INTO @DATA(ld_i_p_resp_obj_id).
 
 
 
 
 
 


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!