Application Development 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: 

Problem calling bapi_network_maintain and wait up to 1 second

0 Kudos
332

Hi all!. We are calling bapi_network_maintain in our development as_

bapi_network_maintain (...)

source code

bapi_network_maintain (...)

source code...

First we tried to use bapi_transaction_commit with wait = X and we had locks problem.

After we tried to use wait up to 1 second instead bapi_transaction_commit and in our development system worked. But now we transport the report to our test system and it doesn't work.

As you imagine a wait up to 2 second is not the solution.

Also we saw that bapi_network_maintain has in its code commit included but not all of them are with wait option. So we don't know if this could be a problem but we thinks more people could have our same issue!.

Pleaaaaaseeeeee, help!!!!

Thanks a lot,

Ana.

4 REPLIES 4

former_member555112
Active Contributor
0 Kudos
165

Hi,

Try as follows:-

CALL FUNCTION 'BAPI_NETWORK_MAINTAIN'

IMPORTING

RETURN = itab_return

TABLES

i_method_project = itab

EXCEPTIONS

OTHERS = 35.

Regards,

Ankur Parab

Former Member
0 Kudos
165

hai,

as the data base locks are not released and u r trying to call again the bapi ,

there is no need to use separate transaction commit for the same , just instead of using save method use saveand wait method , and instead of callign separately why dont u call mulitple networks with single bapi call,

regards

m.a

0 Kudos
165

It's a long history.

We need to change dates for all networks in a project. So we realised only dates are correct if we call bapi_network_maintain twice. We send a message to SAP and they tell us is caused for our customizing. For me is not a correct behaviour because in online transaction it works fine, but arguing with SAP is very hard, so finally we put two calls and it works. The problem is we have to put wait up to 1 second between calls to bapi_network_maintain and it seems one seconds are not always enough...

Aggggg!!!! sometimes simple things in abap become so difficult....

Thanks for your help!!!!!!!!

0 Kudos
165

hai ,

you are right u face a problem for this, due to customising automatically dates are fetched based on project profile , and u have to update it again, we too faced the same problem as actual dates were not updated when activites were created as the dates were assigned due to customisin so again we called the bapi to update the dates , so u have to wait till the earlier data is written in data base,

and if for the same if u try in debug it will run successfully even though u ditn maintian any wait,

so u haev to provide wait statement between two calls and it depends on how much data u r writing in sap, we were able to write around 2000 to 5000 activities at a time, u cn aprovide wait up to 5 seconds which will be fien enough

regards

m.a