SAP Function Modules

CK_F_ITEMIZATION_CONVERT SAP Function module







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

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


Pattern for FM CK_F_ITEMIZATION_CONVERT - CK F ITEMIZATION CONVERT





CALL FUNCTION 'CK_F_ITEMIZATION_CONVERT' "
  EXPORTING
    costingnumber =             " keko-kalnr
    costingvariant =            " tck03-klvar
    quantity =                  " cki64a-usr_menge
*   quantity_unit =             " meins
    view =                      " tckh8-sicht
*   use_kke3_cache = SPACE      "
*   ccs_itemization_check = SPACE  " xfeld      Checkbox
  TABLES
    t_keko_imp =                " keko
    t_kis1_exp =                " kis1
    t_kis1_imp =                " kis1
  EXCEPTIONS
    COSTINGNUMBER_NOT_IN_T_KEKO = 1  "
    INTERNAL_ERROR_SPLITTING = 2  "
    VIEW_NOT_EXIST = 3          "
    UNIT_CONVERSION_FAILURE = 4  "
    .  "  CK_F_ITEMIZATION_CONVERT

ABAP code example for Function Module CK_F_ITEMIZATION_CONVERT





The ABAP code below is a full code listing to execute function module CK_F_ITEMIZATION_CONVERT 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_t_keko_imp  TYPE STANDARD TABLE OF KEKO,"TABLES PARAM
wa_t_keko_imp  LIKE LINE OF it_t_keko_imp ,
it_t_kis1_exp  TYPE STANDARD TABLE OF KIS1,"TABLES PARAM
wa_t_kis1_exp  LIKE LINE OF it_t_kis1_exp ,
it_t_kis1_imp  TYPE STANDARD TABLE OF KIS1,"TABLES PARAM
wa_t_kis1_imp  LIKE LINE OF it_t_kis1_imp .


SELECT single KALNR
FROM KEKO
INTO @DATA(ld_costingnumber).


SELECT single KLVAR
FROM TCK03
INTO @DATA(ld_costingvariant).


DATA(ld_quantity) = Check type of data required
DATA(ld_quantity_unit) = 'Check type of data required'.

SELECT single SICHT
FROM TCKH8
INTO @DATA(ld_view).

DATA(ld_use_kke3_cache) = 'some text here'.
DATA(ld_ccs_itemization_check) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_keko_imp to it_t_keko_imp.

"populate fields of struture and append to itab
append wa_t_kis1_exp to it_t_kis1_exp.

"populate fields of struture and append to itab
append wa_t_kis1_imp to it_t_kis1_imp. . CALL FUNCTION 'CK_F_ITEMIZATION_CONVERT' EXPORTING costingnumber = ld_costingnumber costingvariant = ld_costingvariant quantity = ld_quantity * quantity_unit = ld_quantity_unit view = ld_view * use_kke3_cache = ld_use_kke3_cache * ccs_itemization_check = ld_ccs_itemization_check TABLES t_keko_imp = it_t_keko_imp t_kis1_exp = it_t_kis1_exp t_kis1_imp = it_t_kis1_imp EXCEPTIONS COSTINGNUMBER_NOT_IN_T_KEKO = 1 INTERNAL_ERROR_SPLITTING = 2 VIEW_NOT_EXIST = 3 UNIT_CONVERSION_FAILURE = 4 . " CK_F_ITEMIZATION_CONVERT
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 ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "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_costingnumber  TYPE KEKO-KALNR ,
it_t_keko_imp  TYPE STANDARD TABLE OF KEKO ,
wa_t_keko_imp  LIKE LINE OF it_t_keko_imp,
ld_costingvariant  TYPE TCK03-KLVAR ,
it_t_kis1_exp  TYPE STANDARD TABLE OF KIS1 ,
wa_t_kis1_exp  LIKE LINE OF it_t_kis1_exp,
ld_quantity  TYPE CKI64A-USR_MENGE ,
it_t_kis1_imp  TYPE STANDARD TABLE OF KIS1 ,
wa_t_kis1_imp  LIKE LINE OF it_t_kis1_imp,
ld_quantity_unit  TYPE MEINS ,
ld_view  TYPE TCKH8-SICHT ,
ld_use_kke3_cache  TYPE STRING ,
ld_ccs_itemization_check  TYPE XFELD .


SELECT single KALNR
FROM KEKO
INTO ld_costingnumber.


"populate fields of struture and append to itab
append wa_t_keko_imp to it_t_keko_imp.

SELECT single KLVAR
FROM TCK03
INTO ld_costingvariant.


"populate fields of struture and append to itab
append wa_t_kis1_exp to it_t_kis1_exp.

ld_quantity = Check type of data required

"populate fields of struture and append to itab
append wa_t_kis1_imp to it_t_kis1_imp.
ld_quantity_unit = 'Check type of data required'.

SELECT single SICHT
FROM TCKH8
INTO ld_view.

ld_use_kke3_cache = 'some text here'.
ld_ccs_itemization_check = '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 CK_F_ITEMIZATION_CONVERT or its description.