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 not able to create PO

Former Member
0 Kudos

Hi,

We have two systems:

A

SAP ECC 6.0

SAP_ABA 701

SAP_APPL 604

EA-APPL 604

B

SAP ECC 6.0

SAP_ABA 702

SAP_APPL 605

EA-APPL 605

In system A, we have a program that creates a PO using BAPI_PO_CREATE1, and it is able to do so. In system B, we have the same program in system A and it is not able to create a PO. It is giving the following error messages:

E MEPO 000 Purchase order still contains faulty items

E BAPI 001 No instance of object type PurchaseOrder has been created. External Reference:

E SE 337 Please enter a line number

W 06 744 Delivery of item 00010 of document already copleted

Appreciate your inputs on what might be causing the errors. Thanks.

1 ACCEPTED SOLUTION

0 Kudos

Hi,

You use Tcode me21n to create po using appropiate Items details.

Then you go to bapi_po_create to pass the same value .

Go to documentation of bapi_po_create for more details.

pass correct materials no, quantity, etc in item fields to generate po no.

Parameter: POHEADER

COMP_CODE = 1000

DOC_TYPE = NB

ITEM_INTVL = 00001

VENDOR = 0000001000

PMNTTRMS = 0001

PURCH_ORG = 1000

PUR_GROUP = 001

CURRENCY = EUR

Parameter: POHEADERX

COMP_CODE = X

DOC_TYPE = X

ITEM_INTVL = X

VENDOR = X

PMNTTRMS = X

PURCH_ORG = X

PUR_GROUP = X

Parameter: POITEM

PO_ITEM = 00001

MATERIAL = 100-100

PLANT = 1000

STGE_LOC = 0001

QUANTITY = 15.000

TAX_CODE = V0 hanks

ITEM_CAT = 0

ACCTASSCAT = K

Parameter: POITEMX

PO_ITEM = 00001

MATERIAL = X

PLANT = X

STGE_LOC = X

QUANTITY = X

TAX_CODE = X

ITEM_CAT = X

ACCTASSCAT = X

Regards

Abdul

7 REPLIES 7

0 Kudos

can you provide parameters & values passed to bapi ??

0 Kudos

Did you try to create PO with the same items via transaction?

As it mentions faulty items you should get an error there too.

Best regards,

Oliver

0 Kudos

Hi,

You use Tcode me21n to create po using appropiate Items details.

Then you go to bapi_po_create to pass the same value .

Go to documentation of bapi_po_create for more details.

pass correct materials no, quantity, etc in item fields to generate po no.

Parameter: POHEADER

COMP_CODE = 1000

DOC_TYPE = NB

ITEM_INTVL = 00001

VENDOR = 0000001000

PMNTTRMS = 0001

PURCH_ORG = 1000

PUR_GROUP = 001

CURRENCY = EUR

Parameter: POHEADERX

COMP_CODE = X

DOC_TYPE = X

ITEM_INTVL = X

VENDOR = X

PMNTTRMS = X

PURCH_ORG = X

PUR_GROUP = X

Parameter: POITEM

PO_ITEM = 00001

MATERIAL = 100-100

PLANT = 1000

STGE_LOC = 0001

QUANTITY = 15.000

TAX_CODE = V0 hanks

ITEM_CAT = 0

ACCTASSCAT = K

Parameter: POITEMX

PO_ITEM = 00001

MATERIAL = X

PLANT = X

STGE_LOC = X

QUANTITY = X

TAX_CODE = X

ITEM_CAT = X

ACCTASSCAT = X

Regards

Abdul

former_member219399
Active Participant
0 Kudos

Hi,

Check if external services is active and you are trying to create some external services in the PO.

Also check if similar configuration exists in anohter system also.

With regards,

Vamsi

in Inclkude LMLSPF36, subroutine CHECK_EXTROW

0 Kudos

Thanks everyone for replying. Here's how I'm calling the BAPI. I've checked the contents and the fields with values are matching the corresponding fields with 'X'.

CALL FUNCTION 'BAPI_PO_CREATE1'

EXPORTING

poheader = i_poheader

poheaderx = i_poheaderx

IMPORTING

exppurchaseorder = l_purchaseorder

TABLES

return = i_return

poitem = i_poitem

poitemx = i_poitemx

poaccount = i_poaccount

poaccountx = i_poaccountx

poservices = i_poservices

posrvaccessvalues = i_posrvaccessvalues.

Mohana, sorry for the trouble but what configurations should I check? And you are right, I am getting the error in include

LMLSPF36, subroutine CHECK_EXTROW. It means extrow should be filled in?

0 Kudos

Hi,

Please check with your functional people. I think extrow this should get filled. this may dependent on PO type or item category.

Inbetween I will check and let you know if get any clues.

With regards,

Vamsi

Former Member
0 Kudos

This is now solved. The EXT_LINE in POSERVICES should be filled up and not just LINE_NO. They should have the same value.

In the other program in the old system, this field was not required that's why there were no errors previously. Thanks everyone.