SAP GM_GET_SPONSOR_DATA Function Module for Get Sponsor Data
GM_GET_SPONSOR_DATA is a standard gm get sponsor data 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 Sponsor Data 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 sponsor data FM, simply by entering the name GM_GET_SPONSOR_DATA into the relevant SAP transaction such as SE37 or SE38.
Function Group: GMSP
Program Name: SAPLGMSP
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function GM_GET_SPONSOR_DATA 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_SPONSOR_DATA'"Get Sponsor Data.
EXPORTING
I_PARTNER = "Business partner number
* I_DEFAULTS_ONLY = "Only import defaulted values to/from Grant
IMPORTING
E_GMSPONSOR = "Sponsor Master
E_KUNNR = "Customer number
E_F_BUT000 = "BP: General sponsor data
E_SPONSOR_DESCRIPTION = "Sponsor name
TABLES
* T_GMASPPROG = "Allowed Sponsored Programs for Sponsor
* T_GMASPCLASS = "Allowed Sponsored Classes for Sponsor
* T_GMSPAGT = "Allowed Grant Types for Sponsor
* T_GMSPONSORLOC = "Letter of Credit References
* T_GMSPRESPTYP = "Responsibility Defaults for Sponsor
* T_GMASPREPORT = "Report tracking records
EXCEPTIONS
PARTNER_NOT_FOUND = 1 NO_CUSTOMER_LINK = 2
IMPORTING Parameters details for GM_GET_SPONSOR_DATA
I_PARTNER - Business partner number
Data type: GMSPONSOR-PARTNEROptional: No
Call by Reference: Yes
I_DEFAULTS_ONLY - Only import defaulted values to/from Grant
Data type: XFELDOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for GM_GET_SPONSOR_DATA
E_GMSPONSOR - Sponsor Master
Data type: GMSPONSOROptional: No
Call by Reference: Yes
E_KUNNR - Customer number
Data type: KNA1-KUNNROptional: No
Call by Reference: Yes
E_F_BUT000 - BP: General sponsor data
Data type: BUT000Optional: No
Call by Reference: Yes
E_SPONSOR_DESCRIPTION - Sponsor name
Data type: BUT000-NAME1_TEXTOptional: No
Call by Reference: Yes
TABLES Parameters details for GM_GET_SPONSOR_DATA
T_GMASPPROG - Allowed Sponsored Programs for Sponsor
Data type: GMASPPROGOptional: Yes
Call by Reference: No ( called with pass by value option)
T_GMASPCLASS - Allowed Sponsored Classes for Sponsor
Data type: GMASPCLASSOptional: Yes
Call by Reference: No ( called with pass by value option)
T_GMSPAGT - Allowed Grant Types for Sponsor
Data type: GMSPAGTOptional: Yes
Call by Reference: No ( called with pass by value option)
T_GMSPONSORLOC - Letter of Credit References
Data type: GMSPONSORLOCOptional: Yes
Call by Reference: Yes
T_GMSPRESPTYP - Responsibility Defaults for Sponsor
Data type: GMSPRESPTYPOptional: Yes
Call by Reference: Yes
T_GMASPREPORT - Report tracking records
Data type: GMASPREPORTOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
PARTNER_NOT_FOUND - Partner not found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_CUSTOMER_LINK - No link exists between partner and customer
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for GM_GET_SPONSOR_DATA 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_partner | TYPE GMSPONSOR-PARTNER, " | |||
lv_e_gmsponsor | TYPE GMSPONSOR, " | |||
lt_t_gmaspprog | TYPE STANDARD TABLE OF GMASPPROG, " | |||
lv_partner_not_found | TYPE GMASPPROG, " | |||
lv_e_kunnr | TYPE KNA1-KUNNR, " | |||
lt_t_gmaspclass | TYPE STANDARD TABLE OF GMASPCLASS, " | |||
lv_i_defaults_only | TYPE XFELD, " | |||
lv_no_customer_link | TYPE XFELD, " | |||
lt_t_gmspagt | TYPE STANDARD TABLE OF GMSPAGT, " | |||
lv_e_f_but000 | TYPE BUT000, " | |||
lt_t_gmsponsorloc | TYPE STANDARD TABLE OF GMSPONSORLOC, " | |||
lv_e_sponsor_description | TYPE BUT000-NAME1_TEXT, " | |||
lt_t_gmspresptyp | TYPE STANDARD TABLE OF GMSPRESPTYP, " | |||
lt_t_gmaspreport | TYPE STANDARD TABLE OF GMASPREPORT. " |
  CALL FUNCTION 'GM_GET_SPONSOR_DATA' "Get Sponsor Data |
EXPORTING | ||
I_PARTNER | = lv_i_partner | |
I_DEFAULTS_ONLY | = lv_i_defaults_only | |
IMPORTING | ||
E_GMSPONSOR | = lv_e_gmsponsor | |
E_KUNNR | = lv_e_kunnr | |
E_F_BUT000 | = lv_e_f_but000 | |
E_SPONSOR_DESCRIPTION | = lv_e_sponsor_description | |
TABLES | ||
T_GMASPPROG | = lt_t_gmaspprog | |
T_GMASPCLASS | = lt_t_gmaspclass | |
T_GMSPAGT | = lt_t_gmspagt | |
T_GMSPONSORLOC | = lt_t_gmsponsorloc | |
T_GMSPRESPTYP | = lt_t_gmspresptyp | |
T_GMASPREPORT | = lt_t_gmaspreport | |
EXCEPTIONS | ||
PARTNER_NOT_FOUND = 1 | ||
NO_CUSTOMER_LINK = 2 | ||
. " GM_GET_SPONSOR_DATA |
ABAP code using 7.40 inline data declarations to call FM GM_GET_SPONSOR_DATA
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 PARTNER FROM GMSPONSOR INTO @DATA(ld_i_partner). | ||||
"SELECT single KUNNR FROM KNA1 INTO @DATA(ld_e_kunnr). | ||||
"SELECT single NAME1_TEXT FROM BUT000 INTO @DATA(ld_e_sponsor_description). | ||||
Search for further information about these or an SAP related objects