06-04-2011 12:05 AM
Hi Experts,
I have a file which I will read to identify table records to be deleted from the table.
The SM30 have a single screen maintanence and I have to select specific records by reading the key from the table control and delete those entries. The whole process should be done by Call Transaction in my program, the reason being the deletions will be saved to a transport.
How should I read that table control and mark them for deletion?
Thanks
Akash
06-04-2011 7:21 AM
Don't do it via recording. Assuming the table is a Z-table (if not then really don't do this), use ABAP to delete the records, and to build a transport with the correct entry (or entries).
06-04-2011 7:21 AM
Don't do it via recording. Assuming the table is a Z-table (if not then really don't do this), use ABAP to delete the records, and to build a transport with the correct entry (or entries).
06-04-2011 10:07 AM
Hi Matt,
Thanks for the reply, but ABAP code: 'delete from <dbtab> will not give me an option to save the entries/deleted entries to a customizing request. isn't it?
Please suggest.
Thanks
Akash
06-04-2011 12:20 PM
Hi,
Below link will surely help u.
http://wiki.sdn.sap.com/wiki/display/ABAP/TransportingTableEntriesinABAP+programmatically
Thanks
Jitendra
06-04-2011 12:32 PM
Hi Matt,
> Thanks for the reply, but ABAP code: 'delete from <dbtab> will not give me an option to save the entries/deleted entries to a customizing request. isn't it?
> Please suggest.
> Thanks
> Akash
No, it won't. You have to do that seperately as described above.
06-04-2011 6:49 PM
Reply by Jitu is good, but by client is pressing me to go for SM30 only... In case there is a failure I have to save a BDC session!!... neways, I did what I feared to be the worst solution. Read the table in the program and sorted the by key fields, read out the index of the desired entry/entries, while recording I marked those in the table control and got them deleted !! ..
Thanks all Matt,Jitu for all Your help..
Regards... Akash
06-04-2011 8:20 PM
Well, you had to do what you had to do - so no blame to attach there. I hope others, if they find this thread, will understand that the solution adopted is highly unlikely to be the best solution...
"Have to use SM30 in case of failure to save the BDC session"... (shakes head, wanders off in disbelief...)