SAP CK_F_ACCOUNT_ASSIGNMENT Function Module for









CK_F_ACCOUNT_ASSIGNMENT is a standard ck f account assignment 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 ck f account assignment FM, simply by entering the name CK_F_ACCOUNT_ASSIGNMENT into the relevant SAP transaction such as SE37 or SE38.

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



Function CK_F_ACCOUNT_ASSIGNMENT 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 'CK_F_ACCOUNT_ASSIGNMENT'"
EXPORTING
* P_BEW_ART = '261' "Transaction Type
* P_KNTTP = ' ' "Account Assignment Category
* P_T163K_KOMOK = "
* P_WARENZUGANG = "Indic. whether goods receipt posting to be simulated
* P_SHKZG = 'S' "Debit/credit indicator
* P_KZBEW = "
* P_KZVBR_156S = "
* P_KZVBR_156X = "
* P_SOBKZ = "
* P_BEW_KLASSE = ' ' "Valuation class
P_BEW_MODIF = "Valuatn Grouping Code
P_KONTENPLAN = "Chart of accounts
* P_MTART = ' ' "Material type
* P_BWKEY = "
* P_MATNR = "Material Number
* P_WERKS = "Plant
* P_VORSL = 'GBB' "Processing key

IMPORTING
P_KONTO_EXP = "Consumption account
P_KOMOK = "

EXCEPTIONS
ACCOUNT_NOT_FOUND = 1 NO_WERKS_NO_BWKEY = 2
.




Customer Function user exits

Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.
EXIT_SAPLCK21_001 User Exit for Material Valuation in Cross-Company Costing
EXIT_SAPLCK21_002 User Exit for Material Valuation (Strategy U)

IMPORTING Parameters details for CK_F_ACCOUNT_ASSIGNMENT

P_BEW_ART - Transaction Type

Data type: T156SC-BWART
Default: '261'
Optional: Yes
Call by Reference: No ( called with pass by value option)

P_KNTTP - Account Assignment Category

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

P_T163K_KOMOK -

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

P_WARENZUGANG - Indic. whether goods receipt posting to be simulated

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

P_SHKZG - Debit/credit indicator

Data type: T156-SHKZG
Default: 'S'
Optional: Yes
Call by Reference: No ( called with pass by value option)

P_KZBEW -

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

P_KZVBR_156S -

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

P_KZVBR_156X -

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

P_SOBKZ -

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

P_BEW_KLASSE - Valuation class

Data type: T030-BKLAS
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

P_BEW_MODIF - Valuatn Grouping Code

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

P_KONTENPLAN - Chart of accounts

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

P_MTART - Material type

Data type: T134-MTART
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

P_BWKEY -

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

P_MATNR - Material Number

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

P_WERKS - Plant

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

P_VORSL - Processing key

Data type: T030-KTOSL
Default: 'GBB'
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for CK_F_ACCOUNT_ASSIGNMENT

P_KONTO_EXP - Consumption account

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

P_KOMOK -

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

EXCEPTIONS details

ACCOUNT_NOT_FOUND -

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

NO_WERKS_NO_BWKEY -

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

