SAP K_KKB_KSTAR_SET_GET Function Module for









K_KKB_KSTAR_SET_GET is a standard k kkb kstar set 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 k kkb kstar set get FM, simply by entering the name K_KKB_KSTAR_SET_GET into the relevant SAP transaction such as SE37 or SE38.

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



Function K_KKB_KSTAR_SET_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 'K_KKB_KSTAR_SET_GET'"
EXPORTING
* CHOICE = ' ' "with selection
* DFO = 'K' "Display format
* IANW = '1' "
* KST = ' ' "Cost element/cost component group
* SHOW_ALSO_1 = ' ' "
* KOKRS = "
* IHOE = "

IMPORTING
EXIT = "Abnormal termination
KST = "Cost element/cost component group

EXCEPTIONS
NO_AUTHORITY = 1 NO_KSTAR_SET = 2 NO_SET_PICKED = 3 SET_BROKEN = 4
.



IMPORTING Parameters details for K_KKB_KSTAR_SET_GET

CHOICE - with selection

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

DFO - Display format

Data type: TKKB1-DFO
Default: 'K'
Optional: Yes
Call by Reference: No ( called with pass by value option)

IANW -

Data type: TKKB2-ANW
Default: '1'
Optional: Yes
Call by Reference: No ( called with pass by value option)

KST - Cost element/cost component group

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

SHOW_ALSO_1 -

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

KOKRS -

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

IHOE -

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

EXPORTING Parameters details for K_KKB_KSTAR_SET_GET

EXIT - Abnormal termination

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

KST - Cost element/cost component group

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

EXCEPTIONS details

NO_AUTHORITY - no authorization

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

NO_KSTAR_SET - no cost element set is available

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

NO_SET_PICKED - no set selected

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

SET_BROKEN - Set destroyed

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

Copy and paste ABAP code example for K_KKB_KSTAR_SET_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_exit  TYPE STRING, "   
lv_choice  TYPE TKKB1-DFO, "   SPACE
lv_no_authority  TYPE TKKB1, "   
lv_dfo  TYPE TKKB1-DFO, "   'K'
lv_kst  TYPE TKKB2-KST, "   
lv_no_kstar_set  TYPE TKKB2, "   
lv_ianw  TYPE TKKB2-ANW, "   '1'
lv_no_set_picked  TYPE TKKB2, "   
lv_kst  TYPE TKKB2-KST, "   SPACE
lv_set_broken  TYPE TKKB2, "   
lv_show_also_1  TYPE TKKB2, "   ' '
lv_kokrs  TYPE KKBC-KOKRS, "   
lv_ihoe  TYPE KKBC. "   

  CALL FUNCTION 'K_KKB_KSTAR_SET_GET'  "
    EXPORTING
         CHOICE = lv_choice
         DFO = lv_dfo
         IANW = lv_ianw
         KST = lv_kst
         SHOW_ALSO_1 = lv_show_also_1
         KOKRS = lv_kokrs
         IHOE = lv_ihoe
    IMPORTING
         EXIT = lv_exit
         KST = lv_kst
    EXCEPTIONS
        NO_AUTHORITY = 1
        NO_KSTAR_SET = 2
        NO_SET_PICKED = 3
        SET_BROKEN = 4
. " K_KKB_KSTAR_SET_GET




ABAP code using 7.40 inline data declarations to call FM K_KKB_KSTAR_SET_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.

 
"SELECT single DFO FROM TKKB1 INTO @DATA(ld_choice).
DATA(ld_choice) = ' '.
 
 
"SELECT single DFO FROM TKKB1 INTO @DATA(ld_dfo).
DATA(ld_dfo) = 'K'.
 
"SELECT single KST FROM TKKB2 INTO @DATA(ld_kst).
 
 
"SELECT single ANW FROM TKKB2 INTO @DATA(ld_ianw).
DATA(ld_ianw) = '1'.
 
 
"SELECT single KST FROM TKKB2 INTO @DATA(ld_kst).
DATA(ld_kst) = ' '.
 
 
DATA(ld_show_also_1) = ' '.
 
"SELECT single KOKRS FROM KKBC INTO @DATA(ld_kokrs).
 
 


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!