Hi Gurus,
Scenario: I am trying to post PO against Contract and then Goods receipt for the same
Problem: I am able to create PO but there is one field which is not getting checked automatically when create PO the field name is GR BasesIV (WEBRE). This field is there under Invoice tab for item)
Funny thing is I am able to update Final Invoice field in same tab exactly above that field. If i don't check this field i can't post GR. Ofcourse there is one more field Goods Receipt (this field is under Delivery tab) which I am able to check using BAPI_PO)CHANGE
Could somebody please tell me if anybody faced this problem or is this some config issue?
Below is my code for BAPI_PO_CHANGE.
clear BAPIMEPOITEM.
BAPIMEPOITEM-PO_ITEM = '00001'.
BAPIMEPOITEM-INFO_UPD = 'X'.
BAPIMEPOITEM-GR_IND = 'X'.
BAPIMEPOITEM-IR_IND = 'X'.
BAPIMEPOITEM-GR_BASEDIV = 'X'.
append BAPIMEPOITEM.
clear BAPIMEPOITEMX.
BAPIMEPOITEMX-PO_ITEM = '00001'.
BAPIMEPOITEMX-INFO_UPD = 'X'.
BAPIMEPOITEMX-GR_IND = 'X'.
BAPIMEPOITEMX-IR_IND = 'X'.
BAPIMEPOITEM-GR_BASEDIV = 'X'.
append BAPIMEPOITEMX.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
PURCHASEORDER = VBELN
TABLES
RETURN = bapireturn2
POITEM = BAPIMEPOITEM
POITEMX = BAPIMEPOITEMX.
BAPI commit
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
wait UP TO 5 SECONDS.
Thanks
sarath