Application Development 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: 

Recording for Deleting records via SM30

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

matt
Active Contributor
0 Kudos

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).

6 REPLIES 6

matt
Active Contributor
0 Kudos

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).

Former Member
0 Kudos

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

jitendra_it
Active Contributor
0 Kudos

Hi,

Below link will surely help u.

http://wiki.sdn.sap.com/wiki/display/ABAP/TransportingTableEntriesinABAP+programmatically

Thanks

Jitendra

matt
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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

matt
Active Contributor
0 Kudos

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...)