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: 

Data deletion

Former Member
0 Kudos

Hi all,

I have one object to delete  BOM data from standard SAP tables. User has provided me the txt file of all the material numbers to be deleted.

Whats the best way to do it? How can I handle the foreign key relationship of material?

Any suggestions will be helpful.

Thanks,

J

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello J Singh,

The best way to delete the BOM using ABAP program is to use BAPI.

'CSAP_MAT_BOM_DELETE' use this BAPI to delete the BOM.

You have to paas only Material No. and BOM usage as import parameter.

You can load text file contains Material no into internal table in abap program. Then loop that internal table and delete one by one material bom. 

3 REPLIES 3

kesavadas_thekkillath
Active Contributor
0 Kudos

In SCN search for the function module to delete the BOM. It has been discussed many times.

Former Member
0 Kudos

Hello J Singh,

The best way to delete the BOM using ABAP program is to use BAPI.

'CSAP_MAT_BOM_DELETE' use this BAPI to delete the BOM.

You have to paas only Material No. and BOM usage as import parameter.

You can load text file contains Material no into internal table in abap program. Then loop that internal table and delete one by one material bom. 

0 Kudos

Thank you Dhiraj.