SAP /AIF/PERFORM_VALUE_MAPPING Function Module for Perform value mappings









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

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



Function /AIF/PERFORM_VALUE_MAPPING 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/PERFORM_VALUE_MAPPING'"Perform value mappings
EXPORTING
LV_STR1 = "
LV_TABIX = "Index of Internal Tables
NR_LAST_FIELD = "Number of last field
* IFDIRECTION = 'I' "Interface Direction
* LOG_HANDLE = "Application Log: Log Handle
* LV_SENDING_SYSTEM = "Key Name of Business System
* LS_RAW_LINE = "
* LS_DEST_LINE = "
* LT_CURR_LINES = "Tabletype of /AIF/FILE_CURR_LINE
* LT_CURR_DEST_LINES = "Tabletype of /AIF/FILE_CURR_LINE
* RAW_STRUCT = "
* LV_STR2 = "
* OUT_STRUCT = "
* LT_FAILED_FIELDS = "table type for failed fields
* LV_IS_REVERSED = '' "
* LV_TRACKING_FLAG = "Flag for Time Tracking
* LT_VMAPVAL_HT = "Hashed table type for /AIF/T_VMAPVAL
* LT_VMAPVAL_INT_HT = "Hashed table type for /AIF/T_VMAPVAL
* LT_MVMAPVAL_HT = "Hashed table type for /AIF/T_MVMAPVAL
* LT_MVMAPVAL_INT_HT = "Hashed table type for /AIF/T_MVMAPVAL
* LT_VMAPVAL5_HT = "Hashed table type for /AIF/T_VMAPVAL5
* LT_MVMAPVAL5_HT = "Hashed table type for /AIF/T_MVMAPVAL5
* LV_STR3 = "
* IS_FMAP = "Fieldname
* IS_SMAP = "Structure mapping
* LV_STR4 = "
* LV_STR5 = "
VMAPNS = "Namespace
VMAPNAME = "Value Mapping
LS_INTREC = "Destination record type for interface
MAX_ERRORS = "

IMPORTING
LV_SY_SUBRC = "Return Value of ABAP Statements

CHANGING
LF_DEST_FIELD = "
LV_STR = "
LV_ERROR_CNT = "
* BAL_CONTEXT = "Context for Application Log
* LT_TIMETRACKING = "Time Tracking Type
* LT_STARTEDTIME = "Table of started Time Tracking

TABLES
RETURN_TAB = "Return Parameter
LT_VMAP = "Value mapping
LT_VMAPVAL = "Value mapping for master data (no transport)
LT_MVMAPVAL = "Value mapping for master data (no transport)
LT_VMAPVAL5 = "Value mapping for master data (no transport)
LT_MVMAPVAL5 = "Value mapping for master data (no transport)

EXCEPTIONS
MAX_ERRORS_REACHED = 1 CANCEL = 2
.



IMPORTING Parameters details for /AIF/PERFORM_VALUE_MAPPING

LV_STR1 -

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

LV_TABIX - Index of Internal Tables

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

NR_LAST_FIELD - Number of last field

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

IFDIRECTION - Interface Direction

Data type: /AIF/IFDIRECTION
Default: 'I'
Optional: Yes
Call by Reference: Yes

LOG_HANDLE - Application Log: Log Handle

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

LV_SENDING_SYSTEM - Key Name of Business System

Data type: /AIF/AIF_BUSINESS_SYSTEM_KEY
Optional: Yes
Call by Reference: Yes

LS_RAW_LINE -

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

LS_DEST_LINE -

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

LT_CURR_LINES - Tabletype of /AIF/FILE_CURR_LINE

Data type: /AIF/FILE_CURR_LINE_T
Optional: Yes
Call by Reference: Yes

LT_CURR_DEST_LINES - Tabletype of /AIF/FILE_CURR_LINE

Data type: /AIF/FILE_CURR_LINE_T
Optional: Yes
Call by Reference: Yes

RAW_STRUCT -

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

LV_STR2 -

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

OUT_STRUCT -

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

LT_FAILED_FIELDS - table type for failed fields

Data type: /AIF/FAILED_FIELD_TT
Optional: Yes
Call by Reference: Yes

LV_IS_REVERSED -

Data type: C
Default: ''
Optional: Yes
Call by Reference: Yes

LV_TRACKING_FLAG - Flag for Time Tracking

Data type: /AIF/TRACKING_FLAG
Optional: Yes
Call by Reference: Yes

LT_VMAPVAL_HT - Hashed table type for /AIF/T_VMAPVAL

Data type: /AIF/T_VMAPVAL_HT
Optional: Yes
Call by Reference: Yes

LT_VMAPVAL_INT_HT - Hashed table type for /AIF/T_VMAPVAL

Data type: /AIF/T_VMAPVAL_INT_HT
Optional: Yes
Call by Reference: Yes

LT_MVMAPVAL_HT - Hashed table type for /AIF/T_MVMAPVAL

Data type: /AIF/T_MVMAPVAL_HT
Optional: Yes
Call by Reference: Yes

