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

Revert Bussines Partner generated with BAPI_BUPA_CREATE_FROM_DATA

juanmorales_s
Newcomer
0 Likes
1,666

I am currently using the BAPI BAPI_BUPA_CREATE_FROM_DATA for creating Business Partner. So far everything works fine, if you save information by doing a COMMIT at the end. When some information is incorrect, it generates the business partner number, my question is, is it possible to reverse it?

For example:
If I run the BAPI BAPI_BUPA_CREATE_FROM_DATA...

For example, if I run the BAPI BAPI_BUPA_CREATE_FROM_DATA with some incorrect data, BP 1100022 is created, it is in memory but not in the DB until I do a COMMIT. What I need to do is delete the number 1100022 so that the next BAPI BAPI_BUPA_CREATE_FROM_DATA is executed correctly it will be assigned the number 1100022

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,576

What's your version, did you look for OSS notes similar to 1678785 - BUPA_CREATE_FROM_DATA wastes BP numbers on Address errors ?

  • Look also at notes related to versoning and number range bufffering.

I am currently using the BAPI BAPI_BUPA_CREATE_FROM_DATA for creating Business Partner. So far everything works fine, if you save information by doing a COMMIT at the end. When some information is incorrect, it generates the business partner number, my question is, is it possible to reverse it?

For example:
If I run the BAPI BAPI_BUPA_CREATE_FROM_DATA...

For example, if I run the BAPI BAPI_BUPA_CREATE_FROM_DATA with some incorrect data, BP 1100022 is created, it is in memory but not in the DB until I do a COMMIT. What I need to do is delete the number 1100022 so that the next BAPI BAPI_BUPA_CREATE_FROM_DATA is executed correctly it will be assigned the number 1100022

2 REPLIES 2
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,577

What's your version, did you look for OSS notes similar to 1678785 - BUPA_CREATE_FROM_DATA wastes BP numbers on Address errors ?

  • Look also at notes related to versoning and number range bufffering.
Read only

thilakan_t
Participant
0 Likes
1,576

Reverting the generated number is not recommendable since it will lead to inconsistency.

Alternatively you can use class CL_MD_BP_MAINTAIN to create basic BP and with customer or vendor. Pass all the data to the deep structure and call method VALIDATE_SINGLE to validate all data at once. Call method MAINTAIN if validation successful. It will not create BP if there is any error.