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 Works on the First Loop

Former Member
0 Likes
750

Dear all,

I have several data in a internal table, base on the data on the internal table I'm using BAPI_PO_CREATE1 to create purchase order.

On my first loop in the internal table, the BAPI_PO_CREATE1 was able to create the first PO. However, for the subsequent loops (second, third etc...) BAPI_PO_CREATE1 was not able to create PO. I have debugged and found out that the KOMP-NETPR has no value & I'm getting an error message "Net price must be greater than 0".

I also tried to pass some value on the net price in the POITEM table of the BAPI_PO_CREATE1 but it doesn't work.

I can't figure out where & why KOMP-NETPR has no value and I also don't know why the first loop always work.

Please shed some light on this. Thanks in advance.

Dear all,

I have several data in a internal table, base on the data on the internal table I'm using BAPI_PO_CREATE1 to create purchase order.

On my first loop in the internal table, the BAPI_PO_CREATE1 was able to create the first PO. However, for the subsequent loops (second, third etc...) BAPI_PO_CREATE1 was not able to create PO. I have debugged and found out that the KOMP-NETPR has no value & I'm getting an error message "Net price must be greater than 0".

I also tried to pass some value on the net price in the POITEM table of the BAPI_PO_CREATE1 but it doesn't work.

I can't figure out where & why KOMP-NETPR has no value and I also don't know why the first loop always work.

Please shed some light on this. Thanks in advance.

3 REPLIES 3
Read only

Former Member
0 Likes
595

Talk to functional team. There could be some descrepancy in "Pricing Procedure"

SKJ

Read only

0 Likes
595

Hello SKJ,

Thank you for your reply. However, the functional consultant insists that all the pricing are well maintained.

I came across a post in this forum with the same problem, they said that they refreshed the buffer/memory for every call on the bapi_po_create1.

I did put this line of code:


PERFORM mepo_refresh(saplmepo).
CALL FUNCTION'BAPI_PO_CREATE1'.

But it didn't work either.

Edited by: totoy_ on Nov 30, 2011 2:41 AM

Read only

0 Likes
595

Hi,

Please refer the link below ignoring the service limits section. There are some points to look for the BAPI.

Link: []

If you still have some doubts, please post your code as I feel some data passed to the BAPI is not getting cleared or is passed incorrectly in the subsequent loop passes.

Regards,

Pranav.