‎2010 Nov 20 10:24 AM
Dear All,
I am usinf Bapi to create Open PO the error is coming
that,
Purchase order still contains faulty items
No instance of object type PurchaseOrder has been created. External refer
I create the PO manually with same data there is no error found.
Why this error is comimg,
Please suggest me .
POHEADER-DOC_DATE = TAB-DOC_DATE.
POHEADER-DOC_TYPE = TAB-DOC_TYPE.
POHEADER-CREAT_DATE = SY-DATUM.
poheader-comp_code = TAB-CO_CODE.
POHEADER-PURCH_ORG = TAB-PURCH_ORG.
POHEADER-PO_NUMBER = TAB-PO_NUMBER.
POHEADER-PUR_GROUP = TAB-PUR_GROUP.
POHEADER-VENDOR = TAB-VENDOR.
POHEADER-PMNTTRMS = TAB-PMNTTRMS.
POHEADER-INCOTERMS1 = TAB-INCOTERMS1.
POHEADER-INCOTERMS2 = TAB-INCOTERMS2.
POHEADERX-DOC_DATE = 'X'.
POHEADERX-DOC_TYPE = 'X'.
poheaderx-comp_code = 'X'.
POHEADERX-PURCH_ORG = 'X'.
POHEADERX-PO_NUMBER = 'X'.
POHEADERX-PUR_GROUP = 'X'.
POHEADERX-VENDOR = 'X'.
POHEADERX-PMNTTRMS = 'X'.
POHEADERX-INCOTERMS1 = 'X'.
POHEADERX-INCOTERMS2 = 'X'.
POHEADERX-CREAT_DATE = 'X'.
POHEADERX-ITEM_INTVL = 'X'.
APPEND POHEADERX.
POITEM-PO_ITEM = TAB-PO_ITEM.
POITEM-MATERIAL = TAB-MATERIAL.
POITEM-EMATERIAL = TAB-PUR_MAT.
POITEM-ITEM_CAT = TAB-ITEM_CAT.
POITEM-PLANT = TAB-PLANT.
POITEM-NET_PRICE = TAB-NET_PRICE.
POITEM-TAX_CODE = TAB-TAX_CODE.
POITEM-QUANTITY = TAB-QUANTITY.
POITEM-ACCTASSCAT = TAB-KNTTP.
POITEM-STGE_LOC = TAB-LGORT.
POITEM-PREQ_NAME = TAB-AFNAM.
append POITEM.
POITEMX-PO_ITEM = TAB-PO_ITEM.
POITEMX-PO_ITEMX = 'X'.
POITEMX-MATERIAL = 'X'.
POITEMX-EMATERIAL = 'X'.
POITEMX-ITEM_CAT = 'X'.
POITEMX-PLANT = 'X'.
POITEMX-NET_PRICE = 'X'.
POITEMX-TAX_CODE = 'X'.
POITEMX-QUANTITY = 'X'.
POITEMX-ACCTASSCAT = 'X'.
POITEMX-STGE_LOC = 'X'.
POITEMX-PREQ_NAME = 'X'.
append POITEMX.
POSCHEDULE-PO_ITEM = TAB-PO_ITEM.
poschedule-delivery_date = TAB-DELIV_DATE.
POSCHEDULE-QUANTITY = TAB-QUANTITY.
append POSCHEDULE.
POSCHEDULEX-PO_ITEM = TAB-PO_ITEM.
poschedulex-PO_ITEMX = 'X'.
poschedulex-delivery_date = 'X'.
POSCHEDULEX-QUANTITY = 'X'.
append POSCHEDULEX.Edited by: kishan P on Nov 20, 2010 7:14 PM
‎2010 Nov 20 10:29 AM
More specific error message (Exact cause of error) will be there in RETURN structure. I think you have to pass the value to structure fields POSCHEDULE-SCHED_LINE & POSCHEDULEX-SCHED_LINE also.
‎2010 Nov 20 10:33 AM
Hi
In the schedule data try to transfer the schedule line number too: SCHED_LINE
Max
‎2010 Nov 20 10:48 AM
hi,
Thanks for your reply. i Changed but same error is coming
‎2010 Nov 20 10:54 AM
Check the records in internal table structure RETURN of BAPI. In addition to the error messages mentioned by you, there will be more records which will point to the exact cause of error.
‎2010 Nov 20 11:19 AM
hi,
all list of error i found are
Purchase order still contains faulty items
No instance of object type PurchaseOrder has been created. External refer
Missing authorization: Pur. Order Create Plant/StLoc. KW01/GS01
Net price for item 00010 adopted from last document
I check Authorization in SU 53 there
The last authorization check was successful
‎2010 Nov 20 11:30 AM
Missing authorization: Pur. Order Create Plant/StLoc. KW01/GS01there it is.
edit.
During a transaction/BAPI call several authorisation checks are carried out. If ht e last one was succesful, it doesn't mean others were succesful as well.
‎2010 Nov 20 12:03 PM
Hi
Missing authorization: Pur. Order Create Plant/StLoc. KW01/GS01
Don't you get this error with trx online?
Max