SAP /AIF/UTIL_GET_BUFFER Function Module for Get targetstruct from smap buffer (or db)
/AIF/UTIL_GET_BUFFER is a standard /aif/util get buffer 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 targetstruct from smap buffer (or db) 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 /aif/util get buffer FM, simply by entering the name /AIF/UTIL_GET_BUFFER into the relevant SAP transaction such as SE37 or SE38.
Function Group: /AIF/UTIL
Program Name: /AIF/SAPLUTIL
Main Program: /AIF/SAPLUTIL
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function /AIF/UTIL_GET_BUFFER 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 '/AIF/UTIL_GET_BUFFER'"Get targetstruct from smap buffer (or db).
EXPORTING
* NS = "Namespace
* IFNAME = "Interface Name
* IFVERSION = "Interface Version
* IFACTION = "Action
* SMAPNR = "Number of Structure Mapping
* FIELDNAME = "Fieldname
* RECTYPE = "Source Structure
CHANGING
* TARGETSTRUCT = "Destination Structure
* MAINCOMPTYPE = "Main Recordtype
* TABNAME = "Table Name
* SRC_STRUCT_PATH = "Path of Source Structure
* DEST_STRUCT_PATH = "Path of Destination Structure
IMPORTING Parameters details for /AIF/UTIL_GET_BUFFER
NS - Namespace
Data type: /AIF/NSOptional: Yes
Call by Reference: Yes
IFNAME - Interface Name
Data type: /AIF/IFNAMEOptional: Yes
Call by Reference: Yes
IFVERSION - Interface Version
Data type: /AIF/IFVERSIONOptional: Yes
Call by Reference: Yes
IFACTION - Action
Data type: /AIF/IFACTIONOptional: Yes
Call by Reference: Yes
SMAPNR - Number of Structure Mapping
Data type: /AIF/SMAPNROptional: Yes
Call by Reference: Yes
FIELDNAME - Fieldname
Data type: /AIF/FIELDNAMEOptional: Yes
Call by Reference: Yes
RECTYPE - Source Structure
Data type: /AIF/RECTYPEOptional: Yes
Call by Reference: Yes
CHANGING Parameters details for /AIF/UTIL_GET_BUFFER
TARGETSTRUCT - Destination Structure
Data type: /AIF/TARGETSTRUCTOptional: Yes
Call by Reference: Yes
MAINCOMPTYPE - Main Recordtype
Data type: /AIF/MAINCOMPTYPEOptional: Yes
Call by Reference: Yes
TABNAME - Table Name
Data type: /AIF/TABNAMEOptional: Yes
Call by Reference: Yes
SRC_STRUCT_PATH - Path of Source Structure
Data type: /AIF/SOURCE_STRUCT_PATHOptional: Yes
Call by Reference: Yes
DEST_STRUCT_PATH - Path of Destination Structure
Data type: /AIF/DESTINATION_STRUCT_PATHOptional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for /AIF/UTIL_GET_BUFFER 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_ns | TYPE /AIF/NS, " | |||
| lv_targetstruct | TYPE /AIF/TARGETSTRUCT, " | |||
| lv_ifname | TYPE /AIF/IFNAME, " | |||
| lv_maincomptype | TYPE /AIF/MAINCOMPTYPE, " | |||
| lv_tabname | TYPE /AIF/TABNAME, " | |||
| lv_ifversion | TYPE /AIF/IFVERSION, " | |||
| lv_ifaction | TYPE /AIF/IFACTION, " | |||
| lv_src_struct_path | TYPE /AIF/SOURCE_STRUCT_PATH, " | |||
| lv_smapnr | TYPE /AIF/SMAPNR, " | |||
| lv_dest_struct_path | TYPE /AIF/DESTINATION_STRUCT_PATH, " | |||
| lv_fieldname | TYPE /AIF/FIELDNAME, " | |||
| lv_rectype | TYPE /AIF/RECTYPE. " |
|   CALL FUNCTION '/AIF/UTIL_GET_BUFFER' "Get targetstruct from smap buffer (or db) |
| EXPORTING | ||
| NS | = lv_ns | |
| IFNAME | = lv_ifname | |
| IFVERSION | = lv_ifversion | |
| IFACTION | = lv_ifaction | |
| SMAPNR | = lv_smapnr | |
| FIELDNAME | = lv_fieldname | |
| RECTYPE | = lv_rectype | |
| CHANGING | ||
| TARGETSTRUCT | = lv_targetstruct | |
| MAINCOMPTYPE | = lv_maincomptype | |
| TABNAME | = lv_tabname | |
| SRC_STRUCT_PATH | = lv_src_struct_path | |
| DEST_STRUCT_PATH | = lv_dest_struct_path | |
| . " /AIF/UTIL_GET_BUFFER | ||
ABAP code using 7.40 inline data declarations to call FM /AIF/UTIL_GET_BUFFER
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