Skip to Content
author's profile photo Former Member
Former Member

Enter Good Movement - MB11 Batch Input or BAPI ??

HI,

I need to mass migrate stocks using MB11.

is there any BAPI for creating Good Movement?

I am planning to USE LSMW batch input.

I am looking for other alternatives like BAPI's.

if anyone worked on it, pls let me know.

I promise to reward the replies 😊

thanks

Martin

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Oct 10, 2005 at 03:23 PM

    Yes, there is a BAPI. BAPI_GOODSMVT_CREATE.

    Regards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

    • Here is a sample of the coding....

      
      * Structures for BAPI
      data: gdsmt_header   like bapi2017_gm_head_01.
      data: gdsmt_code like bapi2017_gm_code.
      data: gdsmt_headret like bapi2017_gm_head_ret.
      data: gdsmt_item like bapi2017_gm_item_create occurs 1 with header line.
      data: return like bapiret2 occurs 0.
      data: retmatdoc like bapi2017_gm_head_ret-mat_doc.
      
      
      * Setup BAPI header data.
        gdsmt_header-pstng_date = sy-datum.
        gdsmt_header-doc_date = sy-datum.
        gdsmt_code-gm_code = '06'.                                " MB11
      
      * Write 262 movement to table.
        clear gdsmt_item.
        move '262'         to gdsmt_item-move_type.
        move i_resb-matnr  to gdsmt_item-material.
        move p_bdmng      to gdsmt_item-entry_qnt.
        move i_resb-meins to gdsmt_item-entry_uom.
        move i_resb-werks to gdsmt_item-plant.
        move i_resb-lgort to gdsmt_item-stge_loc.
        move i_afko-aufnr to gdsmt_item-orderid.
        append gdsmt_item.
      
      * Determine cost center 
          move '0000041430' to gdsmt_item-costcenter.
      
        append gdsmt_item.
      
      * Call goods movement BAPI
        call function 'BAPI_GOODSMVT_CREATE'
             exporting
                  goodsmvt_header  = gdsmt_header
                  goodsmvt_code    = gdsmt_code
             importing
                  goodsmvt_headret = gdsmt_headret
                  materialdocument = retmatdoc
             tables
                  goodsmvt_item    = gdsmt_item
                  return           = return.
      
      
      

      Regards,

      Rich Heilman

  • author's profile photo Former Member
    Former Member
    Posted on Oct 10, 2005 at 03:25 PM

    hi,

    con you try BAPI_GOODSMVT_CREATE

    bye

    enzo

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 10, 2005 at 03:23 PM

    Martin,

    Did you look into this BAPI - BAPI_GOODSMVT_CREATE?

    Regards,

    Ravi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 10, 2005 at 03:30 PM

    Thanks Rich

    I got it.

    Message was edited by: Martin

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.