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

BAPI_BUPA_FS_CREATE_FROM_DATA2 BP Number Ranges problem

0 Likes
3,890

Hi Experts,

We have the requirement to create an upload tool for our Master Data Team so that in future they can upload the Business Partners via Excel instead of entering them manually.

For this requirement we use BAPI_BUPA_FS_CREATE_FROM_DATA2. We devised a way to run the BAPI also in test modus, so that the user first can test if all data are correct.

We are faced with an important issue for this. When we create the Business Partners in test modus they are assigned already a BP range (8990 to 8999). Now the problem is that the BAPI apparently stores the BP ranges it creates in test modus (Note: they are not actually created, so they cannot be displayed via BP, but it apparently assigns already a BP number to it).

When actually running the program in production run the program creates a new BP number range (BP form 9000 to 9010 e.g.).

This will give number range gaps in the BP which is off course not acceptable.

Kr,

Stef

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,310

Hi,

The reason for this is, system is allocating the number from number range (Creating BP) and since you are not doing 'bapi_transaction_commit' at the end of the program these are not updated in the tables(rolled back) and yet system consumes the number range.

Hope this helps!

Reetesh

7 REPLIES 7
Read only

Former Member
0 Likes
2,312

Hi,

The reason for this is, system is allocating the number from number range (Creating BP) and since you are not doing 'bapi_transaction_commit' at the end of the program these are not updated in the tables(rolled back) and yet system consumes the number range.

Hope this helps!

Reetesh

Read only

arseni_gallardo
Active Participant
0 Likes
2,310

Try this: go to transaction SNRO and edit number range BU_PARTNER. The standard value for field 'Number of numbers in buffer" is 10. Change it to 1.

If the BAPI test is not successful remember to perform a ROLLBACK WORK so that the system does not update table NRIV

If still does not work then try to deactivate buffering (menu Edit->Setup Buffering->No buffering) because that is the way that FI number ranges work.

Edited by: Arseni Gallardo on Nov 17, 2011 7:09 PM

Read only

0 Likes
2,310

I don't think for a testing scenario it is recommended to stop buffering of number ranges; if you create BP partner through T-code this will not happen.

If you are testing thru SE37 use test sequence, where you enter your BAPI and then call commit bapi in sequence.

Reetesh

Read only

Former Member
0 Likes
2,310

This doesn't seem right to me. There are a number of notes related to number ranges when simulating, so I think you should send this to OSS.

Rob

Read only

0 Likes
2,310

Hi All,

Thanks for help

The developer tested and said:

in program the u2018bapi_transaction_commitu2019 is executed after every call of the u2018bapi_bupa_fs_create_from_data2u2019,

Regardless of the execution mode.

Somebody any other ideas?

kr,

Stef

Read only

0 Likes
2,310

Hi,

What is the return parameter message?

If BP`s are not created properly, use BAPI_TRANSACTION_ROLLBACK to roll back.

Reetesh

Read only

Former Member
0 Likes
2,310

Hi Stef

Just a sggestion, why dont you copy the standard BAPI in a ZBAPI of your own, and probably put a flag distinguishing the test run from the actual run, and call the commit work (BAPI_TRANSCTION_COMMIT) conditionally !

Hope it helps

Rgds

Sameer