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 Errors

Former Member
0 Likes
6,771

Hi,

I'm creating a PO via IDOC programmatically from a file. I'm getting the following errors....ive pulled them from the BAPI output. I compared my inputs against another program in the system that does a straight BAPI PO Create (no idoc) and im not seeing what else is missing. Ive made sure the X structures are correct etc. the errors relate to segments that im not even populating and that aren't mandatory (theyre not populated in the upload program that works fine). I would appreciate any help.

1 E MEPO 085 Check item number 0 in table POADDRDELIVERY
2 E MEPO 085 Check item number 0 in table POACCOUNTPROFITSEGMENT
3 E MEPO 085 Check item number 0 in table POCOMPONENTS
4 E MEPO 085 Check item number 0 in table POCOMPONENTSX
5 E MEPO 085 Check item number 0 in table POITEMSHIP
6 E MEPO 085 Check item number 0 in table POITEMSHIPX
7 E MEPO 085 Check item number 0 in table POTEXTITEM
8 E MEPO 085 Check item number 0 in table POEXPIMPITEM
9 E MEPO 085 Check item number 0 in table POEXPIMPITEMX
10 W 06 028 Purchase order date is in the past
11 W ME 887 Error transferring ExtensionIn data for enhancement CI_EKKODB
12 E BAPI 001 No instance of object type PurchaseOrder has been created. External reference:
13 E MEPO 001 Purchase order item 00001 still contains faulty schedule lines
14 W 06 207 Effective price is 37.22 EUR, material price is 16.81 EUR
15 I 06 045 Net price for item 00001 taken from conditions
16 E 06 722 Material FSN0611 not included in source list despite source list requirement

ADDITIONAL INFO: When I debugged I noticed that all these tables have 1 line in them, with no data. I haven't added those lines...so that's why its referring to item 0. If none of these tables had these blank lines then I would only have 1 VALID error (the material number one - 16 above)

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
4,450
' Check item number 0 in table POxxxx

How did you fill/handle the item number field PO_ITEM

  • in the many table parameters related to items?
  • In many segments
' Error transferring ExtensionIn data for enhancement CI_EKKODB

How did you fill/handle header customer fields

  1. EXTENSIONIN structures BAPI_TE_MEPOHEADER[X]
  2. IDOC segment E1BPPAREX

So first, could you elaborate on: I'm creating a PO via IDOC programmatically from a file.

7 REPLIES 7
Read only

RaymondGiuseppi
Active Contributor
0 Likes
4,451
' Check item number 0 in table POxxxx

How did you fill/handle the item number field PO_ITEM

  • in the many table parameters related to items?
  • In many segments
' Error transferring ExtensionIn data for enhancement CI_EKKODB

How did you fill/handle header customer fields

  1. EXTENSIONIN structures BAPI_TE_MEPOHEADER[X]
  2. IDOC segment E1BPPAREX

So first, could you elaborate on: I'm creating a PO via IDOC programmatically from a file.

Read only

0 Likes
4,450

headerx.pngheader.pngHere is the data for header and item attached I can send rest if needed. Just to re-cap when I clear the above tables in the BAPI it all posts fine. so it proves data is correct, as im not populating the above segments at all. that's the strange thing . you can ignore

EXTENSIONIN structures BAPI_TE_MEPOHEADER[X] as this is a warning, see above. And I don't fill

E1BPPAREX


Im doing all this in we19 and bd87

Read only

0 Likes
4,450

itemx.pngitem.png sorry would let me attached items

Read only

0 Likes
4,450

For your reference: you can export an IDOC to XML, Excel or flat file in the WE02 menu (display idoc, pront idoc, list, export)

Could you post more relevant parts of your custom program that create IDOC or compare yourself with a standard form as SEND_PORDCR1 of program BUS2012_ICH_R3

  • This program creates an IDOC from an existing PO for replication, but as you got another program that call the creation BAPI, you can generate easily same data that the one returned by the read BAPI. I would suppose you didn't pass some parameterX table that the IDOC requires even if optional in create BAPI.
Read only

0 Likes
4,450

we02.txt

I'm actually creating it directly in WE19. once I get that working I can program it.

it is strange that it does post fully once I clear those tables (that are not populated in we19).we19.png

Read only

4,450

Try to delete in WE19 screen the segment you don't want to fill yet (else they will be passed with initial value)

Read only

0 Likes
4,450

Thank you, you are correct. WE19 should only have the segment I populate.