LT_MVMAPVAL_INT_HT - Hashed table type for /AIF/T_MVMAPVAL

Data type: /AIF/T_MVMAPVAL_INT_HT
Optional: Yes
Call by Reference: Yes

LT_VMAPVAL5_HT - Hashed table type for /AIF/T_VMAPVAL5

Data type: /AIF/T_VMAPVAL5_HT
Optional: Yes
Call by Reference: Yes

LT_MVMAPVAL5_HT - Hashed table type for /AIF/T_MVMAPVAL5

Data type: /AIF/T_MVMAPVAL5_HT
Optional: Yes
Call by Reference: Yes

LV_STR3 -

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

IS_FMAP - Fieldname

Data type: /AIF/T_FMAP
Optional: Yes
Call by Reference: Yes

IS_SMAP - Structure mapping

Data type: /AIF/T_SMAP
Optional: Yes
Call by Reference: Yes

LV_STR4 -

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

LV_STR5 -

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

VMAPNS - Namespace

Data type: /AIF/NS
Optional: No
Call by Reference: Yes

VMAPNAME - Value Mapping

Data type: /AIF/VMAPNAME
Optional: No
Call by Reference: Yes

LS_INTREC - Destination record type for interface

Data type: /AIF/T_INTREC
Optional: No
Call by Reference: Yes

MAX_ERRORS -

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

EXPORTING Parameters details for /AIF/PERFORM_VALUE_MAPPING

LV_SY_SUBRC - Return Value of ABAP Statements

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

CHANGING Parameters details for /AIF/PERFORM_VALUE_MAPPING

LF_DEST_FIELD -

Data type:
Optional: No
Call by Reference: Yes

LV_STR -

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

LV_ERROR_CNT -

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

BAL_CONTEXT - Context for Application Log

Data type: /AIF/BAL_CONTEXT
Optional: Yes
Call by Reference: Yes

LT_TIMETRACKING - Time Tracking Type

Data type: /AIF/TIMETRACKING_TT
Optional: Yes
Call by Reference: Yes

LT_STARTEDTIME - Table of started Time Tracking

Data type: /AIF/STARTTIME_TT
Optional: Yes
Call by Reference: Yes

TABLES Parameters details for /AIF/PERFORM_VALUE_MAPPING

RETURN_TAB - Return Parameter

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

LT_VMAP - Value mapping

Data type: /AIF/T_VMAP
Optional: No
Call by Reference: Yes

LT_VMAPVAL - Value mapping for master data (no transport)

Data type: /AIF/T_VMAPVAL
Optional: No
Call by Reference: Yes

LT_MVMAPVAL - Value mapping for master data (no transport)

Data type: /AIF/T_MVMAPVAL
Optional: No
Call by Reference: Yes

LT_VMAPVAL5 - Value mapping for master data (no transport)

Data type: /AIF/T_VMAPVAL5
Optional: No
Call by Reference: Yes

LT_MVMAPVAL5 - Value mapping for master data (no transport)

Data type: /AIF/T_MVMAPVAL5
Optional: No
Call by Reference: Yes

EXCEPTIONS details

MAX_ERRORS_REACHED -

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

CANCEL -

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

