SAP KBPD_DELETE_DATA Function Module for Delete budget / plan test data









KBPD_DELETE_DATA is a standard kbpd delete data SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Delete budget / plan test data processing and below is the pattern details for this FM, 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 kbpd delete data FM, simply by entering the name KBPD_DELETE_DATA into the relevant SAP transaction such as SE37 or SE38.

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



Function KBPD_DELETE_DATA 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 'KBPD_DELETE_DATA'"Delete budget / plan test data
EXPORTING
* DELETE_MODE = ' ' "' ' test mode 'X' - data is deleted
* NO_COMMIT = ' ' "Flag 'no COMMIT WORK'
* GEBER = ' ' "Fund
* GEBER_ALL = 'X' "
* OBJHI = ' ' "BPHI object to be deleted
* WRTTP = ' ' "value type to be deleted
* TRGKZ = ' ' "
* GESAMT = 'X' "
* GJAHR = ' ' "

TABLES
TAB_OBJNR = "Objects to be deleted
TAB_PROT = "Log -> see long text
* TAB_VERSN = "
* T_WRTTP = "value types to be deleted
.



IMPORTING Parameters details for KBPD_DELETE_DATA

DELETE_MODE - ' ' test mode 'X' - data is deleted

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

NO_COMMIT - Flag 'no COMMIT WORK'

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

GEBER - Fund

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

GEBER_ALL -

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

OBJHI - BPHI object to be deleted

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

WRTTP - value type to be deleted

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

TRGKZ -

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

GESAMT -

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

GJAHR -

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

TABLES Parameters details for KBPD_DELETE_DATA

TAB_OBJNR - Objects to be deleted

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

TAB_PROT - Log -> see long text

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

TAB_VERSN -

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

T_WRTTP - value types to be deleted

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

Copy and paste ABAP code example for KBPD_DELETE_DATA 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_tab_objnr  TYPE STANDARD TABLE OF STRING, "   
lv_delete_mode  TYPE STRING, "   SPACE
lt_tab_prot  TYPE STANDARD TABLE OF STRING, "   
lv_no_commit  TYPE STRING, "   SPACE
lv_geber  TYPE BPIN-GEBER, "   SPACE
lt_tab_versn  TYPE STANDARD TABLE OF BPIN, "   
lt_t_wrttp  TYPE STANDARD TABLE OF TAB_WRTTP, "   
lv_geber_all  TYPE TAB_WRTTP, "   'X'
lv_objhi  TYPE BPIN-OBJHI, "   SPACE
lv_wrttp  TYPE BPIN-WRTTP, "   SPACE
lv_trgkz  TYPE BPIN-TRGKZ, "   SPACE
lv_gesamt  TYPE BPIN, "   'X'
lv_gjahr  TYPE BPIN-GJAHR. "   SPACE

  CALL FUNCTION 'KBPD_DELETE_DATA'  "Delete budget / plan test data
    EXPORTING
         DELETE_MODE = lv_delete_mode
         NO_COMMIT = lv_no_commit
         GEBER = lv_geber
         GEBER_ALL = lv_geber_all
         OBJHI = lv_objhi
         WRTTP = lv_wrttp
         TRGKZ = lv_trgkz
         GESAMT = lv_gesamt
         GJAHR = lv_gjahr
    TABLES
         TAB_OBJNR = lt_tab_objnr
         TAB_PROT = lt_tab_prot
         TAB_VERSN = lt_tab_versn
         T_WRTTP = lt_t_wrttp
. " KBPD_DELETE_DATA




ABAP code using 7.40 inline data declarations to call FM KBPD_DELETE_DATA

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_delete_mode) = ' '.
 
 
DATA(ld_no_commit) = ' '.
 
"SELECT single GEBER FROM BPIN INTO @DATA(ld_geber).
DATA(ld_geber) = ' '.
 
 
 
DATA(ld_geber_all) = 'X'.
 
"SELECT single OBJHI FROM BPIN INTO @DATA(ld_objhi).
DATA(ld_objhi) = ' '.
 
"SELECT single WRTTP FROM BPIN INTO @DATA(ld_wrttp).
DATA(ld_wrttp) = ' '.
 
"SELECT single TRGKZ FROM BPIN INTO @DATA(ld_trgkz).
DATA(ld_trgkz) = ' '.
 
DATA(ld_gesamt) = 'X'.
 
"SELECT single GJAHR FROM BPIN INTO @DATA(ld_gjahr).
DATA(ld_gjahr) = ' '.
 


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!