‎2008 May 22 6:07 PM
Hello friends ,
I have a weird thing going on . I used BAPI_PO_CREATE .
When I look a the return table it displays message . Standard PO created .
I then using BAPI_TRANSACTION_COMMIT to commit it to the database .
After running the above Z program .
When I go and alook for that po number in me23 or me23n or in table EKPO it says no document found .
But if i check it after 2 - 3 minutes it shows the records in the database .
Is this usual to not be able to see the document saveed immediately after its creation ?
When I create a PO manually using me21 it save immediately .
Please advise .
Thanks,
Teresa
‎2008 May 22 6:11 PM
‎2008 May 22 6:11 PM
‎2008 May 22 6:21 PM
Yes . I am passing the wait parameter . One more thing the BASIS Team applied some oracle patches recently .
Here is a snap shot of my code .
CALL FUNCTION 'BAPI_PO_CREATE'
EXPORTING
PO_HEADER = LS_PO_HEADER
PO_HEADER_ADD_DATA = LS_PO_HEADER_ADD
IMPORTING
PURCHASEORDER = L_PURCHASEORDER
TABLES
PO_ITEMS = LT_PO_ITEMS
PO_ITEM_ADD_DATA = LT_PO_ITEMS_ADD
PO_ITEM_SCHEDULES = LT_PO_ITEMS_SCHED
RETURN = LT_RETURN.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
Thnx
‎2008 May 22 6:39 PM
Hello Teresa,
as far as I remember, you don't have to use the "BAPI_TRANSACTION_COMMIT" after using the "BAPI_PO_CREATE", as the "BAPI_PO_CREATE" performs the "Commit", when no errors occur (there's also an OSS note about this, as it's not "BAPI-Standard").
I would try w/o using "BAPI_TRANSACTION_COMMIT".
Best regards
Stephan