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: 

BAPI_PO_CREATE1 FAILURE exception raised

Former Member
0 Kudos

Hello all,

I'm using FM BAPI_PO_CREATE1 to create purchase orders. The function works fine for one order.

In a loop I have to create more than one orders and when the FM(BAPI_PO_CREATE1) is call for the second order is raised RAISE_EXCEPTION (Exception condition "FAILURE" raised.)

Can you tell which is the cause of this exception or how to fix this problem? Should I call BAPI_TRANSCATION_COMMIT after all the FM calls?

Thank you!

Bogdan

1 ACCEPTED SOLUTION

former_member181962
Active Contributor
0 Kudos

Hi Bogdan,

Yes you should call it everytime you call the bapi

5 REPLIES 5

former_member181962
Active Contributor
0 Kudos

Hi Bogdan,

Yes you should call it everytime you call the bapi

0 Kudos

Hi Ravi,

The commit is called after all calls, but still doesn't work.

10q

0 Kudos

Hi Bogdan,

The Failure can be arising for variuos reasons as well.

Are you sure, you are refreshing the Bapi structure and internal tables for each loop pass?

Regards,

Ravi

0 Kudos

Ravi, Thank you a lot!

Yes, you were right,instead refersh i used clear ).

Bogdan

0 Kudos

Hi Bogdan,

I am getting the same error as you got FAILURE Exception. you are asked to refresh internal table but where do i refresh. if i refrresh the table in loop pass the purpose of loop is not served.Could you please send me the sample code of where to refresh..

Thanks a lot.

Santosh Kotra.