SAP Function Modules

CNV_10510_BKTXT SAP Function module - Get structure of BKTXT depending on METHD







CNV_10510_BKTXT 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_10510_BKTXT into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: CNV_10510_A
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM CNV_10510_BKTXT - CNV 10510 BKTXT





CALL FUNCTION 'CNV_10510_BKTXT' "Get structure of BKTXT depending on METHD
  EXPORTING
    iv_rldnr =                  " cnvmbtasf_rldnr  Ledger
    iv_bukrs =                  " bukrs         Valuation Methods in Financial Accounting
    iv_curtp =                  " curtp         Currency Type And Valuation View
    iv_methd =                  " cnv_10510_umbwm  Revaluation methods in FI
    iv_waers =                  " waers         Currency Key
  TABLES
    gt_fcvmap =                 " cnv_10510_fcvmap  Mappingtable for conversion of foreign currencies
  CHANGING
    xv_bktxt =                  " bktxt         Document Header Text
  EXCEPTIONS
    REC_NOT_FOUND = 1           "               record not found in mapping of 10510
    NO_MAPPING_FOUND = 2        "               no mappping found in table CNV_10510_FCVMAP
    .  "  CNV_10510_BKTXT

ABAP code example for Function Module CNV_10510_BKTXT





The ABAP code below is a full code listing to execute function module CNV_10510_BKTXT 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:
it_gt_fcvmap  TYPE STANDARD TABLE OF CNV_10510_FCVMAP,"TABLES PARAM
wa_gt_fcvmap  LIKE LINE OF it_gt_fcvmap .

DATA(ld_xv_bktxt) = 'Check type of data required'.
DATA(ld_iv_rldnr) = 'Check type of data required'.
DATA(ld_iv_bukrs) = 'Check type of data required'.
DATA(ld_iv_curtp) = 'Check type of data required'.
DATA(ld_iv_methd) = 'Check type of data required'.
DATA(ld_iv_waers) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_gt_fcvmap to it_gt_fcvmap. . CALL FUNCTION 'CNV_10510_BKTXT' EXPORTING iv_rldnr = ld_iv_rldnr iv_bukrs = ld_iv_bukrs iv_curtp = ld_iv_curtp iv_methd = ld_iv_methd iv_waers = ld_iv_waers TABLES gt_fcvmap = it_gt_fcvmap CHANGING xv_bktxt = ld_xv_bktxt EXCEPTIONS REC_NOT_FOUND = 1 NO_MAPPING_FOUND = 2 . " CNV_10510_BKTXT
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_xv_bktxt  TYPE BKTXT ,
ld_iv_rldnr  TYPE CNVMBTASF_RLDNR ,
it_gt_fcvmap  TYPE STANDARD TABLE OF CNV_10510_FCVMAP ,
wa_gt_fcvmap  LIKE LINE OF it_gt_fcvmap,
ld_iv_bukrs  TYPE BUKRS ,
ld_iv_curtp  TYPE CURTP ,
ld_iv_methd  TYPE CNV_10510_UMBWM ,
ld_iv_waers  TYPE WAERS .

ld_xv_bktxt = 'Check type of data required'.
ld_iv_rldnr = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_gt_fcvmap to it_gt_fcvmap.
ld_iv_bukrs = 'Check type of data required'.
ld_iv_curtp = 'Check type of data required'.
ld_iv_methd = 'Check type of data required'.
ld_iv_waers = 'Check type of data required'.

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_10510_BKTXT or its description.