2009 Feb 03 10:16 AM
Hi,
In my coding have written a select query after that based on some cond have deleted the vendors.Now after deleting the vendors i need to know the wat details have been deleted.How to identify it
2009 Feb 03 10:31 AM
Hi,
Use this code:-
loop at itab where <condition>. "loop at internal table
MOVE : itab-field1 to it_temp-field1, "move records to temp table
itab-field2 to it_temp-field2. "similarly move other records
append it_temp. "append in temp
delete itab. "delete from itab internal table
clear itab.
clear it_temp.
endloop.
Hope this solves your problem.
Thanks & Regards,
Tarun Gambhir
2009 Feb 03 10:18 AM
Hi,
The delete query you are returning will be returning a subrc value. So after using the query, Check the value of sy-subrc.
IF SY_SUBRC EQ 0. means it was successful.
Also SY-DBCNT gives the number of records deleted.
Hope this helps.
Regards,
Deepthi.
Edited by: Deepthi S on Feb 3, 2009 3:48 PM
2009 Feb 03 10:18 AM
Hi,
Before deleting, pass the the lines of itab to a temp table inside the loop.
After coming out of the loop read the temp table and get the details.
Thanks,
Vivekanand
2009 Feb 03 10:19 AM
Hi,
Why don't keep the information in another internal tables which you are going to delete.
IT1
Ex: Vendor Name
100 A
200 B
if you are going to delete B then keep it away from IT1 to IT2.Further you can access IT2.
-Rick
2009 Feb 03 10:20 AM
Before deleting those vendors move that data to another internal table and
display the same after deleting.
2009 Feb 03 10:21 AM
HI
To know the what details have been deleted , you can use debugging ,
Before and after the delete statement just check the values in that table on which you are applying delete.
OR
keep the information in another internal tables which you are going to delete and after delete just compare
REGARDS
RAHUL
Edited by: RAHUL SHARMA on Feb 3, 2009 11:22 AM
2009 Feb 03 10:21 AM
2009 Feb 03 10:22 AM
Hi,
Create one temp internal table.
pass the data in temp on the where condition those you want to delete
Now delete the record from the main table .
Check the deleted record from the temp table.
To check every time with new record clear the temp table.
after reading
Hope it will help you.
Thanks
Arun kayal
2009 Feb 03 10:31 AM
Hi,
Use this code:-
loop at itab where <condition>. "loop at internal table
MOVE : itab-field1 to it_temp-field1, "move records to temp table
itab-field2 to it_temp-field2. "similarly move other records
append it_temp. "append in temp
delete itab. "delete from itab internal table
clear itab.
clear it_temp.
endloop.
Hope this solves your problem.
Thanks & Regards,
Tarun Gambhir
2009 Feb 03 10:48 AM
Hi,
After delete perform write sy-subrc =0 then move to that record to other internal table and append that data in to that Itab. finally you can use Reuse_Alv_grid_display.
Regards
Md.MahaboobKhan