SAP K_COBL_CHECK Function Module for









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

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



Function K_COBL_CHECK 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_COBL_CHECK'"
EXPORTING
I_COBL = "Coding Block (To Be Checked)
* I_DOC_STATUS = ' ' "
* I_XSEND = ' ' "Indicator: Account Assignment Block for Senders
* SORTFIELD = ' ' "Sort Criteria for Error Messages
* I_KSTAT = ' ' "
* I_COBK = "
* I_COMB_CHECK = 'X' "
* I_SOFT_CHECK = "
* I_REAL_REVERSAL = ' ' "
* I_EXTERNAL_VORGN = "

IMPORTING
E_COBL = "Coding Block (Checked)
EV_KSTAR = "Cost Element
.



IMPORTING Parameters details for K_COBL_CHECK

I_COBL - Coding Block (To Be Checked)

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

I_DOC_STATUS -

Data type: C
Default: SPACE
Optional: Yes
Call by Reference: Yes

I_XSEND - Indicator: Account Assignment Block for Senders

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

SORTFIELD - Sort Criteria for Error Messages

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

I_KSTAT -

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

I_COBK -

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

I_COMB_CHECK -

Data type: BOOLE_D
Default: 'X'
Optional: Yes
Call by Reference: Yes

I_SOFT_CHECK -

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

I_REAL_REVERSAL -

Data type: BOOLE_D
Default: SPACE
Optional: Yes
Call by Reference: Yes

I_EXTERNAL_VORGN -

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

EXPORTING Parameters details for K_COBL_CHECK

E_COBL - Coding Block (Checked)

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

EV_KSTAR - Cost Element

Data type: COBL-HKONT
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for K_COBL_CHECK 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_e_cobl  TYPE COBL, "   
lv_i_cobl  TYPE COBL, "   
lv_i_doc_status  TYPE C, "   SPACE
lv_i_xsend  TYPE SY-BATCH, "   SPACE
lv_ev_kstar  TYPE COBL-HKONT, "   
lv_sortfield  TYPE COBL, "   SPACE
lv_i_kstat  TYPE ACCIT-KSTAT, "   SPACE
lv_i_cobk  TYPE COBK, "   
lv_i_comb_check  TYPE BOOLE_D, "   'X'
lv_i_soft_check  TYPE BOOLE_D, "   
lv_i_real_reversal  TYPE BOOLE_D, "   SPACE
lv_i_external_vorgn  TYPE BOOLE_D. "   

  CALL FUNCTION 'K_COBL_CHECK'  "
    EXPORTING
         I_COBL = lv_i_cobl
         I_DOC_STATUS = lv_i_doc_status
         I_XSEND = lv_i_xsend
         SORTFIELD = lv_sortfield
         I_KSTAT = lv_i_kstat
         I_COBK = lv_i_cobk
         I_COMB_CHECK = lv_i_comb_check
         I_SOFT_CHECK = lv_i_soft_check
         I_REAL_REVERSAL = lv_i_real_reversal
         I_EXTERNAL_VORGN = lv_i_external_vorgn
    IMPORTING
         E_COBL = lv_e_cobl
         EV_KSTAR = lv_ev_kstar
. " K_COBL_CHECK




ABAP code using 7.40 inline data declarations to call FM K_COBL_CHECK

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.

 
 
DATA(ld_i_doc_status) = ' '.
 
"SELECT single BATCH FROM SY INTO @DATA(ld_i_xsend).
DATA(ld_i_xsend) = ' '.
 
"SELECT single HKONT FROM COBL INTO @DATA(ld_ev_kstar).
 
DATA(ld_sortfield) = ' '.
 
"SELECT single KSTAT FROM ACCIT INTO @DATA(ld_i_kstat).
DATA(ld_i_kstat) = ' '.
 
 
DATA(ld_i_comb_check) = 'X'.
 
 
DATA(ld_i_real_reversal) = ' '.
 
 


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!