2023 Dec 01 10:02 AM
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
2023 Dec 01 12:22 PM
What's your version, did you look for OSS notes similar to 1678785 - BUPA_CREATE_FROM_DATA wastes BP numbers on Address errors ?
2023 Dec 01 12:22 PM
What's your version, did you look for OSS notes similar to 1678785 - BUPA_CREATE_FROM_DATA wastes BP numbers on Address errors ?
2023 Dec 01 4:47 PM
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.