09-08-2010 5:59 PM
Hello Experts,
I am creating PO's from the se38 program where in i have the option to select either simulation or a PO creation on the screen. In simulation i am checking the test run flag and giving the bapi return as output. So when i am doing a test run i am able to see the success message that the Function "Create purchse Order " performed in test run. But when i hit the create PO for the same details it is giving me a error message "No instance of Object type Purchase Order has been created. External referance:". There is field by name acknowl_no in poitem table of the FM by passing which i used to get the PO created prviously but now it should not be populated from the program for creating create On Hold PO. I am passing the all the check tables properly, (i hope that the field is not mandatory as in the FM documentation it was not mentioned so)
Any help is aprpreciated.
I guess there are several questions asked on this and i also searched for the same but i didnt found any one matching my requirement which made me to rise this question.
09-10-2010 8:25 PM
Hello Uday!
After the unsuccessful call to BAPI_PO_CREATE1 are you getting the table RETURN with only 1 row?
Please check if the BAPI are retuning more rows in the table RETURN with others error messages.
Best Regards.
Claudio (Aparatey)
09-20-2010 1:00 PM
in BAPI u pass hear, headerx, and item level data and then after check then return message.
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.
Edited by: kk.adhvaryu on Sep 20, 2010 2:00 PM
11-01-2010 10:38 AM
I found out a solution, as we need to create On Hold PO there are few flags by setting which we can create the On Hold PO even if the PO is having errors.