Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3189

Re: Creating customers/vendors with reference with transaction BP

$
0
0

Hi Bart

 

I was curious to see if there was anything out there that could answer this question and I found another post which is similar. Let me quote: https://scn.sap.com/thread/1266144

 

"

Hi Silpa,

 

In the standard, this isn't possible with the BP. However, you can create a customer as a reference of another existing customer, and then sync this new customer into a new BP. So you can do this indirectly,.

 

If you want to create a BP directy as a reference of another BP - sorry, this isn't possible. You would need to copy the BP into another BP using a custom report. You can develop your report along these lines :

 

1. The easiest way is to use APIs. Start by calling BUPA_CENTRAL_GET_DETAIL usign the BP number. THis will give you all the central data for the BP - e.g. name, etc. Now, merely feed the output of this module into the module BUPA_CREATE_FROM_DATA. This will create a new BP with the same data of the old BP.

 

2. Now that the main BP is ready, you need to start copying the individual datasets - addresses, bank details, roles, Id, industry,etc. This is tricky - the ADD apis - BUPA_ADDRESS_ADD, BUPA_ROLE_ADD, etc can only create one record in a call. So, you need to first get the data of the reference BP using the GET_DETAIL api e.g. : BUPA_ADDRESS_GET_DETAIL, then loop at each returned record, and pass that into the corresponding ADD BAPI.

 

3. Be sure to call BAPI_TRANSACTION_COMMIT at the end to commit the data to the DB.

 

I hope this helps you.

 

Cheers,

Rishu."


Viewing all articles
Browse latest Browse all 3189

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>