SAP K_PLAN_DATA_DELETE Function Module for









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

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



Function K_PLAN_DATA_DELETE 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_PLAN_DATA_DELETE'"
EXPORTING
I_KOKRS = "
* I_NON_INTEGRATED = ' ' "
I_VERSN = "
I_GJAHR = "
I_CONTROL = "
* I_DELETE_ALL = ' ' "
* I_CDEF = "
* I_USE_COIOB_BUFFER = ' ' "
* I_OBJNR_STOP = "
* I_SCAN = ' ' "

IMPORTING
E_RESULT = "

TABLES
* T_MESG = "
* T_OBJNR_DEBUGGING = "
* T_SCAN = "
* T_SEL_KSTAR = "
* T_KABA00_KSTAR = "

EXCEPTIONS
VERSION_NOT_DEFINED = 1 VERSION_LOCKED = 2 VERSION_BEING_EDITED = 3 DATASET_BLOCKED = 4 MISSING_AUTHORITY = 5
.



IMPORTING Parameters details for K_PLAN_DATA_DELETE

I_KOKRS -

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

I_NON_INTEGRATED -

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

I_VERSN -

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

I_GJAHR -

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

I_CONTROL -

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

I_DELETE_ALL -

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

I_CDEF -

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

I_USE_COIOB_BUFFER -

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

I_OBJNR_STOP -

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

I_SCAN -

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

EXPORTING Parameters details for K_PLAN_DATA_DELETE

E_RESULT -

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

TABLES Parameters details for K_PLAN_DATA_DELETE

T_MESG -

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

T_OBJNR_DEBUGGING -

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

T_SCAN -

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

T_SEL_KSTAR -

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

T_KABA00_KSTAR -

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

EXCEPTIONS details

VERSION_NOT_DEFINED -

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

VERSION_LOCKED -

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

VERSION_BEING_EDITED -

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

DATASET_BLOCKED -

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

MISSING_AUTHORITY -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for K_PLAN_DATA_DELETE 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:
lt_t_mesg  TYPE STANDARD TABLE OF SMESG, "   
lv_i_kokrs  TYPE TKA07-KOKRS, "   
lv_e_result  TYPE RKPIA_RESULT, "   
lv_version_not_defined  TYPE RKPIA_RESULT, "   
lv_i_non_integrated  TYPE BOOLE-BOOLE, "   SPACE
lv_i_versn  TYPE TKA07-VERSN, "   
lv_version_locked  TYPE TKA07, "   
lt_t_objnr_debugging  TYPE STANDARD TABLE OF IONRB, "   
lt_t_scan  TYPE STANDARD TABLE OF KPU2_SCAN, "   
lv_i_gjahr  TYPE TKA07-GJAHR, "   
lv_version_being_edited  TYPE TKA07, "   
lv_i_control  TYPE RKPIA_CONTROL, "   
lt_t_sel_kstar  TYPE STANDARD TABLE OF SEL_KSTAR, "   
lv_dataset_blocked  TYPE SEL_KSTAR, "   
lv_i_delete_all  TYPE BOOLE-BOOLE, "   ' '
lt_t_kaba00_kstar  TYPE STANDARD TABLE OF KABA00, "   
lv_missing_authority  TYPE KABA00, "   
lv_i_cdef  TYPE RKPIA_CDEF, "   
lv_i_use_coiob_buffer  TYPE BOOLE-BOOLE, "   ' '
lv_i_objnr_stop  TYPE KPU2_OBJNR-OBJNR, "   
lv_i_scan  TYPE BOOLE-BOOLE. "   ' '

  CALL FUNCTION 'K_PLAN_DATA_DELETE'  "
    EXPORTING
         I_KOKRS = lv_i_kokrs
         I_NON_INTEGRATED = lv_i_non_integrated
         I_VERSN = lv_i_versn
         I_GJAHR = lv_i_gjahr
         I_CONTROL = lv_i_control
         I_DELETE_ALL = lv_i_delete_all
         I_CDEF = lv_i_cdef
         I_USE_COIOB_BUFFER = lv_i_use_coiob_buffer
         I_OBJNR_STOP = lv_i_objnr_stop
         I_SCAN = lv_i_scan
    IMPORTING
         E_RESULT = lv_e_result
    TABLES
         T_MESG = lt_t_mesg
         T_OBJNR_DEBUGGING = lt_t_objnr_debugging
         T_SCAN = lt_t_scan
         T_SEL_KSTAR = lt_t_sel_kstar
         T_KABA00_KSTAR = lt_t_kaba00_kstar
    EXCEPTIONS
        VERSION_NOT_DEFINED = 1
        VERSION_LOCKED = 2
        VERSION_BEING_EDITED = 3
        DATASET_BLOCKED = 4
        MISSING_AUTHORITY = 5
. " K_PLAN_DATA_DELETE




ABAP code using 7.40 inline data declarations to call FM K_PLAN_DATA_DELETE

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 KOKRS FROM TKA07 INTO @DATA(ld_i_kokrs).
 
 
 
"SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_non_integrated).
DATA(ld_i_non_integrated) = ' '.
 
"SELECT single VERSN FROM TKA07 INTO @DATA(ld_i_versn).
 
 
 
 
"SELECT single GJAHR FROM TKA07 INTO @DATA(ld_i_gjahr).
 
 
 
 
 
"SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_delete_all).
DATA(ld_i_delete_all) = ' '.
 
 
 
 
"SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_use_coiob_buffer).
DATA(ld_i_use_coiob_buffer) = ' '.
 
"SELECT single OBJNR FROM KPU2_OBJNR INTO @DATA(ld_i_objnr_stop).
 
"SELECT single BOOLE FROM BOOLE INTO @DATA(ld_i_scan).
DATA(ld_i_scan) = ' '.
 


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!