on 03-27-2008 1:34 PM
Hi experts,
I am getting the following error,when trying goods receipt with Purchase Order using BAPI_GOODSMVT_CREATE.
"No goods receipt possible for pruchase order XXXXXX".
What may be the reason for this,its urgent please help.
Thanks & Regards
Karthik
Hi,
Check for movement indicator in mseg table.
Regards,
Siddhesh S.Tawate
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just got the error message in the email. Here is a sample code for movement type 122. Replace all the XXXX values with values from your system.
Also as a sanity check make sure that the PO/Item you are testing with can be returned back to the vendor - use MB01 to make sure this movement type is successful for your PO/Item.
DATA: w_goodsmvt_header LIKE bapi2017_gm_head_01,
w_goodsmvt_code LIKE bapi2017_gm_code,
i_return LIKE bapiret2 OCCURS 0.
DATA: BEGIN OF i_goodsmvt_item OCCURS 0.
INCLUDE STRUCTURE bapi2017_gm_item_create.
DATA: END OF i_goodsmvt_item.
DATA: w_extnumber TYPE bal_s_log-extnumber.
DATA: w_goodsmvt_headret LIKE bapi2017_gm_head_ret,
w_materialdocument LIKE bapi2017_gm_head_ret-mat_doc,
w_matdocumentyear LIKE bapi2017_gm_head_ret-doc_year.
CLEAR: w_goodsmvt_header,
i_goodsmvt_item,
i_goodsmvt_item[],
i_return[].
MOVE sy-datum TO w_goodsmvt_header-pstng_date.
w_goodsmvt_code = '01'. "MB01
i_goodsmvt_item-material = 'XXXXXX'. "material number
i_goodsmvt_item-plant = 'XXXX'. "Plant that originally recieve this PO
i_goodsmvt_item-stge_loc = 'XXXX'. "Storage loc
i_goodsmvt_item-entry_qnt = 1.
i_goodsmvt_item-entry_uom = 'XXX'.
i_goodsmvt_item-entry_uom_iso = 'XXX'.
i_goodsmvt_item-po_number = 'XXXXXXXXXX'.
i_goodsmvt_item-po_item = 'XXXXX'.
i_goodsmvt_item-move_type = '122'.
i_goodsmvt_item-mvt_ind = 'B'.
i_goodsmvt_item-move_reas = '1'. "or whatever reason allowed for 122
APPEND i_goodsmvt_item.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = w_goodsmvt_header
goodsmvt_code = w_goodsmvt_code
testrun = 'X' "turn this off once I_RETURN comes back empty
IMPORTING
goodsmvt_headret = w_goodsmvt_headret
materialdocument = w_materialdocument
matdocumentyear = w_matdocumentyear
TABLES
goodsmvt_item = i_goodsmvt_item
return = i_return.
BREAK-POINT.
Hi Karthi,
The best trouble shooting is try to create a goods receipt using the SAP GUI T-code MIGO instead of calling the BAPI . You will come to know detailed erroe description and we can easily fix it. There may be lot of reasons that can prevent the creation of the goods receipt.
Thanks,
Greetson
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.