SAP K_OPEN_ITEM_UPDATE Function Module for









K_OPEN_ITEM_UPDATE is a standard k open item update 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 update FM, simply by entering the name K_OPEN_ITEM_UPDATE into the relevant SAP transaction such as SE37 or SE38.

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



Function K_OPEN_ITEM_UPDATE 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_UPDATE'"
EXPORTING
* PO_NR = "
* PO_POS = "
* PR_NR = "
* PR_POS = "
* KB_NR = "
* KB_POS = "
* CHECK_ONLY = ' ' "
* COMP = 'COOI' "

TABLES
T_BELNR = "
* T_COOI_ORG = "
* T_COOI_OLD = "
* T_COOI_DELTA = "

EXCEPTIONS
ITEM_LOCKED = 1 DOC_NOT_FOUND = 2 POS_NOT_FOUND = 3 DLS_NOT_FOUND = 4 ACC_NOT_FOUND = 5
.



IMPORTING Parameters details for K_OPEN_ITEM_UPDATE

PO_NR -

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

PO_POS -

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

PR_NR -

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

PR_POS -

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

KB_NR -

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

KB_POS -

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

CHECK_ONLY -

Data type: SY-CALLD
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

COMP -

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

TABLES Parameters details for K_OPEN_ITEM_UPDATE

T_BELNR -

Data type: CMT_OBJ
Optional: No
Call by Reference: Yes

T_COOI_ORG -

Data type: COOI
Optional: Yes
Call by Reference: Yes

T_COOI_OLD -

Data type: COOI
Optional: Yes
Call by Reference: Yes

T_COOI_DELTA -

Data type: COEP
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

ITEM_LOCKED -

Data type:
Optional: No
Call by Reference: Yes

DOC_NOT_FOUND -

Data type:
Optional: No
Call by Reference: Yes

POS_NOT_FOUND -

Data type:
Optional: No
Call by Reference: Yes

DLS_NOT_FOUND -

Data type:
Optional: No
Call by Reference: Yes

ACC_NOT_FOUND -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for K_OPEN_ITEM_UPDATE 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:
lv_po_nr  TYPE EBELN, "   
lt_t_belnr  TYPE STANDARD TABLE OF CMT_OBJ, "   
lv_item_locked  TYPE CMT_OBJ, "   
lv_po_pos  TYPE EBELP, "   
lt_t_cooi_org  TYPE STANDARD TABLE OF COOI, "   
lv_doc_not_found  TYPE COOI, "   
lv_pr_nr  TYPE BANFN, "   
lt_t_cooi_old  TYPE STANDARD TABLE OF COOI, "   
lv_pos_not_found  TYPE COOI, "   
lv_pr_pos  TYPE BNFPO, "   
lt_t_cooi_delta  TYPE STANDARD TABLE OF COEP, "   
lv_dls_not_found  TYPE COEP, "   
lv_kb_nr  TYPE KBLNR, "   
lv_acc_not_found  TYPE KBLNR, "   
lv_kb_pos  TYPE KBLPOS, "   
lv_check_only  TYPE SY-CALLD, "   SPACE
lv_comp  TYPE TRWPR-COMPONENT. "   'COOI'

  CALL FUNCTION 'K_OPEN_ITEM_UPDATE'  "
    EXPORTING
         PO_NR = lv_po_nr
         PO_POS = lv_po_pos
         PR_NR = lv_pr_nr
         PR_POS = lv_pr_pos
         KB_NR = lv_kb_nr
         KB_POS = lv_kb_pos
         CHECK_ONLY = lv_check_only
         COMP = lv_comp
    TABLES
         T_BELNR = lt_t_belnr
         T_COOI_ORG = lt_t_cooi_org
         T_COOI_OLD = lt_t_cooi_old
         T_COOI_DELTA = lt_t_cooi_delta
    EXCEPTIONS
        ITEM_LOCKED = 1
        DOC_NOT_FOUND = 2
        POS_NOT_FOUND = 3
        DLS_NOT_FOUND = 4
        ACC_NOT_FOUND = 5
. " K_OPEN_ITEM_UPDATE




ABAP code using 7.40 inline data declarations to call FM K_OPEN_ITEM_UPDATE

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 CALLD FROM SY INTO @DATA(ld_check_only).
DATA(ld_check_only) = ' '.
 
"SELECT single COMPONENT FROM TRWPR INTO @DATA(ld_comp).
DATA(ld_comp) = 'COOI'.
 


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!