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 - Error Handling

Former Member
0 Kudos
219

Hi,

During creation of a POs using BAPI_PO_CREATE1, if there is a error in the first PO then the BAPI is not processing the next records. Only the errors of the first record is repeated for all the iterations. I found that this happens only if a Purchase requisition is given during the creation.

Please provide your valuable inputs on this.

Thanks,

Vijay

3 REPLIES 3

Former Member
0 Kudos
79

Hi Vijay,

can you place the code how you are using bapi, and if any record fails you can move it to the BAPIRETURN table and you can process next record.I can help you on this issue if you plac the code and flat file input and what error it is showing.

Regards,

Ravi

former_member222709
Contributor
0 Kudos
79

Hi Vijay,

If the same error is getting repeated, I believe it's the internal tables (Table paramaters) & header data that is not being cleared by you.

To verify put a breakpoint at the loop start & at the FM BAPI call. Ensure that your data in the internal tables are cleared at the start of every loop pass and the data for the next PO's are then passed. There is a possibility that your data might be incorrect and hence, the same error.

Finally, I've used BAPI_PO_CREATE1 with PR reference and found absolutely no issues in subsequent loop passes after an error. Also, clarify the error with a Functional Consultant or you can post your code and error.

Regards,

Pranav.

Former Member
0 Kudos
79

Hi,

Plase follow the link

Regards

kk