SAP GTIN_MAPPING_SELECTION Function Module for Material substitution









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

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



Function GTIN_MAPPING_SELECTION 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 'GTIN_MAPPING_SELECTION'"Material substitution
EXPORTING
* I_APPLICATION = 'VG' "Application
I_DATE = "Date for product listing/exclusion
* I_DIALOG = 'X' "Bring dialog
I_HEADER_COMMUNICATION = "Fields of document header
I_ITEM_COMMUNICATION = "Fields of item header
I_SCHEME = "Plan ( product listing or exclusio
* I_PROTOCOL = ' ' "

IMPORTING
E_SMATN = "Material Number

TABLES
* KONDD_DATA = "Data for the calling program
.



IMPORTING Parameters details for GTIN_MAPPING_SELECTION

I_APPLICATION - Application

Data type: T683-KAPPL
Default: 'VG'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_DATE - Date for product listing/exclusion

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

I_DIALOG - Bring dialog

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

I_HEADER_COMMUNICATION - Fields of document header

Data type: KOMKD
Optional: No
Call by Reference: Yes

I_ITEM_COMMUNICATION - Fields of item header

Data type: KOMPD
Optional: No
Call by Reference: Yes

I_SCHEME - Plan ( product listing or exclusio

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

I_PROTOCOL -

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

EXPORTING Parameters details for GTIN_MAPPING_SELECTION

E_SMATN - Material Number

Data type: MATNR
Optional: No
Call by Reference: Yes

TABLES Parameters details for GTIN_MAPPING_SELECTION

KONDD_DATA - Data for the calling program

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

Copy and paste ABAP code example for GTIN_MAPPING_SELECTION 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_e_smatn  TYPE MATNR, "   
lt_kondd_data  TYPE STANDARD TABLE OF KONDD, "   
lv_i_application  TYPE T683-KAPPL, "   'VG'
lv_i_date  TYPE SY-DATUM, "   
lv_i_dialog  TYPE SY, "   'X'
lv_i_header_communication  TYPE KOMKD, "   
lv_i_item_communication  TYPE KOMPD, "   
lv_i_scheme  TYPE T683-KALSM, "   
lv_i_protocol  TYPE T683. "   ' '

  CALL FUNCTION 'GTIN_MAPPING_SELECTION'  "Material substitution
    EXPORTING
         I_APPLICATION = lv_i_application
         I_DATE = lv_i_date
         I_DIALOG = lv_i_dialog
         I_HEADER_COMMUNICATION = lv_i_header_communication
         I_ITEM_COMMUNICATION = lv_i_item_communication
         I_SCHEME = lv_i_scheme
         I_PROTOCOL = lv_i_protocol
    IMPORTING
         E_SMATN = lv_e_smatn
    TABLES
         KONDD_DATA = lt_kondd_data
. " GTIN_MAPPING_SELECTION




ABAP code using 7.40 inline data declarations to call FM GTIN_MAPPING_SELECTION

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 KAPPL FROM T683 INTO @DATA(ld_i_application).
DATA(ld_i_application) = 'VG'.
 
"SELECT single DATUM FROM SY INTO @DATA(ld_i_date).
 
DATA(ld_i_dialog) = 'X'.
 
 
 
"SELECT single KALSM FROM T683 INTO @DATA(ld_i_scheme).
 
DATA(ld_i_protocol) = ' '.
 


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!