Application Development and Automation 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: 
Read only

Transaction code BP

Former Member
0 Likes
605

Hi,

we are using the transaction code "BP" for business partner creation and unlike XD01 we do not have the functionality of "create with reference" option while creating a new partner as part of standard SAP here.

Can anybody help in any stategy on how to implement this functionality.

Any ideas will be of great help.

Thanks,

Kiran

2 REPLIES 2
Read only

Former Member
0 Likes
542

I think you can not create the BP wrt the other here.

For any help,

http://help.sap.com/printdocu/core/Print46c/EN/data/pdf/CABP/CABP.pdf

Read only

Former Member
0 Likes
542

Hi Kiran,

There is no option in the standard to create a BP as a reference to another BP. You would need to implement this functionality separately by copying the new BP from the old BP using a Z report.

Here's how you can copy the BP :

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 correspinding ADD BAPI.

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

Also, please refer to thread []

This has some discussions on a similar point, so it might provide some more concepts.

Hope this helps you .

Cheers,

Rishu.