SAP Function Modules

CNV_20100_GET_MAPPING SAP Function module - Read the complete 20100 mapping of the package







CNV_20100_GET_MAPPING is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name CNV_20100_GET_MAPPING into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: CNV_20100
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM CNV_20100_GET_MAPPING - CNV 20100 GET MAPPING





CALL FUNCTION 'CNV_20100_GET_MAPPING' "Read the complete 20100 mapping of the package
  EXPORTING
    iv_packid =                 " cnv_pack      Conversion: Conversion package number
*   iv_coa_old =                " cnv_coa_old   Old Chart of Accounts
    iv_get_from_me =            " boolean       Get Mapping from Mapping Engine
  IMPORTING
    ev_timestamp =              " timestamp     UTC Time Stamp in Short Form (YYYYMMDDhhmmss)
* TABLES
*   t_chart_of_acc =            " cnv_chart_of_acc  ChtAccts Conversion: 'Old - New Chart of Accts' assignment
*   t_coa_t004 =                " cnv_coa_t004  New charts of accounts - Customizing
*   t_ccode =                   " cnv_coa_ccode  Assign 'old - new chart of accounts' per company code
*   t_account =                 " cnv_coa_account  Assign 'old/new' accounts/primary cost elements per ChtAccts
*   t_costele =                 " cnv_coa_costele  Assign 'old/new' secondary cost elements per Cht of Accts.
*   t_others =                  " cnv_coa_others  Mapping for other objects 'Old/New'
*   t_mapping =                 " cnv_20100_t_mapping  Account mapping
  EXCEPTIONS
    NO_MAPPING = 1              "               No mapping exists
    ERROR = 2                   "               Error occurred while getting mapping data
    .  "  CNV_20100_GET_MAPPING

ABAP code example for Function Module CNV_20100_GET_MAPPING





The ABAP code below is a full code listing to execute function module CNV_20100_GET_MAPPING including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_ev_timestamp  TYPE TIMESTAMP ,
it_t_chart_of_acc  TYPE STANDARD TABLE OF CNV_CHART_OF_ACC,"TABLES PARAM
wa_t_chart_of_acc  LIKE LINE OF it_t_chart_of_acc ,
it_t_coa_t004  TYPE STANDARD TABLE OF CNV_COA_T004,"TABLES PARAM
wa_t_coa_t004  LIKE LINE OF it_t_coa_t004 ,
it_t_ccode  TYPE STANDARD TABLE OF CNV_COA_CCODE,"TABLES PARAM
wa_t_ccode  LIKE LINE OF it_t_ccode ,
it_t_account  TYPE STANDARD TABLE OF CNV_COA_ACCOUNT,"TABLES PARAM
wa_t_account  LIKE LINE OF it_t_account ,
it_t_costele  TYPE STANDARD TABLE OF CNV_COA_COSTELE,"TABLES PARAM
wa_t_costele  LIKE LINE OF it_t_costele ,
it_t_others  TYPE STANDARD TABLE OF CNV_COA_OTHERS,"TABLES PARAM
wa_t_others  LIKE LINE OF it_t_others ,
it_t_mapping  TYPE STANDARD TABLE OF CNV_20100_T_MAPPING,"TABLES PARAM
wa_t_mapping  LIKE LINE OF it_t_mapping .

DATA(ld_iv_packid) = 'Check type of data required'.
DATA(ld_iv_coa_old) = 'Check type of data required'.
DATA(ld_iv_get_from_me) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_chart_of_acc to it_t_chart_of_acc.

"populate fields of struture and append to itab
append wa_t_coa_t004 to it_t_coa_t004.

"populate fields of struture and append to itab
append wa_t_ccode to it_t_ccode.

"populate fields of struture and append to itab
append wa_t_account to it_t_account.

"populate fields of struture and append to itab
append wa_t_costele to it_t_costele.

"populate fields of struture and append to itab
append wa_t_others to it_t_others.

"populate fields of struture and append to itab
append wa_t_mapping to it_t_mapping. . CALL FUNCTION 'CNV_20100_GET_MAPPING' EXPORTING iv_packid = ld_iv_packid * iv_coa_old = ld_iv_coa_old iv_get_from_me = ld_iv_get_from_me IMPORTING ev_timestamp = ld_ev_timestamp * TABLES * t_chart_of_acc = it_t_chart_of_acc * t_coa_t004 = it_t_coa_t004 * t_ccode = it_t_ccode * t_account = it_t_account * t_costele = it_t_costele * t_others = it_t_others * t_mapping = it_t_mapping EXCEPTIONS NO_MAPPING = 1 ERROR = 2 . " CNV_20100_GET_MAPPING
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_ev_timestamp  TYPE TIMESTAMP ,
ld_iv_packid  TYPE CNV_PACK ,
it_t_chart_of_acc  TYPE STANDARD TABLE OF CNV_CHART_OF_ACC ,
wa_t_chart_of_acc  LIKE LINE OF it_t_chart_of_acc,
ld_iv_coa_old  TYPE CNV_COA_OLD ,
it_t_coa_t004  TYPE STANDARD TABLE OF CNV_COA_T004 ,
wa_t_coa_t004  LIKE LINE OF it_t_coa_t004,
ld_iv_get_from_me  TYPE BOOLEAN ,
it_t_ccode  TYPE STANDARD TABLE OF CNV_COA_CCODE ,
wa_t_ccode  LIKE LINE OF it_t_ccode,
it_t_account  TYPE STANDARD TABLE OF CNV_COA_ACCOUNT ,
wa_t_account  LIKE LINE OF it_t_account,
it_t_costele  TYPE STANDARD TABLE OF CNV_COA_COSTELE ,
wa_t_costele  LIKE LINE OF it_t_costele,
it_t_others  TYPE STANDARD TABLE OF CNV_COA_OTHERS ,
wa_t_others  LIKE LINE OF it_t_others,
it_t_mapping  TYPE STANDARD TABLE OF CNV_20100_T_MAPPING ,
wa_t_mapping  LIKE LINE OF it_t_mapping.

ld_iv_packid = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_chart_of_acc to it_t_chart_of_acc.
ld_iv_coa_old = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_coa_t004 to it_t_coa_t004.
ld_iv_get_from_me = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_ccode to it_t_ccode.

"populate fields of struture and append to itab
append wa_t_account to it_t_account.

"populate fields of struture and append to itab
append wa_t_costele to it_t_costele.

"populate fields of struture and append to itab
append wa_t_others to it_t_others.

"populate fields of struture and append to itab
append wa_t_mapping to it_t_mapping.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name CNV_20100_GET_MAPPING or its description.