SAP Function Modules

KBPD_DELETE_DATA SAP Function module - Delete budget / plan test data







KBPD_DELETE_DATA is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name KBPD_DELETE_DATA into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: KBPD
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM KBPD_DELETE_DATA - KBPD DELETE DATA





CALL FUNCTION 'KBPD_DELETE_DATA' "Delete budget / plan test data
* EXPORTING
*   delete_mode = SPACE         "               " " test mode  "X" - data is deleted
*   no_commit = SPACE           "               Flag 'no COMMIT WORK'
*   geber = SPACE               " bpin-geber    Fund
*   geber_all = 'X'             "
*   objhi = SPACE               " bpin-objhi    BPHI object to be deleted
*   wrttp = SPACE               " bpin-wrttp    value type to be deleted
*   trgkz = SPACE               " bpin-trgkz
*   gesamt = 'X'                "
*   gjahr = SPACE               " bpin-gjahr
  TABLES
    tab_objnr =                 "               Objects to be deleted
    tab_prot =                  "               Log -> see long text
*   tab_versn =                 "
*   t_wrttp =                   " tab_wrttp     value types to be deleted
    .  "  KBPD_DELETE_DATA

ABAP code example for Function Module KBPD_DELETE_DATA





The ABAP code below is a full code listing to execute function module KBPD_DELETE_DATA including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
it_tab_objnr  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_tab_objnr  LIKE LINE OF it_tab_objnr ,
it_tab_prot  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_tab_prot  LIKE LINE OF it_tab_prot ,
it_tab_versn  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_tab_versn  LIKE LINE OF it_tab_versn ,
it_t_wrttp  TYPE STANDARD TABLE OF TAB_WRTTP,"TABLES PARAM
wa_t_wrttp  LIKE LINE OF it_t_wrttp .

DATA(ld_delete_mode) = 'some text here'.
DATA(ld_no_commit) = 'some text here'.

DATA(ld_geber) = some text here
DATA(ld_geber_all) = 'some text here'.

DATA(ld_objhi) = some text here

DATA(ld_wrttp) = some text here

DATA(ld_trgkz) = some text here
DATA(ld_gesamt) = 'some text here'.

DATA(ld_gjahr) = Check type of data required

"populate fields of struture and append to itab
append wa_tab_objnr to it_tab_objnr.

"populate fields of struture and append to itab
append wa_tab_prot to it_tab_prot.

"populate fields of struture and append to itab
append wa_tab_versn to it_tab_versn.

"populate fields of struture and append to itab
append wa_t_wrttp to it_t_wrttp. . CALL FUNCTION 'KBPD_DELETE_DATA' * EXPORTING * delete_mode = ld_delete_mode * no_commit = ld_no_commit * geber = ld_geber * geber_all = ld_geber_all * objhi = ld_objhi * wrttp = ld_wrttp * trgkz = ld_trgkz * gesamt = ld_gesamt * gjahr = ld_gjahr TABLES tab_objnr = it_tab_objnr tab_prot = it_tab_prot * tab_versn = it_tab_versn * t_wrttp = it_t_wrttp . " KBPD_DELETE_DATA
IF SY-SUBRC EQ 0. "All OK ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_delete_mode  TYPE STRING ,
it_tab_objnr  TYPE STANDARD TABLE OF STRING ,
wa_tab_objnr  LIKE LINE OF it_tab_objnr,
ld_no_commit  TYPE STRING ,
it_tab_prot  TYPE STANDARD TABLE OF STRING ,
wa_tab_prot  LIKE LINE OF it_tab_prot,
ld_geber  TYPE BPIN-GEBER ,
it_tab_versn  TYPE STANDARD TABLE OF STRING ,
wa_tab_versn  LIKE LINE OF it_tab_versn,
ld_geber_all  TYPE STRING ,
it_t_wrttp  TYPE STANDARD TABLE OF TAB_WRTTP ,
wa_t_wrttp  LIKE LINE OF it_t_wrttp,
ld_objhi  TYPE BPIN-OBJHI ,
ld_wrttp  TYPE BPIN-WRTTP ,
ld_trgkz  TYPE BPIN-TRGKZ ,
ld_gesamt  TYPE STRING ,
ld_gjahr  TYPE BPIN-GJAHR .

ld_delete_mode = 'some text here'.

"populate fields of struture and append to itab
append wa_tab_objnr to it_tab_objnr.
ld_no_commit = 'some text here'.

"populate fields of struture and append to itab
append wa_tab_prot to it_tab_prot.

ld_geber = some text here

"populate fields of struture and append to itab
append wa_tab_versn to it_tab_versn.
ld_geber_all = 'some text here'.

"populate fields of struture and append to itab
append wa_t_wrttp to it_t_wrttp.

ld_objhi = some text here

ld_wrttp = some text here

ld_trgkz = some text here
ld_gesamt = 'some text here'.

ld_gjahr = Check type of data required

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name KBPD_DELETE_DATA or its description.