‎2008 Nov 05 7:43 AM
hi gurus,
how can i delete records from database table from work area which is not compatable i.e, the work area has not all the fields of db table.
‎2008 Nov 05 7:46 AM
for deleting records from Db table u can directly do it via sm30 or se 11. no need for work area to delete DB table.
if this is not the answer u r lookinf for then elaborate ur question.
‎2008 Nov 05 7:46 AM
for deleting records from Db table u can directly do it via sm30 or se 11. no need for work area to delete DB table.
if this is not the answer u r lookinf for then elaborate ur question.
‎2008 Nov 05 7:47 AM
DELETE FROM table WHERE condition.
where the condition is the primary key for instance
regards,
Hans
‎2008 Nov 05 7:48 AM
HI Venu,
Yes you can but, The primary key for the line to be deleted is taken from the explicitly specified work area wa. The key values are read from left to right according to the structure of the primary key of the database table.
Thanks,
Chidanand
‎2008 Nov 05 9:02 AM
Actually my requirement is i have values for four fields in work area using that i can delete the records from db table
if i use 'delete db from wa' it says incomptable becouse wa has only 4 fields
how i can i delete the records from db table
‎2008 Nov 05 9:04 AM
First and Foremost...
PLEASE mention if its a standard table or a Custom table who's entries you want deleted.
Surprising, even those who replied to your query did not bother finding this out .
pk
‎2008 Nov 05 9:27 AM
‎2008 Nov 05 9:28 AM
‎2008 Nov 05 9:35 AM
Hi,
write the following code in se38.
DELETE FROM table WHERE condition.
where condition u have to give the primary key.
Thanks & regards.
Y.R.Prem Kumar
‎2008 Nov 05 10:12 AM
Hi
If the WA and table have different structure, then you need to read the table using the wa fields. Using the WA from read
you can delete the table.
or if you are deleting inside the loop,do like this way
LOOP ITAB into wa_itab.
get the sy-tabix.
check wa_itab 4 fields with your wa 4 fields.
if sy-subrc = 0.
delete itab using the tabix.
endloop.
Regards,
R
‎2008 Nov 05 10:16 AM
Hello,
Please take care while deleting a entry from a DBASE table that the primary key in your work area and dbase table should match as Chidanand has mentioned earlier.
If a maintanence view exist for the table then better delete the entry from there.
Thanks,
Jayant