SAP KK_F_PKOSA_CREATE Function Module for









KK_F_PKOSA_CREATE is a standard kk f pkosa create 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 kk f pkosa create FM, simply by entering the name KK_F_PKOSA_CREATE into the relevant SAP transaction such as SE37 or SE38.

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



Function KK_F_PKOSA_CREATE 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 'KK_F_PKOSA_CREATE'"
EXPORTING
I_AUART = "
* I_PLNAL = "
I_MATNR = "
I_WERKS = "
I_PWERK = "
* I_VERID = "
* I_STLAN = "
* I_STLAL = "
* I_PLNTY = "
* I_PLNNR = "

IMPORTING
E_AUFNR = "
E_PROCNR = "

EXCEPTIONS
NOT_FOUND = 1 PKOSA_ALREADY_EXISTS = 2 WRONG_RULE = 3 CREATION_ERROR = 4
.



IMPORTING Parameters details for KK_F_PKOSA_CREATE

I_AUART -

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

I_PLNAL -

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

I_MATNR -

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

I_WERKS -

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

I_PWERK -

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

I_VERID -

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

I_STLAN -

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

I_STLAL -

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

I_PLNTY -

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

I_PLNNR -

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

EXPORTING Parameters details for KK_F_PKOSA_CREATE

E_AUFNR -

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

E_PROCNR -

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

EXCEPTIONS details

NOT_FOUND -

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

PKOSA_ALREADY_EXISTS -

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

WRONG_RULE -

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

CREATION_ERROR -

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

Copy and paste ABAP code example for KK_F_PKOSA_CREATE 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_aufnr  TYPE AUFK-AUFNR, "   
lv_i_auart  TYPE AUFK-AUART, "   
lv_not_found  TYPE AUFK, "   
lv_i_plnal  TYPE PROCPARAM-PLNAL, "   
lv_i_matnr  TYPE AFPO-MATNR, "   
lv_e_procnr  TYPE AUFK-PROCNR, "   
lv_pkosa_already_exists  TYPE AUFK, "   
lv_i_werks  TYPE AUFK-WERKS, "   
lv_wrong_rule  TYPE AUFK, "   
lv_i_pwerk  TYPE PROCPARAM-PWERK, "   
lv_creation_error  TYPE PROCPARAM, "   
lv_i_verid  TYPE PROCPARAM-VERID, "   
lv_i_stlan  TYPE PROCPARAM-STLAN, "   
lv_i_stlal  TYPE PROCPARAM-STLAL, "   
lv_i_plnty  TYPE PROCPARAM-PLNTY, "   
lv_i_plnnr  TYPE PROCPARAM-PLNNR. "   

  CALL FUNCTION 'KK_F_PKOSA_CREATE'  "
    EXPORTING
         I_AUART = lv_i_auart
         I_PLNAL = lv_i_plnal
         I_MATNR = lv_i_matnr
         I_WERKS = lv_i_werks
         I_PWERK = lv_i_pwerk
         I_VERID = lv_i_verid
         I_STLAN = lv_i_stlan
         I_STLAL = lv_i_stlal
         I_PLNTY = lv_i_plnty
         I_PLNNR = lv_i_plnnr
    IMPORTING
         E_AUFNR = lv_e_aufnr
         E_PROCNR = lv_e_procnr
    EXCEPTIONS
        NOT_FOUND = 1
        PKOSA_ALREADY_EXISTS = 2
        WRONG_RULE = 3
        CREATION_ERROR = 4
. " KK_F_PKOSA_CREATE




ABAP code using 7.40 inline data declarations to call FM KK_F_PKOSA_CREATE

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 AUFNR FROM AUFK INTO @DATA(ld_e_aufnr).
 
"SELECT single AUART FROM AUFK INTO @DATA(ld_i_auart).
 
 
"SELECT single PLNAL FROM PROCPARAM INTO @DATA(ld_i_plnal).
 
"SELECT single MATNR FROM AFPO INTO @DATA(ld_i_matnr).
 
"SELECT single PROCNR FROM AUFK INTO @DATA(ld_e_procnr).
 
 
"SELECT single WERKS FROM AUFK INTO @DATA(ld_i_werks).
 
 
"SELECT single PWERK FROM PROCPARAM INTO @DATA(ld_i_pwerk).
 
 
"SELECT single VERID FROM PROCPARAM INTO @DATA(ld_i_verid).
 
"SELECT single STLAN FROM PROCPARAM INTO @DATA(ld_i_stlan).
 
"SELECT single STLAL FROM PROCPARAM INTO @DATA(ld_i_stlal).
 
"SELECT single PLNTY FROM PROCPARAM INTO @DATA(ld_i_plnty).
 
"SELECT single PLNNR FROM PROCPARAM INTO @DATA(ld_i_plnnr).
 


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!