Error while Goods receipt for rework order.

Dear all,
I have created one Rework order through TC CO07.
While doing Goods Receipt it gives Error Msg as following.
"No valid order items exist for order 200000203"
Message no. C6008
Regards
Atul

Dear,
There is only confirmation CO11N for the rework order. And good reciept MB31 for main order.
There is no GR for rework order. Once you confirm rework order,you need to do the GR for the balance qty of  main order or parent order.
And you need to priliminary settlement of rework order first in CO8B, hence the cost will be moved to parent order, then you settle parent order in KO88.
Hope clear to you.
Regards,
R.brahmankar

Similar Messages

  • Error: GR "Goods receipt for purch. order" is not allowed (ORD 4000048)

    Hi gurus, can anyone please help me
    while doing service entry for the PO with account assignment F and Item Category D
    our client is facing the error
    "Goods receipt for purch. order" is not allowed (ORD 4000048) MSG no: BS007
    Diagnosis
    The current status of object 'ORD 4000048' prohibits business transaction 'Goods receipt for purch. order'.
    Procedure
    To process business transaction 'Goods receipt for purch. order', you first have to change the status of object 'ORD 4000048' to allow the transaction 'Goods receipt for purch. order'.
    This gives you an overview of the system and user statuses that affect the transaction. A transaction can only be executed if there is at least one status that allows it and there is no status that forbids it.
    Anyone can give the solution please
    Guruk

    hi dear all
    Really thanks for your prompt reply.
    i solved this issue, as what u said, it is not released in IW31, at the time of PR creation. So i asked the User to go to IW32 anc choose the apprpriate order and change mode and click on Flag Icon to release.
    Any way i awarded points for your support
    Thanks
    regards
    Guru

  • Error during Goods Receipt for Production Order

    Hi All,
    When using MIGO to post Goods Receipt for a Production Order, I got a customize message saying that the posting is only available between 2010.08.25 to 2010.08.27.  I have checked in Business Add-in using SE19 but there are no implementation present.  I know that in Logistic Verification MIRO there is a transaction OMRM to set messages.  I would like to ask is there anything similar for MIGO.  
    Or is there any other place in Configuration which allows me to add these Customize message.
    Thanks.
    Edited by: jamison2004 jordan2004 on Jul 9, 2010 9:09 AM

    Hello Jiaul,
    Sorry I may have mislead you.  The actual error message is "Goods Receipt for Production Order XXXX can only be made on 2010.08.25 to 2010.08.27".  These two dates are the Start Date and FInish Date for the Production Order in CO03, 
    The Basic Start Date for the current Production Order is  2010.08.25
    The Basic Finish Date for the current Production Order is 2010.08.27
    I think what it means is that you can only Post Goods Receipt for the Production Order only after the Basic Start Date of the Production Order.  Do you know where I can find the configuration for this message?
    Thanks

  • Goods receipt  for purchase order not allowed for a particular wbs

    hello everybody..
    Am creating a good receipt for a purchase order using the T-CODE-: MIGO...
    While doing so am getting an error as " goods receipt  for purchase order not allowed(wbs element)".
    What can be done to rectify this error?
    Plz do help me....
    Regards,
    Deepika
    Moderator message: not directly related to ABAP development, please have a look in the appropriate functional forum, study the long text of this error message.
    Edited by: Thomas Zloch on Dec 1, 2010 5:52 PM

    Hi Br. Ajay M,
    Released the order and Status line as follow
    REL  AVAC BUDG GMPS
    but the error changed while reverse the document
    item 0001 Order is invalid.
    Many thanks for your kindly reply.
    regards,
    Steven

  • Goods receipt for purchase order is not allowed

    Hi,
    When I am doing the PO receipt i am facing the error message "Goods receipt for purchase order is not allowed WBS element xxxxxx"
    What could be the problem
    Thanks
    Lucky

    Hi,
    Please check the WBS element in CJ03, in Basic Data, System status,
    Is the WBS is not released or blocked.
    Hope it helps you.
    Thanks

  • Goods receipt for purch. order" is not allowed

    Hi Experts,
    I am using BAPI_GOODSMVT_CANCEL..and getting the below Error messege
    "Goods receipt for purch. order" is not allowed (NWA 9000275335 0020) 
    What is this (NWA 9000275335 0020)*
    i would like to ask how do i go about resolving the error message. Please help me.
    Thanks ,
    Silviya

    Hi,
    Thanks for your reply. I have checked Network & Activity in CJ20N. I dont know how to identify whterher it's defined correctly or not.
    Is any other way to solve this?  please help me.
    Advance thanks,
    Silviya

  • Error while doing Goods receipt for process order. Error code: "BS027"

    I am getting error while doing GR for a day whereas previous day(s) GR is already done and also 2 days post that day are also done successfully.
    Error :  ""Goods receipt for prodn. order" is not allowed (ORD XX-CEMTSAL) " (XX = First two characters of plant code)
    Error code: BS027.
    Thanks to all in advance.

    Hello,
    This issue would occur when you want to post a confirmation for a production order. The error message is generated if you wanted to post a backflush for a component and if this component was assigned to a sales order stock. The sales order itself was assigned to a work breakdown structure element which should be debited with the actual costs. However, the business transaction 'Confirm' is not permitted for a work breakdown structure.
    Please look into SAP Note 62367 and 64370
    Hope the information is helpful
    regards

  • Bins problem while creating goods receipt for production order.

    Hi All,
              I am facing a problem with selection of bins while creating goods receipt for production order in transaction MB31 and MBBE.
    The order of filling bins is with respect to storage Unit not by document no, Please suggest something.
    The scene is like that.
    The bins are not filled in the proper sequence, the system checks for the empty bins and filled those later on.
    like this,.
    Typ StorageBin  SC SS    Stock Avail.st BUn GR Date    DocumentNo Storage Unit         Time   
    SLoc Batch      Re IA PutawayS Pick qty Cert. No.                                                                               
    VN1 106A088                 0        0  CS  01/25/2010    4739297 1005721391           10:00:59
    100  0001020069            60        0                                                        
    VN1 107B076                 0        0  CS  01/25/2010    4739298 1005721392           10:01:01
    100  0001020069            60        0                                                        
    VN1 108B076                 0        0  CS  01/25/2010    4739299 1005721393           10:01:04
    100  0001020069            60        0                                                        
    VN1 109A077                 0        0  CS  01/25/2010    4739300 1005721394           10:01:06
    100  0001020069            60        0                                                        
    VN1 110B079                 0        0  CS  01/25/2010    4739301 1005721395           10:01:08
    100  0001020069            60        0                                                        
    VN1 106B088                 0        0  CS  01/25/2010    4739302 1005721403           10:01:11
    100  0001020069            60        0                                                        
    VN1 123B158                 0        0  CS  01/25/2010    4739303 1005721389           10:01:13
    100  0001020069            60        0                                                        
    VN1 124A160                 0        0  CS  01/25/2010    4739304 1005721390           10:01:15
    100  0001020069            60        0                                                        
    VN1 118A133                 0        0  CS  01/25/2010    4739305 1005721396           10:01:17
    100  0001020069            60        0                                                        
    VN1 119A128                 0        0  CS  01/25/2010    4739306 1005721397           10:01:20
    100  0001020069            60        0                                                        
    VN1 120B162                 0        0  CS  01/25/2010    4739307 1005721398           10:01:22
    100  0001020069            60        0                                                        
    VN1 121B159                 0        0  CS  01/25/2010    4739308 1005721399           10:01:24
    100  0001020069            60        0                                                        
    VN1 122B159                 0        0  CS  01/25/2010    4739309 1005721400           10:01:26
    100  0001020069            60        0                                                        
    VN1 123B159                 0        0  CS  01/25/2010    4739310 1005721401           10:01:29
    100  0001020069            60        0                                                        
    VN1 124B160                 0        0  CS  01/25/2010    4739311 1005721402           10:01:31
    100  0001020069            60        0                                                        
    Thnks you,
    Anmol.
    Edited by: anmol112 on Jan 25, 2010 10:34 PM

    no replay, clossing threat.

  • User Exit for MSC2n( Batch) while doing a Good receipt for an order

    Is ther any exit to update the Date1 field(MCHA-FVDT1) in MSC2n( Batch) while doing a Good receipt for an order
    Thanks in advance

    Hi Varsha,
    Try these User Exit.
    BATCHCHK  Function Module Exits for Check in Case of Batch Change
    MBCFC010  Propose batch number on Inventory Management item scree
    SAPLCHVW  Batch where-used list
    SAPLMHD1  Shelf life expiration date
    SAPLV01D  Determining the initial status of a batch
    SAPLV01P  Function Module Exits at Time Batches Are Updated
    SAPLV01Z  CFCs for internal batch number assignment
    SAPLV1ZE  CFCs for external batch number assignment
    SAPLV1ZN  CFCs for batch valuation in VB_CREATE_BATCH
    Regards,
    Vijay

  • Goods receipt for purch. order" is not allowed (NWA EXCANETHDR 0030)

    Hi Gurus,
    Message no. BS007
    While doing MIGO with PO, Iam receving the following error msg as
    "Goods receipt for purch. order" is not allowed (NWA EXCANETHDR 0030)".
    Diagnosis
    The current status of object 'NWA EXCANETHDR 0030' prohibits business transaction 'Goods receipt for purch. order'.
    Procedure
    To process business transaction 'Goods receipt for purch. order', you first have to change the status of object 'NWA EXCANETHDR 0030' to allow the transaction 'Goods receipt for purch. order'.
    This gives you an overview of the system and user statuses that affect the transaction. A transaction can only be executed if there is at least one status that allows it and there is no status that forbids it.
    Pls help me in this
    Thanks in advance,
    Vasanth

    Hi,
    I guess it the goods receipt is against a PO having an asset or used an Internal order .In the Internal order control data Goods receipt allowed indicator has not been set. Please see the order in KO03 and check the allowed transactions. If GR (RMWE) is not there than ask your CO team for the needfull change after which take up GR.
    Dhruba

  • Message no. BS007-Goods receipt for purchase order not allowed

    Hello SAP Experts,
    I have created an internal order to collect expense within the order.
    When I tried to reverse an GR against the PO created with the internal order assigned, the following Error occured.
    "Goods receipt for purch. order" is not allowed (ORD 145116170204)
    Message no. BS007
    Diagnosis
    The current status of object 'ORD 145116180204' prohibits business transaction 'Goods receipt for purch. order'.
    Procedure
    To process business transaction 'Goods receipt for purch. order', you first have to change the status of object 'ORD 145116170204' to allow the transaction 'Goods receipt for purch. order'.
    This gives you an overview of the system and user statuses that affect the transaction. A transaction can only be executed if there is at least one status that allows it and there is no status that forbids it.
    The order was previous TECOed, and change it's status to Release, but still have the error.
    Please give possible solutions. Thank you in advance.
    Regards,
    Steven Lin

    Hi Br. Ajay M,
    Released the order and Status line as follow
    REL  AVAC BUDG GMPS
    but the error changed while reverse the document
    item 0001 Order is invalid.
    Many thanks for your kindly reply.
    regards,
    Steven

  • Good receipt for production order

    Hi experts,
    When good receipt for production order 60003408 , it shows error "No valid order items exist for order 60003408" like this how to resolve this...
    In diagnosis they were specified as change into good receipt in production order screen but in default it shows GR Non-valuated.
    Thanks

    Hi,
    You can create production order directly from sale order at CO08.
    You can create the production order without material in CO07.
    CO07 specially meant for Rework order (Production order without material) 
    Hope claer to you.
    Regards,
    R.Brahmankar

  • Call BAPI_GOODSMVT_CREATE to create a goods receipt for purchase order

    Hi,
    I'm calling the bapi BAPI_GOODSMVT_CREATE to create a goods receipt for purchase order, but the following code doesn't work. It doesn't give me any kind of error message but it does nothing as well...
    Can anyone help me please?
    Thank You
    Hugo
    Code
    DATA: wa_goodsmvt_header  LIKE bapi2017_gm_head_01,
                            wa_goodsmvt_code    LIKE bapi2017_gm_code,
                            wa_bapi2017_gm_head TYPE bapi2017_gm_head_ret-mat_doc.
                      DATA: it_goodsmvt_item LIKE bapi2017_gm_item_create OCCURS  0 WITH HEADER LINE,
                            it_return        LIKE bapiret2 OCCURS  0 WITH HEADER LINE.
                      wa_goodsmvt_header-pstng_date = SY-DATUM.
                      wa_goodsmvt_header-doc_date   = SY-DATUM.
                      wa_goodsmvt_header-ref_doc_no = '4500000020'.
                      wa_goodsmvt_code-gm_code = '01'.          "Goods receipt for purchase Order
                      it_goodsmvt_item-stge_loc  = 'BPF2'.
                      it_goodsmvt_item-move_type = '101' .
                      it_goodsmvt_item-entry_qnt = 17.
                      it_goodsmvt_item-entry_uom = 'KG'.
                      it_goodsmvt_item-mvt_ind   = 'B'.
                      it_goodsmvt_item-po_number = '4500000020'.
                      it_goodsmvt_item-po_item   = '00010'.
                      it_goodsmvt_item-material  = '50'.
                      APPEND it_goodsmvt_item.
                      CALL FUNCTION  'BAPI_GOODSMVT_CREATE'
                        EXPORTING
                          goodsmvt_header  = wa_goodsmvt_header
                          goodsmvt_code    = wa_goodsmvt_code
                        IMPORTING
                          materialdocument = wa_bapi2017_gm_head
                        TABLES
                          goodsmvt_item    = it_goodsmvt_item
                          return            = it_return.
                        data: begin of errmsg occurs 10.
                                include structure bapiret2.
                        data: end of errmsg.
                        data: wmenge like iseg-menge,
                              errflag.
                        clear errflag.
                        loop at errmsg.
                          if errmsg-type eq 'E'.
                            write:/'Error in function', errmsg-message.
                            errflag = 'X'.
                          else.
                            write:/ errmsg-message.
                          endif.
                        endloop.
                        if errflag is initial.
                          commit work and wait.
                          if sy-subrc ne 0.
                            write:/ 'Error in updating'.
                            exit.
                          else.
                            write:/ 'Ok'.
                          endif.
                        endif.
                        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
                        EXPORTING
                        wait = ' '.

    Hi,
    Thank you for the asnwer! I'm a rookie at ABAP so please forgive my stupid questions
    I've changed the code to:
    DATA: wa_goodsmvt_header  LIKE bapi2017_gm_head_01,
                            wa_goodsmvt_code    LIKE bapi2017_gm_code,
                            wa_bapi2017_gm_head TYPE bapi2017_gm_head_ret-mat_doc.
                      DATA: it_goodsmvt_item LIKE bapi2017_gm_item_create OCCURS  0 WITH HEADER LINE,
                            it_return        LIKE bapiret2 OCCURS  0 WITH HEADER LINE.
                      wa_goodsmvt_header-pstng_date = SY-DATUM.
                      wa_goodsmvt_header-doc_date   = SY-DATUM.
                      wa_goodsmvt_header-ref_doc_no = '4500000020'.
                      wa_goodsmvt_code-gm_code = '01'.          "Goods receipt for purchase Order
                      it_goodsmvt_item-plant     = 'BP01'.
                      it_goodsmvt_item-stge_loc  = 'BPF2'.
                      it_goodsmvt_item-move_type = '101' .
                      it_goodsmvt_item-entry_qnt = 10.
                      it_goodsmvt_item-entry_uom = 'KG'.
                      it_goodsmvt_item-mvt_ind   = 'B'.
                      it_goodsmvt_item-po_number = '4500000020'.
                      it_goodsmvt_item-po_item   = '10'.
                      it_goodsmvt_item-material  = '50'.
                      APPEND it_goodsmvt_item.
                      CALL FUNCTION  'BAPI_GOODSMVT_CREATE'
                        EXPORTING
                          goodsmvt_header  = wa_goodsmvt_header
                          goodsmvt_code    = wa_goodsmvt_code
                        IMPORTING
                          materialdocument = wa_bapi2017_gm_head
                        TABLES
                          goodsmvt_item    = it_goodsmvt_item
                          return            = it_return.
                          write:/ it_return-message.
    And the return message is : Material document data and PO data do not match (Material)
    Any idea of what might be the problem?
    Thanks

  • Goods receipt for subcontracting order! BAPI_GOODSMVT_CREATE

    I wanna use BAPI "BAPI_GOODSMVT_CREATE"  to create goods receipt for subcontracting order.
    But it says that this combination is not possible.  Combination of my movement type and this BAPI.
    What can i do to solve it?
    thanks in advance.

    >
    Julia Nikiforva wrote:
    > I wanna use BAPI "BAPI_GOODSMVT_CREATE"  to create goods receipt for subcontracting order.
    > But it says that this combination is not possible.  Combination of my movement type and this BAPI.
    >
    > What can i do to solve it?
    >
    > thanks in advance.
    Might work
    report zbapi_goodsmovement.
    parameters: p-file like rlgrap-filename default
    'c:\sapdata\TEST.txt'.
    parameters: e-file like rlgrap-filename default
    'c:\sapdata\gdsmvterror.txt'.
    parameters: xpost like sy-datum default sy-datum.
    data: begin of gmhead.
    include structure bapi2017_gm_head_01.
    data: end of gmhead.
    data: begin of gmcode.
    include structure bapi2017_gm_code.
    data: end of gmcode.
    data: begin of mthead.
    include structure bapi2017_gm_head_ret.
    data: end of mthead.
    data: begin of itab occurs 100.
    include structure bapi2017_gm_item_create.
    data: end of itab.
    data: begin of errmsg occurs 10.
    include structure bapiret2.
    data: end of errmsg.
    data: wmenge like iseg-menge,
    errflag.
    data: begin of pcitab occurs 100,
    ext_doc(10), "External Document Number
    mvt_type(3), "Movement Type
    doc_date(8), "Document Date
    post_date(8), "Posting Date
    plant(4), "Plant
    material(18), "Material Number
    qty(13), "Quantity
    recv_loc(4), "Receiving Location
    issue_loc(4), "Issuing Location
    pur_doc(10), "Purchase Document No
    po_item(3), "Purchase Document Item No
    del_no(10), "Delivery Purchase Order Number
    del_item(3), "Delivery Item
    prod_doc(10), "Production Document No
    scrap_reason(10), "Scrap Reason
    upd_sta(1), "Update Status
    end of pcitab.
    call function 'WS_UPLOAD'
    exporting
    filename = p-file
    filetype = 'DAT'
    IMPORTING
    FILELENGTH =
    tables
    data_tab = pcitab
    EXCEPTIONS
    FILE_OPEN_ERROR = 1
    FILE_READ_ERROR = 2
    NO_BATCH = 3
    GUI_REFUSE_FILETRANSFER = 4
    INVALID_TYPE = 5
    OTHERS = 6
    if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    exit.
    endif.
    gmhead-pstng_date = sy-datum.
    gmhead-doc_date = sy-datum.
    gmhead-pr_uname = sy-uname.
    gmcode-gm_code = '01'. "01 - MB01 - Goods Receipts for Purchase Order
    loop at pcitab.
    itab-move_type = pcitab-mvt_type.
    itab-mvt_ind = 'B'.
    itab-plant = pcitab-plant.
    itab-material = pcitab-material.
    itab-entry_qnt = pcitab-qty.
    itab-move_stloc = pcitab-recv_loc.
    itab-stge_loc = pcitab-issue_loc.
    itab-po_number = pcitab-pur_doc.
    itab-po_item = pcitab-po_item.
    concatenate pcitab-del_no pcitab-del_item into itab-item_text.
    itab-move_reas = pcitab-scrap_reason.
    append itab.
    endloop.
    loop at itab.
    write:/ itab-material, itab-plant, itab-stge_loc,
    itab-move_type, itab-entry_qnt, itab-entry_uom,
    itab-entry_uom_iso, itab-po_number, itab-po_item,
    pcitab-ext_doc.
    endloop.
    call function 'BAPI_GOODSMVT_CREATE'
    exporting
    goodsmvt_header = gmhead
    goodsmvt_code = gmcode
    TESTRUN = ' '
    IMPORTING
    goodsmvt_headret = mthead
    MATERIALDOCUMENT =
    MATDOCUMENTYEAR =
    tables
    goodsmvt_item = itab
    GOODSMVT_SERIALNUMBER =
    return = errmsg
    clear errflag.
    loop at errmsg.
    if errmsg-type eq 'E'.
    write:/'Error in function', errmsg-message.
    errflag = 'X'.
    else.
    write:/ errmsg-message.
    endif.
    endloop.
    if errflag is initial.
    commit work and wait.
    if sy-subrc ne 0.
    write:/ 'Error in updating'.
    exit.
    else.
    write:/ mthead-mat_doc, mthead-doc_year.
    perform upd_sta.
    endif.
    endif.
    FORM UPD_STA *
    form upd_sta.
    loop at pcitab.
    pcitab-upd_sta = 'X'.
    modify pcitab.
    endloop.
    call function 'WS_DOWNLOAD'
    exporting
    filename = p-file
    filetype = 'DAT'
    IMPORTING
    FILELENGTH =
    tables
    data_tab = pcitab
    EXCEPTIONS
    FILE_OPEN_ERROR = 1
    FILE_READ_ERROR = 2
    NO_BATCH = 3
    GUI_REFUSE_FILETRANSFER = 4
    INVALID_TYPE = 5
    OTHERS = 6
    endform.

  • Goods Receipts for Purchase Order using BAPI_GOODSMVT_CREAT

    Hi experts,
    I am working on the a program where am generating Goods Receipts for Purchase Order. the BAPI_GOODSMVT_CREAT returns an error saying "Material 6003022 not maintained in plant 1001"
    Can any one assist? is there a field I may be missing?
    Here is a sample code.
    DATA: gm_header TYPE bapi2017_gm_head_01.
    DATA: gm_code TYPE bapi2017_gm_code.
    DATA: gm_headret TYPE bapi2017_gm_head_ret.
    DATA: gm_item TYPE TABLE OF bapi2017_gm_item_create WITH HEADER LINE.
    DATA: gm_return TYPE bapiret2 OCCURS 0 WITH HEADER LINE.
    DATA: gm_retmtd TYPE bapi2017_gm_head_ret-mat_doc.
    CLEAR: gm_return, gm_retmtd.
    REFRESH gm_return.
    Setup BAPI header
    "data
    gm_header-pstng_date = sy-datum.
    gm_header-doc_date = sy-datum.
    gm_code-gm_code = '02'.
    " MB1A * Write 971 movement to table CLEAR GM_ITEM.
    MOVE '101' TO gm_item-move_type .
    " MOVE 'Q' TO GM_ITEM-SPEC_STOCK.
    MOVE '6003022' TO gm_item-material.
    MOVE '10' TO gm_item-entry_qnt.
    MOVE 'EA' TO gm_item-entry_uom.
    MOVE '1001' TO gm_item-plant.
    MOVE '' TO gm_item-stge_loc.
    MOVE '0901' TO gm_item-move_reas.
    "  MOVE '4500006877' TO GM_ITEM-WBS_ELEM.
    "  MOVE '0020' TO GM_ITEM-VAL_WBS_ELEM.
    MOVE '0020' TO gm_item-deliv_numb.
    MOVE '4500006881' TO gm_item-po_number.
    MOVE '0010' TO gm_item-po_item.
    APPEND gm_item.
    Call goods movement BAPI
    CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
      EXPORTING
        goodsmvt_header  = gm_header
        goodsmvt_code    = gm_code
      IMPORTING
        goodsmvt_headret = gm_headret
        materialdocument = gm_retmtd
      TABLES
        goodsmvt_item    = gm_item
        return           = gm_return.
    IF NOT gm_retmtd IS INITIAL.
      COMMIT WORK AND WAIT.
      CALL FUNCTION 'DEQUEUE_ALL'.
    ELSE.
      COMMIT WORK AND WAIT.
      CALL FUNCTION 'DEQUEUE_ALL'.
    ENDIF.

    >
    Spark842 wrote:
    > Hi experts,
    > I am working on the a program where am generating Goods Receipts for Purchase Order. the BAPI_GOODSMVT_CREAT returns an error saying "Material 6003022 not maintained in plant 1001"
    >  Can any one assist? is there a field I may be missing?
    >
    > Here is a sample code.
    >
    > DATA: gm_header TYPE bapi2017_gm_head_01.
    > DATA: gm_code TYPE bapi2017_gm_code.
    > DATA: gm_headret TYPE bapi2017_gm_head_ret.
    > DATA: gm_item TYPE TABLE OF bapi2017_gm_item_create WITH HEADER LINE.
    > DATA: gm_return TYPE bapiret2 OCCURS 0 WITH HEADER LINE.
    > DATA: gm_retmtd TYPE bapi2017_gm_head_ret-mat_doc.
    > CLEAR: gm_return, gm_retmtd.
    > REFRESH gm_return.
    > * Setup BAPI header
    > "data
    > gm_header-pstng_date = sy-datum.
    > gm_header-doc_date = sy-datum.
    > gm_code-gm_code = '02'.
    >
    >
    > " MB1A * Write 971 movement to table CLEAR GM_ITEM.
    > MOVE '101' TO gm_item-move_type .
    > " MOVE 'Q' TO GM_ITEM-SPEC_STOCK.
    > MOVE '6003022' TO gm_item-material.
    > MOVE '10' TO gm_item-entry_qnt.
    > MOVE 'EA' TO gm_item-entry_uom.
    > MOVE '1001' TO gm_item-plant.
    > MOVE '' TO gm_item-stge_loc.
    > MOVE '0901' TO gm_item-move_reas.
    > "  MOVE '4500006877' TO GM_ITEM-WBS_ELEM.
    > "  MOVE '0020' TO GM_ITEM-VAL_WBS_ELEM.
    > MOVE '0020' TO gm_item-deliv_numb.
    > MOVE '4500006881' TO gm_item-po_number.
    > MOVE '0010' TO gm_item-po_item.
    > APPEND gm_item.
    >
    > * Call goods movement BAPI
    >
    > CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
    >   EXPORTING
    >     goodsmvt_header  = gm_header
    >     goodsmvt_code    = gm_code
    >   IMPORTING
    >     goodsmvt_headret = gm_headret
    >     materialdocument = gm_retmtd
    >   TABLES
    >     goodsmvt_item    = gm_item
    >     return           = gm_return.
    >
    > IF NOT gm_retmtd IS INITIAL.
    >
    >   COMMIT WORK AND WAIT.
    >   CALL FUNCTION 'DEQUEUE_ALL'.
    > ELSE.
    >   COMMIT WORK AND WAIT.
    >
    >   CALL FUNCTION 'DEQUEUE_ALL'.
    > ENDIF.
    My guess, is that this material is not really maintained in the Plant '1001', to be on the safer side, get the exact values from EKPO itself, also check if this material exists in the table MARC for the plant and storage location.
    MOVE '1001' TO gm_item-plant.   "<< Hard coded
    MOVE '' TO gm_item-stge_loc.
    Replace the above hardcodes to something like this to get the actual value from EKPO.
    select werks lgort into (gm_item-plant, gm_item-stge_loc) from ekpo
       where ebeln = gm_item-po_number
            and ebelp = gm_item-po_item.

Maybe you are looking for