SAP K_OPEN_ITEM_POST Function Module for









K_OPEN_ITEM_POST is a standard k open item post SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 k open item post FM, simply by entering the name K_OPEN_ITEM_POST into the relevant SAP transaction such as SE37 or SE38.

Function Group: KAOI
Program Name: SAPLKAOI
Main Program: SAPLKAOI
Appliation area: K
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update: 1



Function K_OPEN_ITEM_POST 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 'K_OPEN_ITEM_POST'"
EXPORTING
* I_MODUS = 'UPD ' "3-Byte Field
* I_BW_DELPROTOCOL = 'X' "
* I_CHECK_TEMP = 'X' "

TABLES
T_COBK = "
T_COEP = "
T_COKA = "
T_COOI = "
T_COOI_DEL = "

EXCEPTIONS
TEMP_OBJNR_COEP = 1 TEMP_REFBN_COOI = 2 TEMP_REFBN_COOI_DEL = 3
.



IMPORTING Parameters details for K_OPEN_ITEM_POST

I_MODUS - 3-Byte Field

Data type: COOI-VRGNG
Default: 'UPD '
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_BW_DELPROTOCOL -

Data type: FLAG
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_CHECK_TEMP -

Data type: FLAG
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for K_OPEN_ITEM_POST

T_COBK -

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

T_COEP -

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

T_COKA -

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

T_COOI -

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

T_COOI_DEL -

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

EXCEPTIONS details

TEMP_OBJNR_COEP -

Data type:
Optional: No
Call by Reference: Yes

TEMP_REFBN_COOI -

Data type:
Optional: No
Call by Reference: Yes

TEMP_REFBN_COOI_DEL -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for K_OPEN_ITEM_POST 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:
lt_t_cobk  TYPE STANDARD TABLE OF COBK, "   
lv_i_modus  TYPE COOI-VRGNG, "   'UPD '
lv_temp_objnr_coep  TYPE COOI, "   
lt_t_coep  TYPE STANDARD TABLE OF COEP, "   
lv_temp_refbn_cooi  TYPE COEP, "   
lv_i_bw_delprotocol  TYPE FLAG, "   'X'
lt_t_coka  TYPE STANDARD TABLE OF COKA, "   
lv_i_check_temp  TYPE FLAG, "   'X'
lv_temp_refbn_cooi_del  TYPE FLAG, "   
lt_t_cooi  TYPE STANDARD TABLE OF COOI, "   
lt_t_cooi_del  TYPE STANDARD TABLE OF COOI. "   

  CALL FUNCTION 'K_OPEN_ITEM_POST'  "
    EXPORTING
         I_MODUS = lv_i_modus
         I_BW_DELPROTOCOL = lv_i_bw_delprotocol
         I_CHECK_TEMP = lv_i_check_temp
    TABLES
         T_COBK = lt_t_cobk
         T_COEP = lt_t_coep
         T_COKA = lt_t_coka
         T_COOI = lt_t_cooi
         T_COOI_DEL = lt_t_cooi_del
    EXCEPTIONS
        TEMP_OBJNR_COEP = 1
        TEMP_REFBN_COOI = 2
        TEMP_REFBN_COOI_DEL = 3
. " K_OPEN_ITEM_POST




ABAP code using 7.40 inline data declarations to call FM K_OPEN_ITEM_POST

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.

 
"SELECT single VRGNG FROM COOI INTO @DATA(ld_i_modus).
DATA(ld_i_modus) = 'UPD '.
 
 
 
 
DATA(ld_i_bw_delprotocol) = 'X'.
 
 
DATA(ld_i_check_temp) = 'X'.
 
 
 
 


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!