Copy and paste ABAP code example for CK_F_ACCOUNT_ASSIGNMENT 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_p_bew_art  TYPE T156SC-BWART, "   '261'
lv_p_konto_exp  TYPE CKKALKTAB-KSTAR, "   
lv_account_not_found  TYPE CKKALKTAB, "   
lv_p_knttp  TYPE T163K-KNTTP, "   SPACE
lv_p_t163k_komok  TYPE CK_SELKZ1, "   
lv_p_warenzugang  TYPE CK_SELKZ1, "   
lv_p_shkzg  TYPE T156-SHKZG, "   'S'
lv_p_kzbew  TYPE T156SC-KZBEW, "   
lv_p_kzvbr_156s  TYPE T156SC-KZVBR, "   
lv_p_kzvbr_156x  TYPE T156SC-KZVBR, "   
lv_p_sobkz  TYPE T156SC-SOBKZ, "   
lv_p_komok  TYPE T030-KOMOK, "   
lv_p_bew_klasse  TYPE T030-BKLAS, "   ' '
lv_no_werks_no_bwkey  TYPE T030, "   
lv_p_bew_modif  TYPE T030-BWMOD, "   
lv_p_kontenplan  TYPE T030-KTOPL, "   
lv_p_mtart  TYPE T134-MTART, "   ' '
lv_p_bwkey  TYPE T001W-BWKEY, "   
lv_p_matnr  TYPE MATNR, "   
lv_p_werks  TYPE T001W-WERKS, "   
lv_p_vorsl  TYPE T030-KTOSL. "   'GBB'

  CALL FUNCTION 'CK_F_ACCOUNT_ASSIGNMENT'  "
    EXPORTING
         P_BEW_ART = lv_p_bew_art
         P_KNTTP = lv_p_knttp
         P_T163K_KOMOK = lv_p_t163k_komok
         P_WARENZUGANG = lv_p_warenzugang
         P_SHKZG = lv_p_shkzg
         P_KZBEW = lv_p_kzbew
         P_KZVBR_156S = lv_p_kzvbr_156s
         P_KZVBR_156X = lv_p_kzvbr_156x
         P_SOBKZ = lv_p_sobkz
         P_BEW_KLASSE = lv_p_bew_klasse
         P_BEW_MODIF = lv_p_bew_modif
         P_KONTENPLAN = lv_p_kontenplan
         P_MTART = lv_p_mtart
         P_BWKEY = lv_p_bwkey
         P_MATNR = lv_p_matnr
         P_WERKS = lv_p_werks
         P_VORSL = lv_p_vorsl
    IMPORTING
         P_KONTO_EXP = lv_p_konto_exp
         P_KOMOK = lv_p_komok
    EXCEPTIONS
        ACCOUNT_NOT_FOUND = 1
        NO_WERKS_NO_BWKEY = 2
. " CK_F_ACCOUNT_ASSIGNMENT




ABAP code using 7.40 inline data declarations to call FM CK_F_ACCOUNT_ASSIGNMENT

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 BWART FROM T156SC INTO @DATA(ld_p_bew_art).
DATA(ld_p_bew_art) = '261'.
 
"SELECT single KSTAR FROM CKKALKTAB INTO @DATA(ld_p_konto_exp).
 
 
"SELECT single KNTTP FROM T163K INTO @DATA(ld_p_knttp).
DATA(ld_p_knttp) = ' '.
 
 
 
"SELECT single SHKZG FROM T156 INTO @DATA(ld_p_shkzg).
DATA(ld_p_shkzg) = 'S'.
 
"SELECT single KZBEW FROM T156SC INTO @DATA(ld_p_kzbew).
 
"SELECT single KZVBR FROM T156SC INTO @DATA(ld_p_kzvbr_156s).
 
"SELECT single KZVBR FROM T156SC INTO @DATA(ld_p_kzvbr_156x).
 
"SELECT single SOBKZ FROM T156SC INTO @DATA(ld_p_sobkz).
 
"SELECT single KOMOK FROM T030 INTO @DATA(ld_p_komok).
 
"SELECT single BKLAS FROM T030 INTO @DATA(ld_p_bew_klasse).
DATA(ld_p_bew_klasse) = ' '.
 
 
"SELECT single BWMOD FROM T030 INTO @DATA(ld_p_bew_modif).
 
"SELECT single KTOPL FROM T030 INTO @DATA(ld_p_kontenplan).
 
"SELECT single MTART FROM T134 INTO @DATA(ld_p_mtart).
DATA(ld_p_mtart) = ' '.
 
"SELECT single BWKEY FROM T001W INTO @DATA(ld_p_bwkey).
 
 
"SELECT single WERKS FROM T001W INTO @DATA(ld_p_werks).
 
"SELECT single KTOSL FROM T030 INTO @DATA(ld_p_vorsl).
DATA(ld_p_vorsl) = 'GBB'.
 


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!