‎2011 Mar 21 9:02 AM
Hi!!
I have a problem when creating a purchase order from bapi_po_create1 because commitment is not created. I mean, a purchase order is generated but when I enter CJI5 to check commitment, It was not updated. If a create a purchase order from ME21N, commitment is created on CJI5 and I need the same behaviour with the bapi...Any orientation about what is happening?
Please, if anybody can help I'd be grateful!
‎2011 Mar 21 9:10 AM
Hi
Are you using the COMMIT WORK after the BAPI bapi_po_create1 ??
If not please try by using BAPI_TRANSACTION_COMMIT after the first bapi call.
Regards
HM
‎2011 Mar 21 10:06 AM
‎2011 Mar 21 10:31 AM
Hi,
Hope you are not passing TESTRUN = 'X',it should be SPACE.
WIth BAPI_TRANSCTION_COMMIT it should work.
Regards,
Ankit.
‎2011 Mar 21 11:58 AM
The Bapi creates the PO ok (except for de Commitment document), the problem is not commit or test option.
‎2011 Mar 21 10:27 AM
‎2011 Mar 21 11:57 AM
Hi!
G/L Account is filled ok. The unique difference between a po created through ME21N and other created by BAPI is that AC Commitment Documents is not created with Bapi (with ME21N is created). I'm wondering if it'd be a customizing aim...
‎2011 Mar 22 6:51 AM
see the following Example:
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = header
poheaderx = headerx
IMPORTING
exppurchaseorder = p_pono
TABLES
return = return
poitem = it_item
poitemx = it_itemx.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = BAPIRETURN.
write:/ p_pono.
‎2011 Mar 22 4:59 PM
The BAPI CALL and BAPI_TRANSACTION_COMMIT are both defined.That's not the problem. The purchase order is created and I can display it trhough ME23N, the problem comes when I go to Menu Environment/AC commitment document and Nothing appears when select. The commitment document is missing. Otherwise, creating a purchase order from ME21N I get that AC commitment document.
any idea?