Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Database Name

Former Member
0 Likes
504

Hi all,

How to delete from database name??

no command for Drop program in ABAP!!!!!!

Donot like application tool bar which delete icon.

I want that program..

Reply me soon,

Thx,

S.Suresh

3 REPLIES 3
Read only

Former Member
0 Likes
481

Hi,

u can do it programatically using BDC.


DATA:BEGIN OF itab OCCURS 0,
  table like RSRD1-TBMA_VAL,
  END OF itab.
 
itab-table = 'ZBHABC'."append all your tables to be deleted to itab here
APPEND itab.
 
DATA:bdctab like bdcdata occurs 0 WITH HEADER LINE.
 
start-of-selection.
 
CALL FUNCTION 'BDC_OPEN_GROUP'
 EXPORTING
   CLIENT                    = SY-MANDT
*   DEST                      = FILLER8
   GROUP                     = 'del_tab'
*   HOLDDATE                  = FILLER8
   KEEP                      = 'X'
   USER                      = sy-uname.
 
LOOP AT itab.
refresh bdctab.
perform bdc_dynpro      using 'SAPMSRD0' '0102'.
perform bdc_field       using 'BDC_CURSOR'
                             'RSRD1-TBMA_VAL'.
perform bdc_field       using 'BDC_OKCODE'
                              '=DELE'.
perform bdc_field       using 'RSRD1-TBMA'
                              'X'.
perform bdc_field       using 'RSRD1-TBMA_VAL'
                              itab-table.
perform bdc_dynpro      using 'SAPLSPO1' '0100'.
perform bdc_field       using 'BDC_OKCODE'
                              '=YES'.
perform bdc_dynpro      using 'SAPMSRD0' '0102'.
perform bdc_field       using 'BDC_CURSOR'
                              'RSRD1-TBMA_VAL'.
perform bdc_field       using 'BDC_OKCODE'
                              '=BACK'.
perform bdc_field       using 'RSRD1-TBMA'
                              'X'.
perform bdc_field       using 'RSRD1-TBMA_VAL'
                              itab-table.
 
CALL FUNCTION 'BDC_INSERT'
 EXPORTING
   TCODE                  = 'SE11'
  TABLES
    DYNPROTAB              = bdctab.
ENDLOOP.
 
 
CALL FUNCTION 'BDC_CLOSE_GROUP'.
 
SUBMIT rsbdcsub WITH MAPPE = 'DEL_TAB' AND RETURN.
 
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
  CLEAR bdctab.
  bdctab-PROGRAM  = PROGRAM.
  bdctab-DYNPRO   = DYNPRO.
  bdctab-DYNBEGIN = 'X'.
  APPEND bdctab.
ENDFORM.
 
FORM BDC_FIELD USING FNAM FVAL.
  CLEAR bdctab.
  bdctab-FNAM = FNAM.
  bdctab-FVAL = FVAL.
  APPEND bdctab.
ENDFORM.

rgds,

bharat.

Read only

Former Member
0 Likes
481

hi.

i think u can use ths query in ur prog.

here reposrc hav the prog detail info.

nd by parameter u can pass the prog name.

*Delete * From reposrc Where progname = p_prog*

i hope its useful.

let me kno if any other answer.

Read only

0 Likes
481

hi twinkal,

It can not get output...

Regards,

S.Suresh.