Copy and paste ABAP code example for /AIF/PERFORM_VALUE_MAPPING 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_lv_str1  TYPE STRING, "   
lt_return_tab  TYPE STANDARD TABLE OF BAPIRET2, "   
lv_lv_sy_subrc  TYPE SYSUBRC, "   
lv_lf_dest_field  TYPE SYSUBRC, "   
lv_max_errors_reached  TYPE SYSUBRC, "   
lv_lv_tabix  TYPE SYTABIX, "   
lv_nr_last_field  TYPE I, "   
lv_ifdirection  TYPE /AIF/IFDIRECTION, "   'I'
lv_log_handle  TYPE BALLOGHNDL, "   
lv_lv_sending_system  TYPE /AIF/AIF_BUSINESS_SYSTEM_KEY, "   
lv_ls_raw_line  TYPE ANY, "   
lv_ls_dest_line  TYPE ANY, "   
lv_lt_curr_lines  TYPE /AIF/FILE_CURR_LINE_T, "   
lv_lt_curr_dest_lines  TYPE /AIF/FILE_CURR_LINE_T, "   
lv_raw_struct  TYPE ANY, "   
lv_cancel  TYPE ANY, "   
lv_lv_str  TYPE STRING, "   
lt_lt_vmap  TYPE STANDARD TABLE OF /AIF/T_VMAP, "   
lv_lv_str2  TYPE STRING, "   
lv_out_struct  TYPE ANY, "   
lv_lt_failed_fields  TYPE /AIF/FAILED_FIELD_TT, "   
lv_lv_is_reversed  TYPE C, "   ''
lv_lv_tracking_flag  TYPE /AIF/TRACKING_FLAG, "   
lv_lt_vmapval_ht  TYPE /AIF/T_VMAPVAL_HT, "   
lv_lt_vmapval_int_ht  TYPE /AIF/T_VMAPVAL_INT_HT, "   
lv_lt_mvmapval_ht  TYPE /AIF/T_MVMAPVAL_HT, "   
lv_lt_mvmapval_int_ht  TYPE /AIF/T_MVMAPVAL_INT_HT, "   
lv_lt_vmapval5_ht  TYPE /AIF/T_VMAPVAL5_HT, "   
lv_lt_mvmapval5_ht  TYPE /AIF/T_MVMAPVAL5_HT, "   
lv_lv_str3  TYPE STRING, "   
lt_lt_vmapval  TYPE STANDARD TABLE OF /AIF/T_VMAPVAL, "   
lv_lv_error_cnt  TYPE I, "   
lv_is_fmap  TYPE /AIF/T_FMAP, "   
lv_is_smap  TYPE /AIF/T_SMAP, "   
lv_lv_str4  TYPE STRING, "   
lv_bal_context  TYPE /AIF/BAL_CONTEXT, "   
lt_lt_mvmapval  TYPE STANDARD TABLE OF /AIF/T_MVMAPVAL, "   
lv_lv_str5  TYPE STRING, "   
lt_lt_vmapval5  TYPE STANDARD TABLE OF /AIF/T_VMAPVAL5, "   
lv_lt_timetracking  TYPE /AIF/TIMETRACKING_TT, "   
lv_vmapns  TYPE /AIF/NS, "   
lt_lt_mvmapval5  TYPE STANDARD TABLE OF /AIF/T_MVMAPVAL5, "   
lv_lt_startedtime  TYPE /AIF/STARTTIME_TT, "   
lv_vmapname  TYPE /AIF/VMAPNAME, "   
lv_ls_intrec  TYPE /AIF/T_INTREC, "   
lv_max_errors  TYPE I. "   

  CALL FUNCTION '/AIF/PERFORM_VALUE_MAPPING'  "Perform value mappings
    EXPORTING
         LV_STR1 = lv_lv_str1
         LV_TABIX = lv_lv_tabix
         NR_LAST_FIELD = lv_nr_last_field
         IFDIRECTION = lv_ifdirection
         LOG_HANDLE = lv_log_handle
         LV_SENDING_SYSTEM = lv_lv_sending_system
         LS_RAW_LINE = lv_ls_raw_line
         LS_DEST_LINE = lv_ls_dest_line
         LT_CURR_LINES = lv_lt_curr_lines
         LT_CURR_DEST_LINES = lv_lt_curr_dest_lines
         RAW_STRUCT = lv_raw_struct
         LV_STR2 = lv_lv_str2
         OUT_STRUCT = lv_out_struct
         LT_FAILED_FIELDS = lv_lt_failed_fields
         LV_IS_REVERSED = lv_lv_is_reversed
         LV_TRACKING_FLAG = lv_lv_tracking_flag
         LT_VMAPVAL_HT = lv_lt_vmapval_ht
         LT_VMAPVAL_INT_HT = lv_lt_vmapval_int_ht
         LT_MVMAPVAL_HT = lv_lt_mvmapval_ht
         LT_MVMAPVAL_INT_HT = lv_lt_mvmapval_int_ht
         LT_VMAPVAL5_HT = lv_lt_vmapval5_ht
         LT_MVMAPVAL5_HT = lv_lt_mvmapval5_ht
         LV_STR3 = lv_lv_str3
         IS_FMAP = lv_is_fmap
         IS_SMAP = lv_is_smap
         LV_STR4 = lv_lv_str4
         LV_STR5 = lv_lv_str5
         VMAPNS = lv_vmapns
         VMAPNAME = lv_vmapname
         LS_INTREC = lv_ls_intrec
         MAX_ERRORS = lv_max_errors
    IMPORTING
         LV_SY_SUBRC = lv_lv_sy_subrc
    CHANGING
         LF_DEST_FIELD = lv_lf_dest_field
         LV_STR = lv_lv_str
         LV_ERROR_CNT = lv_lv_error_cnt
         BAL_CONTEXT = lv_bal_context
         LT_TIMETRACKING = lv_lt_timetracking
         LT_STARTEDTIME = lv_lt_startedtime
    TABLES
         RETURN_TAB = lt_return_tab
         LT_VMAP = lt_lt_vmap
         LT_VMAPVAL = lt_lt_vmapval
         LT_MVMAPVAL = lt_lt_mvmapval
         LT_VMAPVAL5 = lt_lt_vmapval5
         LT_MVMAPVAL5 = lt_lt_mvmapval5
    EXCEPTIONS
        MAX_ERRORS_REACHED = 1
        CANCEL = 2
. " /AIF/PERFORM_VALUE_MAPPING




ABAP code using 7.40 inline data declarations to call FM /AIF/PERFORM_VALUE_MAPPING

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.

 
 
 
 
 
 
 
DATA(ld_ifdirection) = 'I'.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
DATA(ld_lv_is_reversed) = ''.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


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!