SAP Function Modules

K_OPEN_ITEM_CF_POST SAP Function module







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

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


Pattern for FM K_OPEN_ITEM_CF_POST - K OPEN ITEM CF POST





CALL FUNCTION 'K_OPEN_ITEM_CF_POST' "
  EXPORTING
*   p_update = ' '              " c
    pd_kokrs =                  " tka01-kokrs   Controlling Area
    pd_gjahr =                  " gjahr
  TABLES
    pt_coep =                   " coep
    pt_cooi =                   " cooi
    .  "  K_OPEN_ITEM_CF_POST

ABAP code example for Function Module K_OPEN_ITEM_CF_POST





The ABAP code below is a full code listing to execute function module K_OPEN_ITEM_CF_POST 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_pt_coep  TYPE STANDARD TABLE OF COEP,"TABLES PARAM
wa_pt_coep  LIKE LINE OF it_pt_coep ,
it_pt_cooi  TYPE STANDARD TABLE OF COOI,"TABLES PARAM
wa_pt_cooi  LIKE LINE OF it_pt_cooi .

DATA(ld_p_update) = 'Check type of data required'.

SELECT single KOKRS
FROM TKA01
INTO @DATA(ld_pd_kokrs).

DATA(ld_pd_gjahr) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_pt_coep to it_pt_coep.

"populate fields of struture and append to itab
append wa_pt_cooi to it_pt_cooi. . CALL FUNCTION 'K_OPEN_ITEM_CF_POST' EXPORTING * p_update = ld_p_update pd_kokrs = ld_pd_kokrs pd_gjahr = ld_pd_gjahr TABLES pt_coep = it_pt_coep pt_cooi = it_pt_cooi . " K_OPEN_ITEM_CF_POST
IF SY-SUBRC EQ 0. "All OK 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_p_update  TYPE C ,
it_pt_coep  TYPE STANDARD TABLE OF COEP ,
wa_pt_coep  LIKE LINE OF it_pt_coep,
ld_pd_kokrs  TYPE TKA01-KOKRS ,
it_pt_cooi  TYPE STANDARD TABLE OF COOI ,
wa_pt_cooi  LIKE LINE OF it_pt_cooi,
ld_pd_gjahr  TYPE GJAHR .

ld_p_update = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_pt_coep to it_pt_coep.

SELECT single KOKRS
FROM TKA01
INTO ld_pd_kokrs.


"populate fields of struture and append to itab
append wa_pt_cooi to it_pt_cooi.
ld_pd_gjahr = '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 K_OPEN_ITEM_CF_POST or its description.