REM Scap Mov 551

Hello ,
I am working with REM scenario.
In the REM profile i alreday defined the 551 mov for the scarp.
But when i am doing confirmation with MFBF.
Only the Component Scarp is posted no Assemblies scarp coming.
May i know why the 551 document not generated for the Assembly?
Regards,
Maulik

Thanks Anupam,
I checked with same for the component Material document generate with 261 but for the assembly no materiel document generate .
Only the Finance document generate  which i can see in FCODOC.
What is the reason for it? why material document is not generated ?Only Finance document is generated !! Any Finance setting is there !!
Maulik
Edited by: Maulik on Apr 29, 2011 11:47 AM

Similar Messages

  • Movement 551 of header Material in MFBF in REM

    Hi,
    I am having an issue, In REM scenario there is a planned order of 10 Qty. I am using MFBF trx to confirm 5 qty as scrap by using assembly scrap. In this, system posting 261 mvt for components but there in no 551 mvt of Header material, Can anybody tell me what kind of process exactly happening? (There is not any change in planned order after this trx)
    Regards,
    Pankaj

    Hi Anupam,
    As per my thinking in assembly scraping Mvt for header material is 551 & for its components it should be 261, But when I am doing MFBF, there is not any mvt for header material happening but 261 happened for components.
    I have question that why 551 mvt of header material not posted & there is not any effect on planned order against which I have done assembly scrap posting.
    After doing MFBF only 261 mvt doc posted only I expect 551 for header which is not posting.
    I need to know is mvt 551 for header material happens in assembly scrap in MFBF. Also if not happens then for the componets against which 261 mvt posted, where that qty goes then.
    Regards,
    Pankaj

  • Add a new field for the movement 551

    Hey SAP folks,
    I am having a situation that while doing the overage receipt(551) in MIGO transaction system having an option to enter the Purchase order number in the screen but not for PO item number.
    When i went into the config under <b>Field selection for mvt type</b> , it doesn't give me an option to make an entry for 551 with PO item number.
    Let me know how can we add a new fields that is not listed on F4 help under 551 mvt type in the config under <b>Field selection for mvt type</b>.
    Thks,
    JR.

    Dear John,
    Are you sure that mov type 551 is movement for receipt PO?Cause as i know 551 is Good issue for Scrapping.
    Btw, you can check to this path :
    IMG> Material management> Inventory management and physical Inventory>Setting for enjoy transaction>Setting for MIGO-
    IMG> Material management> Inventory management and physical Inventory>Good issue/TP>Define screen layout
    IMG> Material management> Inventory management and physical Inventory>Good receipt>Define screen layout.
    Regards,
    w1n

  • Send email when KMAT has movement 551 E in MIGO

    HI
    I am looking for ways to send an email notification when a configurable material undergoes movement type 551 E in MIGO (or any other transactions).
    We are MTO process industry. I can trace back the sales order from the configurable material (KMAT) and find the sales rep's email from there.
    Conditions: KMAT material + 551 E movement
    Process flow: Look for Sales order for that KMAT, find sales rep's email id, send email with the material weights matching/not-matching with sales order weights.
    Any suggestions? Thanks in advance.
    MP

    I don't know the configuration, but you try it through user exit or badi.
    Thanks
    Subhankar

  • Movement 551 (Scrapping) and cost center

    Hi all!
    Can the cost center be determined automaticaly when creating this movement type 551?
    Can can it in any other situation?
    Regards.
    Eduardo

    Hi,
    Please follow the below link for  aprogram , which will help you in identifying relevant user exits for a transaction code.
    http://www.erpgenie.com/abap/code/abap26.htm
    If required, you may take help of your developer to copy & run this program.
    Thanks & regards
    Mahesh

  • No accounting document goods issue movement 551

    Hi Friends,
    I used t-code MB1A to scrap materials using 551 GI scrapping. For somehow, there is no accounting document when I check the scrap material document.
    Where could I've missed.
    Thanks in advance,
    Linda

    Jeevan Sagar
    Checked. All set well. Still no accounting doc.
    Thanks,
    Linda

  • REM Backflush Scrap

    Hello!!
    I have a question on how the scrap is posted in MFBF transaction.
    If we make 1000 units of a finished goods and 100 of them are scrap. In the MFBF transaction we can do the backflush for 1000 units first, this will leave 1000 units of finished good inventory and also system goods issues the finished goods BOM components. Then when i go in to record scrap for 100 units, system is only goods issuing on the BOM components and it is not reducing the finished good inventory by 100. How to handle this? We want to see 900 units in the finished good inventory.
    Bottom line is, business wants to know both the gross units and the scrap for the finished goods.
    Also, there is only one scrap movement 551 defined in the MFBF transaction, is there a way to have multiple scrap movements. We wanted to track multiple scraps with different movements depending on when it occurs during the production cycle.
    Thank you in advance...

    Hello,
    You can maintain operation scrap, component scrap or assembly scrap and capture the extra goods movement. But this will increase consumption of materials where scrap is maintained. And you get report in terms of the total value (amount) but not in quantity.
    What you can do is maintain scrap as one more material in BOM of FG with negative quantity. as by product.
    When you backflush, system will list all materials being consumed along with scrap quantity calcuated with reff. to BOM quantity and total FG production qunatity. If you feel that scrap generated is different then you can change the quantity also here. You can define different store location to recieve the scrap quantity.
    For Scrap movement type is 551 which is used in REM Profile.
    Hope the information is useful
    regards

  • EWM-ERP movement type integration

    Hi,
    We have EWM 7.0 integrated with ECC 6.0.
    When I Post Unplanned Goods Issue in EWM with GI process = SCRP (scrapping), I expect to post 551 movement in ECC.
    However this doesn't happen.
    On analyzing the inbound queue in ECC 6.0, it is found "reason code" is set as mandatory to post movement 551 in ECC.
    Can any one tell how to send the reason code from EWM to ECC ?
    Thankyou in advance.
    Best regards

    hi,
    you need to check SAP note 1408478 for more detail how to send this reason code back to ERP.

  • Movement type 101 vs 131.........

    Hi there ,
                  As per my understanding we can use both movement type 101 and 131 as goods received from production ..... the only diff is 101 can also be manually done but we cannot post the goods with 131 mvt type manually......
    Is there any other differrence .... I guess that in REM we use mainly 131...
    Thanks
    Kaushik

    Hi,
    101 Goods receipt for purchase order or order
    If the purchase order or order has not been assigned to an account, a stock type (unrestricted-use stock, stock in quality inspection, blocked stock) can be entered during goods receipt.
    If the purchase order or order has been assigned to an account, the goods receipt is not posted to the warehouse, but to consumption.
    In the case of non-valuated materials, the goods receipt is posted to the warehouse, although the purchase order has not been assigned to an account.
    Possible special stock indicators:
    K Goods receipt for purchase order to consignment stock
    O Goods receipt for purchase order to stock of material provided to vendor
    E GR for purchase order or order to sales order stock
    Q GR for purchase order or order to project stock.
    Goods receipt for subcontract order: at goods receipt, the consumption of the components is posted at the same time (see movement type 543)
    Goods receipt for stock transport order: at goods receipt the transported quantity is posted in the receiving plant from stock in transit into unrestricted-use stock (stock in quality inspection or blocked stock).
    131 Goods receipt for run schedule header / REM
    This movement type cannot be entered manually. It is generated automatically at notification of goods receipt for a run schedule header.
    Possible special stock indicators:
    E, Q
    Hope this was helpful
    Regards,
    R.Brahmankar

  • BAPI_GOODSMVT_CREATE for Movement type 262

    Can anyone please suggest a BAPI or FM for MB1A transaction for movement type 262 ?
    I am trying to use it but returns with error 'Stock data of serial number 40000000 not suitable for movement'
    Edited by: Venkat Naga on Dec 2, 2011 8:31 PM

    Hi,
    Here is some sample code from one of my programs, which does a 551 movement type. This should get you started. Just check the RETURN table for messages, they should tell you what you are missing.
    code
    Structures for BAPI
    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.
    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 = '06'. " MB11
    Write 551 movement to table
    clear gm_item.
    move '551' to gm_item-move_type .
    move '000000000040001234' to gm_item-material.
    move '1' to gm_item-entry_qnt.
    move 'EA' to gm_item-entry_uom.
    move '0004' to gm_item-plant.
    move '4000' to gm_item-stge_loc.
    move '201' to gm_item-move_reas.
    Determine cost center per plant
    case xresb-werks.
    when '0004'.
    move '0000041430' to gm_item-costcenter.
    when '0006'.
    move '0000041630' to gm_item-costcenter.
    when '0007'.
    move '0000041731' to gm_item-costcenter.
    when '0008'.
    move '0000041830' to gm_item-costcenter.
    endcase.
    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.
    call function 'BAPI_TRANSACTION_COMMIT'
    exporting
    wait = 'X'.
    [/code]
    Welcome to SDN! Please remember to award points for helpful answers and mark you post as solved when solved completely. Thanks.
    REgards,
    Raj.

  • IDOC on Goods movement

    Hi Experts,
    I need to generate outbound IDOC on goods movement 551 - scrapping. It is an information IDoc whenever a 551 is posted. Let me know the message & basic type & steps to create the same.
    Thanks,
    Sourabh

    Message Type: WMMBXY
    Basic Type: WMMBID02
    FM: L_IDOC_INPUT_WMMBXY
    1 -  Create a new output type ZXXX with program as RSNASTED and form as EDI_PROCESSING and medium as 6.
    2 -  Create an OUTBOUND partner profile for LS type in WE20 and use WMMBXY message type. Create a port in Transactional RFC.
    3 - Create a condition record in MN21 for automatic processing for that output type.
    If you want the output type to be triggered only for 551 movement, create a requirement and assign it to the output type in the output determination procedure.

  • Reg:Cost Object Controlling

    Hi All,
    While am doing the T.Code: MFBF - REM Backflush (For Repetative Manufactring) the following Issue is coming
    E:M7:226 131 _ _ _ F
    Message no. M7226

    Hi Suryanarayana,
    Please Do me the favour, no MM guy is available right know
    see the following movement types i assigned on REM Profile
    Movement Types
    Goods issue     261                        Goods issue/reversal  262
    Goods receipt    131                      Goods receipt/reversal  132
    Scrap                 551                      Scrap/reversal              552
    By-product          531                      By-product/reversal        532
    Additional movement types relevant fot make-to-order  scenrio
    GR Individual SOrd        571                  GR Indiv. Order Reversal           572
    GI Ind. Stock/SOrd       572                 GI SO Stock/Sorder/Canc.         571
    GI PlntStock/SOrd        291                 GI Pl. Stock/SOrder Rev.            292

  • Error in Bapi_GoodsMvt_Create using Purchase order

    Hi Friends,
    I am using Bapi_goodsmvt_create for Goods Receipts against Purchase order.
    The below code i have given for Goods receipts
    It shows the error like
    ID : 8J
    Err No.:182
    Message : Entry 4500000344 00040 0000 not valid; correct entry
    Please help me to correct this error.
    Thanks
    Shankar
    ===================================
    Heading Structure
    st_gm_code-gm_code          = '01'.
    st_gm_header-pstng_date = '20070930'.
    st_gm_header-doc_date = '20070930'.
    st_gm_header-gr_gi_slip_no = '970015'.
    st_gm_header-bill_of_lading = '527213'.
    st_gm_header-header_txt = 'AIR'.
    st_gm_header-ref_doc_no = '4500000344'.
    Tables - ITEM CREATE.
    itab_afs_gm_itemx-plant = '2000'.
    itab_afs_gm_itemx-deliv_numb = '80100121'.
    itab_afs_gm_itemx-stge_loc = '2110'.
    itab_afs_gm_itemx-move_stloc = '2110'.
    itab_afs_gm_itemx-po_number = '4500000344'.
    itab_afs_gm_itemx-po_item = '00040'.
    itab_afs_gm_itemx-vendor = '0000650003'.
    itab_afs_gm_itemx-vendrbatch = 'ABC123'.
    itab_afs_gm_itemx-move_type = '101'.
    itab_afs_gm_itemx-mvt_ind = 'B'.
    itab_afs_gm_itemx-material = '000000000030000227'.
    itab_afs_gm_itemx-entry_qnt = 10.
    APPEND itab_afs_gm_itemx .
    ****&& Grid values
    gr_afs-matdoc_itm     = '0001'.
    gr_afs-grid_value = '205'.
    gr_afs-withdrawn_sku = 'X'. "Final issue at sku level
    gr_afs-stock_cat = '0000000001000366'.
    APPEND gr_afs.
    CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
      EXPORTING
        goodsmvt_header           = st_gm_header
        goodsmvt_code             = st_gm_code
      TESTRUN                     = ' '
    IMPORTING
       goodsmvt_headret           = st_gm_headret
       materialdocument            = mat_doc
       matdocumentyear             =  doc_year
      TABLES
        goodsmvt_item             = itab_afs_gm_itemx
       afs_goodsmvt_sku           = gr_afs
        return                    = bapi_return.
    IF sy-subrc = 0.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = 'X'.
    ENDIF.
    CLEAR itab_afs_gm_itemx.
    REFRESH itab_afs_gm_itemx.
    CLEAR gr_afs.
    REFRESH gr_afs.

    Hi,
    Here is some sample code from one of my programs, which does a 551 movement type. This should get you started. Just check the RETURN table for messages, they should tell you what you are missing.
    code
    Structures for BAPI
    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.
    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 = '06'. " MB11
    Write 551 movement to table
    clear gm_item.
    move '551' to gm_item-move_type .
    move '000000000040001234' to gm_item-material.
    move '1' to gm_item-entry_qnt.
    move 'EA' to gm_item-entry_uom.
    move '0004' to gm_item-plant.
    move '4000' to gm_item-stge_loc.
    move '201' to gm_item-move_reas.
    Determine cost center per plant
    case xresb-werks.
    when '0004'.
    move '0000041430' to gm_item-costcenter.
    when '0006'.
    move '0000041630' to gm_item-costcenter.
    when '0007'.
    move '0000041731' to gm_item-costcenter.
    when '0008'.
    move '0000041830' to gm_item-costcenter.
    endcase.
    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.
    call function 'BAPI_TRANSACTION_COMMIT'
    exporting
    wait = 'X'.
    [/code]
    Welcome to SDN! Please remember to award points for helpful answers and mark you post as solved when solved completely. Thanks.
    REgards,
    Raj.

  • BAPI error for mvmt types 201 and 202

    Hi all,
      I'm using a bapi BAPI_GOODSMVT_CREATE for the movement type 201 and 202 with the gm_code = '03' for the transaction mb11- Goods movement. But it returns an error u201D Account 400000 requires an assignment to a CO object u201D...I'm unable to resolve this one....I have attached the code below. Please help me in fixing this issue...
    if sy-subrc = 0.
      loop at it_mchb into wa_mchb.
        if wa_mchb-clabs gt 0.
          clear wa_header.
          wa_header-pstng_date = sy-datum.          " fill header data
          wa_header-doc_date   = sy-datum.
          wa_code-gm_code      = '03'.              "fill code data
          clear wa_item.
          wa_item-material     = wa_mchb-matnr.     " fillitem data
          wa_item-plant        = wa_mchb-werks.
          wa_item-stge_loc     = wa_mchb-lgort.
          wa_item-batch        = wa_mchb-charg.
          wa_item-entry_qnt    = wa_mchb-clabs.
          wa_item-move_type    = '201'.
                       wa_item-entry_uom    = wa_mchb-meins.
          append wa_item to it_item.
        elseif wa_mchb-clabs lt 0.
          clear wa_header.
          wa_header-pstng_date = sy-datum.          " fill header data
          wa_header-doc_date   = sy-datum.
          wa_code-gm_code      = '03'.              "fill code data
          clear wa_item.
          wa_item-material     = wa_mchb-matnr.     " fillitem data
          wa_item-plant        = wa_mchb-werks.
          wa_item-stge_loc     = wa_mchb-lgort.
          wa_item-batch        = wa_mchb-charg.
          wa_item-entry_qnt    = wa_mchb-clabs.
          wa_item-move_type    = '202'.
                       wa_item-entry_uom    = wa_mchb-meins.
          append wa_item to it_item.
        endif.
      endloop.
      clear lv_lin.
      describe table it_item lines lv_lin.
      if lv_lin = 0.
        write : / 'No records found'.
      endif.
      call function 'BAPI_GOODSMVT_CREATE'
        exporting
          goodsmvt_header  = wa_header
          goodsmvt_code    = wa_code
        importing
          materialdocument = lv_matdoc
        tables
          goodsmvt_item    = it_item
          return           = it_return.
      if it_return is initial.        " if record created successfully
        call function 'BAPI_TRANSACTION_COMMIT'. " commit work
        write : / lv_matdoc, 'IS CREATED SUCCESSFULLY' color 5.
        loop at it_item into wa_item.
          write : / 'Mat :', wa_item-material,'bat :', wa_item-batch.
        endloop.
      else.                           " if record is not created successfylly
        loop at it_return into wa_return.
          write : / wa_return-message color 6.
        endloop.
        uline.
      endif.
    else.
      write : / 'No Records found' color 7.
    endif. " gt_s035 is not initial
    Edited by: Arunmozhi_06 on May 30, 2011 12:48 PM

    Hi,
       Did you passing the leading 0's in the cost center field?
    and check the below coding..
    * Structures for BAPI
      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.
      data: gm_retmtd  type bapi2017_gm_head_ret-mat_doc.
      clear: gm_return, gm_retmtd. refresh gm_return.
      perform show_status using 'Scrapping(551) Material'.
    * Setup BAPI header data.
      gm_header-pstng_date = sy-datum.
      gm_header-doc_date   = sy-datum.
      gm_code-gm_code      = '06'.                              " MB11
    * Write 551 movement to table
      clear gm_item.
      move '551'        to gm_item-move_type     .
      move xresb-matnr  to gm_item-material.
      move p_bdmng      to gm_item-entry_qnt.
      move xresb-meins  to gm_item-entry_uom.
      move xresb-werks  to gm_item-plant.
      move xresb-lgort  to gm_item-stge_loc.
      move p_grund      to gm_item-move_reas.
    * Determine cost center per plant
      case xresb-werks.
        when '0004'.
          move '0000041430' to gm_item-costcenter."pass leading zero's in the cost center field
        when '0006'.
          move '0000041630' to gm_item-costcenter.
        when '0007'.
          move '0000041731' to gm_item-costcenter.
        when '0008'.
          move '0000041830' to gm_item-costcenter.
      endcase.
      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.
    Maybe there is some config missing for your cost center, or maybe something missing in your code. check above.
    Regards,
    Dhina,..
    Edited by: Dhina DMD on May 31, 2011 8:02 AM

  • Goods Receipt for PO using BAPI

    Hello,
    I need to do a goods receipt for a purchase order using bapi_goodsmvt_create for movement type 101. My function module does not return the material document number. Can someone help me with my code?
    Thanks,
    A.P.
    FUNCTION Z_GR_BAPI.
    ""Local interface:
    *"  IMPORTING
    *"     REFERENCE(I_CODE) TYPE  GM_CODE
    *"     REFERENCE(I_MOVE_TYPE) TYPE  CHAR3
    *"     REFERENCE(I_EKKO) TYPE  EKKO
    *"  EXPORTING
    *"     REFERENCE(E_DOCUMENT) TYPE  BAPI2017_GM_HEAD_RET-MAT_DOC
    *"     REFERENCE(E_RETURN) TYPE  BAPIRET2
    *"  TABLES
    *"      T_EKPO STRUCTURE  EKPO
    Structures for BAPI
      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.
      data: gm_retmtd  type bapi2017_gm_head_ret-mat_doc.
      data: x_ekpo type table of ekpo with header line.
       x_ekpo[] = t_ekpo[].
      clear: gm_return, gm_retmtd.
      refresh gm_return.
      gm_code-gm_code = i_code.
      gm_header-pstng_date = sy-datum.
      gm_header-doc_date = sy-datum.
      gm_header-pr_uname = sy-uname.
      loop at x_ekpo.
        gm_item-material = x_ekpo-matnr.
        gm_item-plant = x_ekpo-werks.
        gm_item-stge_loc = x_ekpo-lgort.
        gm_item-move_type = i_move_type.
        gm_item-mvt_ind = 'B'.
        gm_item-stck_type = space.
        gm_item-entry_qnt = x_ekpo-menge.
        gm_item-entry_uom = x_ekpo-meins.
      append gm_item.
      endloop.
      CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
        EXPORTING
          GOODSMVT_HEADER             = gm_header
          GOODSMVT_CODE               = gm_code
         TESTRUN                     = ' '
        IMPORTING
          GOODSMVT_HEADRET            = gm_headret
          MATERIALDOCUMENT            = gm_retmtd
        MATDOCUMENTYEAR             =
        TABLES
          GOODSMVT_ITEM               = gm_item
        GOODSMVT_SERIALNUMBER       =
          RETURN                      = gm_return.
    e_document = gm_retmtd.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
             WAIT          = 'X'.
         IMPORTING
            RETURN        =
    ENDFUNCTION.

    Hi,
    This piece of code may be helpful.
    Structures for BAPI
      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.
      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      = '06'.                              " MB11
    Write 551 movement to table
      clear gm_item.
      move '551'        to gm_item-move_type     .
      move '000000000040001234' to gm_item-material.
      move '1'        to gm_item-entry_qnt.
      move 'EA'       to gm_item-entry_uom.
      move '0004'     to gm_item-plant.
      move '4000'     to gm_item-stge_loc.
      move '201'      to gm_item-move_reas.
    Determine cost center per plant
      case xresb-werks.
        when '0004'.
          move '0000041430' to gm_item-costcenter.
        when '0006'.
          move '0000041630' to gm_item-costcenter.
        when '0007'.
          move '0000041731' to gm_item-costcenter.
        when '0008'.
          move '0000041830' to gm_item-costcenter.
      endcase.
      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.
       call function 'BAPI_TRANSACTION_COMMIT'
           exporting
                wait = 'X'.
    regards,
    keerthi.

Maybe you are looking for