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: 

Delete customer partner relation via ABAP

glenn_karlsson2
Participant
0 Kudos
199

Hi,

I have a client requirement to delete ship-to partners assigned to a sold-to partner based on the status of the ship-to.

The customer don't want to use Idoc or batch input.

There are a couple of FM's, like SD_CUSTOMER_MAINTAIN_ALL and CUSTOMER_UPDATE that is for internal use only according to the forum.

So those are not interesting. I found a method cmd_ei_api=>maintain_bapi that looks to be widely used for maintaining customer master.

So I use cmd_ei_api_extract=>get_data to extract the complete customer into a deep structure. I manipulate the partner part of the structure by setting D for delete for the partner(s) I want to delete and also set the object task in the header to U for Update.

Then I use the maintain_bapi method to push the changed customer back in the system. I get no error messages and the customer is changed in NO WAY whatsoever. What do I do wrong? Are there any other options for deleting the partner relations?

regards,

Glenn

2 REPLIES 2

harry_wu
Contributor
0 Kudos
84

As far as I know, the standard way is using idoc/bdc.

Jelena
Active Contributor
0 Kudos
84

This has been discussed on SCN before - there are no other ways. It's an ABAP question, not SD. Post a code example, I'll ask the moderators to move the question to ABAP.