cancel
Showing results for 
Search instead for 
Did you mean: 

Error in goods receipt with PO

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Check for movement indicator in mseg table.

Regards,

Siddhesh S.Tawate

Former Member
0 Kudos

hi siddhesh,

I checked in MSEG table the movement indicator field is 'B' that is goods movement with PO. I still getting the same issue..

Thanks & Regards,

karthik.

Former Member
0 Kudos

Hi,

At this point of time what I can think of is either the movement indicator or deletion indicator.

Regards,

Siddhesh S.Tawate

Former Member
0 Kudos

Hi,

I checked all every thing is ok.Then what may be the reason for the error..

Thanks&Regards,

karthik

Former Member
0 Kudos

Hi,

In that case you need to debug inside to chk for the reason.

It is quiet possible that the first FM ( or BAPI ) might not give you the exact error... so you would need to go inside that to chk for the error.

Hope it helps.

Regards,

Siddhesh S.Tawate

Former Member
0 Kudos

Hi,

What u mean by deletion indicator.I cant find a field with that description.

I am trying to debugg.

Thanks & Regards,

karthik.

Former Member
0 Kudos

Hi,

ekpo-lokez field... this is at item level.

ekpo-lokez = 'X' or 'L'

indicates that item is marked for deletion in your PO.

Regards,

Siddhesh S.Tawate

Former Member
0 Kudos

Hi,

Thanks for ur immediate response.

This field ekpo-lokez is blank for my PO.

Is this the reason for my error.If so what to do...

The movement type is '122' and i am specifying the GM_CODE = '02' ,is this correct.

Thanks & Regards,

Karthik

Edited by: karthi keyan on Mar 27, 2008 11:24 PM

Former Member
0 Kudos

Use goodsmvt_code = '01' for goods movement 122

Former Member
0 Kudos

Hi ken,

Thanks for ur reply.

I changed the GM code to '01' already. But still i am getting the same error.

What may be missing.. please suggest.

Thanks & Regards,

karthik.

Former Member
0 Kudos

I am not sure why you are getting your error. Can you send me your code? My email address should be available in my profile. Also, please send me the message number with the exact message you get in table RETURN.

Former Member
0 Kudos

Please Review my code in mail.

Former Member
0 Kudos

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.

Former Member
0 Kudos

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