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 - How to get error PO item number

Former Member
0 Kudos

All,

I am using BAPI_PO_CREATE1. When PO is errored out, RETURN structure returns PO number with list of errors and warnings.

It says, 'PO contains still faulty items' but does not return specific item number.

I need error PO item number too. Any help?

Thanks,

SKJ

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello SKJ,

Check the following fields on the BAPI return table structure:

MESSAGE_V1

MESSAGE_V2

MESSAGE_V3

MESSAGE_V4

You may have some information regarding the line items.

Thanks,

Greetson

8 REPLIES 8

Former Member
0 Kudos

Hello SKJ,

Check the following fields on the BAPI return table structure:

MESSAGE_V1

MESSAGE_V2

MESSAGE_V3

MESSAGE_V4

You may have some information regarding the line items.

Thanks,

Greetson

0 Kudos

No luck. Any other help?

Former Member
0 Kudos

hi debug the bapi with the given input values....then it is very easy to find out the mistake where it was....did you used the commit work after the badi........

Former Member
0 Kudos

Hi,

In the return internal table ..there is a column ROW which might have the line item..

Thanks

Naren

Former Member
0 Kudos

In the RETURN table which is of BAPIRET2 structure, there are 2 fields PARAMETER, ROW. Parameter gives the Table name which has the error and the ROW field gives the row number in that particular table. for eg: PARAMTER = 'POITEM' and ROW = '2' means the error corresponds to line number 2 in the POITEM table.

If these 2 fields are not populated, then it is an error in the header

Hope this helps,

Regards,

Hari

Former Member
0 Kudos

All,

Yes i found the field ROW in RETURN structure while debugging it keenly. However, it does not return the actual PO item number.

Do we need to just assume that ROW = 2 indicates PO item 2 and so on?

Thanks,

SKJ

Former Member
0 Kudos

Hi,

I think the row number should match the PO item number..

THanks

Naren

0 Kudos

No.. it doesnt. Item numbers are something like 0010, 0040. But ROW is in sequence of integers 1, 2, 3 ...

Thanks,

SKJ