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_PO_CREATE1 FAILURE exception raised

Former Member
0 Likes
1,590

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
Read only

Former Member
0 Likes
997

Hi Bogdan,

Yes you should call it everytime you call the bapi

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

5 REPLIES 5
Read only

Former Member
0 Likes
998

Hi Bogdan,

Yes you should call it everytime you call the bapi

Read only

0 Likes
997

Hi Ravi,

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

10q

Read only

0 Likes
997

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

Read only

0 Likes
997

Ravi, Thank you a lot!

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

Bogdan

Read only

0 Likes
997

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.