SAP MLCCS_KSTAR_GET Function Module for
MLCCS_KSTAR_GET is a standard mlccs kstar get 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 mlccs kstar get FM, simply by entering the name MLCCS_KSTAR_GET into the relevant SAP transaction such as SE37 or SE38.
Function Group: MLCCS_TOOLS
Program Name: SAPLMLCCS_TOOLS
Main Program: SAPLMLCCS_TOOLS
Appliation area: K
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MLCCS_KSTAR_GET 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 'MLCCS_KSTAR_GET'".
EXPORTING
* I_MATNR = "Material Number
* I_SOBKZ = "Special Stock Indicator
* I_KZBWS = "Valuation of Special Stock
* I_VBELN = "Sales and Distribution Document Number
* I_POSNR = "Item Number of the SD Document
* I_PSPNR = "Work Breakdown Structure Element (WBS Element)
I_BWKEY = "Valuation Area
* I_BWTAR = "Valuation Type
I_BWMOD = "Valuation Grouping Code
I_KTOPL = "Chart of Accounts
* I_BWART = '261' "Movement Type (Inventory Management)
* I_KTOSL = 'GBB' "Transaction Key
* I_MTART = "Material Type
* I_BKLAS = "Valuation Class
IMPORTING
E_KSTAR = "Cost Element
E_HRKFT = "Origin Group as Subdivision of Cost Element
EXCEPTIONS
ACCOUNT_NOT_FOUND = 1
IMPORTING Parameters details for MLCCS_KSTAR_GET
I_MATNR - Material Number
Data type: MATNROptional: Yes
Call by Reference: Yes
I_SOBKZ - Special Stock Indicator
Data type: SOBKZOptional: Yes
Call by Reference: Yes
I_KZBWS - Valuation of Special Stock
Data type: KZBWSOptional: Yes
Call by Reference: Yes
I_VBELN - Sales and Distribution Document Number
Data type: VBELNOptional: Yes
Call by Reference: Yes
I_POSNR - Item Number of the SD Document
Data type: POSNROptional: Yes
Call by Reference: Yes
I_PSPNR - Work Breakdown Structure Element (WBS Element)
Data type: PS_PSP_PNROptional: Yes
Call by Reference: Yes
I_BWKEY - Valuation Area
Data type: BWKEYOptional: No
Call by Reference: Yes
I_BWTAR - Valuation Type
Data type: BWTAR_DOptional: Yes
Call by Reference: Yes
I_BWMOD - Valuation Grouping Code
Data type: BWMODOptional: No
Call by Reference: Yes
I_KTOPL - Chart of Accounts
Data type: KTOPLOptional: No
Call by Reference: Yes
I_BWART - Movement Type (Inventory Management)
Data type: BWARTDefault: '261'
Optional: Yes
Call by Reference: Yes
I_KTOSL - Transaction Key
Data type: KTOSLDefault: 'GBB'
Optional: Yes
Call by Reference: Yes
I_MTART - Material Type
Data type: MTARTOptional: Yes
Call by Reference: Yes
I_BKLAS - Valuation Class
Data type: BKLASOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for MLCCS_KSTAR_GET
E_KSTAR - Cost Element
Data type: KSTAROptional: No
Call by Reference: Yes
E_HRKFT - Origin Group as Subdivision of Cost Element
Data type: HRKFTOptional: No
Call by Reference: Yes
EXCEPTIONS details
ACCOUNT_NOT_FOUND -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for MLCCS_KSTAR_GET 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_kstar | TYPE KSTAR, " | |||
| lv_i_matnr | TYPE MATNR, " | |||
| lv_account_not_found | TYPE MATNR, " | |||
| lv_i_sobkz | TYPE SOBKZ, " | |||
| lv_i_kzbws | TYPE KZBWS, " | |||
| lv_i_vbeln | TYPE VBELN, " | |||
| lv_i_posnr | TYPE POSNR, " | |||
| lv_i_pspnr | TYPE PS_PSP_PNR, " | |||
| lv_e_hrkft | TYPE HRKFT, " | |||
| lv_i_bwkey | TYPE BWKEY, " | |||
| lv_i_bwtar | TYPE BWTAR_D, " | |||
| lv_i_bwmod | TYPE BWMOD, " | |||
| lv_i_ktopl | TYPE KTOPL, " | |||
| lv_i_bwart | TYPE BWART, " '261' | |||
| lv_i_ktosl | TYPE KTOSL, " 'GBB' | |||
| lv_i_mtart | TYPE MTART, " | |||
| lv_i_bklas | TYPE BKLAS. " |
|   CALL FUNCTION 'MLCCS_KSTAR_GET' " |
| EXPORTING | ||
| I_MATNR | = lv_i_matnr | |
| I_SOBKZ | = lv_i_sobkz | |
| I_KZBWS | = lv_i_kzbws | |
| I_VBELN | = lv_i_vbeln | |
| I_POSNR | = lv_i_posnr | |
| I_PSPNR | = lv_i_pspnr | |
| I_BWKEY | = lv_i_bwkey | |
| I_BWTAR | = lv_i_bwtar | |
| I_BWMOD | = lv_i_bwmod | |
| I_KTOPL | = lv_i_ktopl | |
| I_BWART | = lv_i_bwart | |
| I_KTOSL | = lv_i_ktosl | |
| I_MTART | = lv_i_mtart | |
| I_BKLAS | = lv_i_bklas | |
| IMPORTING | ||
| E_KSTAR | = lv_e_kstar | |
| E_HRKFT | = lv_e_hrkft | |
| EXCEPTIONS | ||
| ACCOUNT_NOT_FOUND = 1 | ||
| . " MLCCS_KSTAR_GET | ||
ABAP code using 7.40 inline data declarations to call FM MLCCS_KSTAR_GET
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_bwart) | = '261'. | |||
| DATA(ld_i_ktosl) | = 'GBB'. | |||
Search for further information about these or an SAP related objects