Skip to Content
0
Former Member
May 30, 2008 at 07:04 AM

Data Deletion from Database table

31 Views

Hi Experts,

My requirement is,

1. From the selection screen, I want to get the table name and fieldname.

2. BAsed on that, I have delete the data from the mentioned database table.

I have written the below code , in that runtime I am getting the db table name and I am deleting the data... but I want to mention the fieldname also in runtime...

Kindly help me..

REPORT ZSBN_TESTDELETE .
 
TABLES : DD02L.
 
DATA : WF_TABNAME  LIKE DD02L-TABNAME.
 
SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-000.
SELECT-OPTIONS   : S_TABLE FOR DD02L-TABNAME OBLIGATORY.
SELECTION-SCREEN : END OF BLOCK B1.
 
 
DELETE FROM (S_TABLE-LOW)
       WHERE
             J_1IBUKRS EQ '6600'.

With Rgds,

S.Barani