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

drop table

Former Member
0 Likes
1,665

Hi, all

I want to delete a table completely, I mean the table not only the data, what's the statement to achieve this?

I'm an ABAP beginner, please help. thanks.

7 REPLIES 7
Read only

Former Member
0 Likes
1,254

HI,

[Search|http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eb6e446011d189700000e8322d00/frameset.htm] the SCN for this Basic question..you can find the lot of threads.

Edited by: Avinash Kodarapu on Feb 7, 2009 12:55 PM

Read only

Former Member
0 Likes
1,254

Its better to use BDC ... record SE11 for deleting the table and then use it in your program....

this will delete the tables effectively and consistently from SAP, because internally it deletes records from many different tables. so its always better to use BDC to delete the table

Regards,

Siddarth

Read only

Former Member
0 Likes
1,254

Hi,

I want to do it in a program.

Thanks.

Read only

0 Likes
1,254

use this code

include bdcrecx1.

start-of-selection.

perform open_group.

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'

'YH1307_SAL'.

perform bdc_dynpro using 'SAPLSDYY' '0806'.

perform bdc_field using 'BDC_CURSOR'

'T_DATA1'.

perform bdc_field using 'BDC_OKCODE'

'=DEL'.

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'

'YH1307_SAL'.

perform bdc_transaction using 'SE11'.

perform close_group.

Read only

Former Member
0 Likes
1,254

Hi,

Do the Recording for Tcode SE11 in SHDB and write the BDC in the program to Delete the Table.

OR

Check this Fm DD_DELETE_TABLE OR DD_TABL_DEL

Function module              DD_TABL_DEL

  Import parameters               Value

  TABNAME                         ZKA51151
  DEL_STATE                       A                 " Pass A as Del_state or check the value from DD02L-AS4LOCAL

  PRID                            0

Edited by: Avinash Kodarapu on Feb 7, 2009 1:05 PM

Read only

Former Member
0 Likes
1,254

Hi,

Pls ignore

Regards,

Mdi.Deeba

Edited by: Mdi.Deeba on Feb 7, 2009 9:30 AM

Read only

digvijay_rai
Participant
0 Likes
1,254

Hi, all

I want to delete a table completely, I mean the table not only the data, what's the statement to achieve this?

I'm an ABAP beginner, please help. thanks.

HI KUNAL ,

You can go to se11 enter the table name , and after selecting the database table name radio button

and from the application tool bar select Thrash Icon ( or press Shift+F2 ) .

it will delete the complete the table .

Regards

Digvijay Rai