BAPI_GOODSMVT_CREATE. Migo

Hi
Can any one Please help me
I need to create Goods Receipt(MIGO) without Purchase Order known using standard BAPI_GOODSMVT_CREATE.
Please provide me the necessary procedure and coding to create Goods Receipt?
Thanks in advance.
Ritika

Hi
The best way is to test the FM from se37 tcode, after u enter the FM using display button..just execute it and sit along with the functional consultant and fill the required values..and then execute it.
IF it works...then u can take the values into an internal table in an ABAP program and pass on these values to the FM by calling it in the program.
Also, after u enter the Fm..read the documentation.. there it will  clearly mention the required fields and the procedure.
Regards,
Vishwa.

Similar Messages

  • Input parameters for BAPI_GOODSMVT_CREATE --MIGO--GR for Outbound Delivery

    Hi Friends,
      We have to create a Goods Receipt against an Outbound Delivery ( movement type "101" ) using the BAPI <b>BAPI_GOODSMVT_CREATE</b>.
    In online the user is using <b>MIGO</b> transaction for the same. There he will choose the GOODS RECEIPT for OUTBOUND DELIVERY and enters the delivery number. The movement type "101" is used.
      Could you please tell me the GM code and the required fields to be passed for the above scenario.
    I have gone through the example program in the link...
    http://www.sap-img.com/abap/bapi-goodsmvt-create-to-post-goods-movement.htm
    <b>but unable to find how to use this BAPI for simulating MIGO transaction.</b>
    <b>The fields available are with us are...</b>
    Delivery. No. --- Doc. Date - Posting Date-Quantity-Storage Location-
    Reason for movement-External qty-External qty unit-Goods recipient-Excise Selection
    Are these fields sufficient for doing MIGO with this BAPI or do we require more fields???
    Thanks and Regards,
    Bharat

    see the following code. it may be useful.
      LOOP AT I_TAB.
          count = sy-tabix.
          SELECT SINGLE * FROM ZMM_GR_UPLOAD1
                                    WHERE SOLOMON_GR = I_TAB-SOLOMON_GR AND
                                    SOLOMON_GRDAT = I_TAB-SOLOMON_GRDAT.
          IF SY-SUBRC = 0.
            I_TAB-FLAG = 'C'.
            modify i_tab index count.
            concatenate 'File Name : ' name into i_msg1.
            append i_msg1.
            CONCATENATE 'ERROR  PO : ' I_TAB-SOL_PONO
                '  WAS ALREADY UPLOADED' INTO I_MSG1.
            APPEND I_MSG1.
            CLEAR I_TAB-FLAG.
            CONTINUE.
          ELSE.
            REFRESH I_ITEMS.
            CLEAR I_ITEMS.
            CONCATENATE I_MAIN-SOLOMON_GRDAT+4(4)
                        I_MAIN-SOLOMON_GRDAT+2(2)
                        I_MAIN-SOLOMON_GRDAT+0(2) INTO G_DATE.
            gmhead-pstng_date = G_DATE.
            gmhead-doc_date = sy-datum.
            gmhead-pr_uname = sy-uname.
    "01 - MB01 - Goods Receipts for Purchase Order
            gmcode-gm_code = '01'.
            refresh itab.
            clear itab.
            SORT I_MAIN BY SOLOMON_GR.
            LOOP AT I_MAIN WHERE SOLOMON_GR = I_TAB-SOLOMON_GR.
              itab-move_type  = '101'.
              itab-mvt_ind    = 'B'.
              itab-plant      = I_MAIN-WERKS.
              itab-material   = I_MAIN-MATNR.
              itab-entry_qnt  = I_MAIN-ERFMG.
             itab-stge_loc   = 'OMR1'.
    itab-move_stloc = pcitab-recv_loc.
             itab-REF_DOC = 'exnum123'.
              itab-NO_MORE_GR = 'X'.
              itab-WITHDRAWN = ''.
              itab-stge_loc   = I_MAIN-LGOBE.
              itab-po_number  = I_MAIN-EBELN.
              itab-po_item    = I_MAIN-EBELP.
              itab-unload_pt  = I_MAIN-ABLAD2.
              append itab.
            ENDLOOP.
            if not itab[] is initial.
              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 sy-tabix = 1.
                  concatenate 'File Name : ' name into i_msg1.
                  append i_msg1.
                  concatenate 'Sol PO : ' I_TAB-SOL_PONO ' '
                   I_TAB-SOL_PODT into i_msg1.
                  append i_msg1.
                endif.
                if errmsg-type eq 'E'.
                  write:/'Error in function', errmsg-message.
                  errflag = 'X'.
                else.
                  write:/ errmsg-message.
                endif.
                move errmsg-message to i_msg1.
                append i_msg1.
              endloop.
              if errflag is initial.
                CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
              EXPORTING
                WAIT          =
              IMPORTING
                RETURN        =
               commit work and wait.
                if sy-subrc ne 0.
                  write:/ 'Error in updating'.
                  exit.
                else.
                  concatenate 'File Name : ' name into i_msg1.
                  append i_msg1.
                  concatenate 'Sol PO : ' I_TAB-SOL_PONO ' '
                   I_TAB-SOL_PODT into i_msg1.
                  append i_msg1.
                  write:/ mthead-mat_doc, mthead-doc_year.
                  ZMM_GR_UPLOAD1-SOLOMON_GR = I_TAB-SOLOMON_GR.
                 CONCATENATE I_TAB-SOLOMON_GRDAT+4(4)
                       I_TAB-SOLOMON_GRDAT+2(2)
                       I_TAB-SOLOMON_GRDAT+0(2) INTO
                        ZMM_GR_UPLOAD1-SOLOMON_GRDAT.
                  ZMM_GR_UPLOAD1-SOLOMON_GRDAT = I_TAB-SOLOMON_GRDAT.
                  INSERT ZMM_GR_UPLOAD1.
                  COMMIT WORK.
                  I_TAB-FLAG = 'C'.
                  MODIFY I_TAB INDEX COUNT.
                  CONCATENATE mthead-mat_doc  mthead-doc_year
                             into i_msg1.
                  append i_msg1.
                 perform upd_sta.
                endif.
              endif.
            endif.
          ENDIF.
        ENDLOOP.

  • How to populate cusotom fields using BAPI_GOODSMVT_CREATE  for MIGO

    Hi,
    I was to update custom field using BAPI_GOODSMVT_CREATE for MIGO and store it is MSEG table.
    Please tell me how to proceed.
    Moderator message: last warning, if you continue to post the same thread again, I will submit your user ID for deletion. See my comments in your previous posts.
    Edited by: Thomas Zloch on Jul 14, 2011 4:38 PM

    Hi ANID,
    Thanks for the reply.
    I have checked in the documention of the bapi and no communication structure regarding to the bapi is there so i am not able to figure out where to add the custom field so that it can be added in the MKPF table.
    Regads
    Dipak

  • MIGO Badi's in BAPI_GOODSMVT_CREATE

    Hi everybody,
    I have implemented the MB_MIGO_BADI to make some extra check in my MIGO transaction. When I use the MIGO transaction online, all works perfect well. The problem is that I need the same with backgroud execution. I use for that the BAPI_GOODSMVT_CREATE to simulate my MIGO transaction but nothing seems to be checked or changed ?
    Any idea about the problem ?
    Thanks a lot
    Durieux Jean-François

    hi every body,
            check this program this is working for me.
    *& Report  ZMM_BBP_INB_DEL_CREATE
    *&BAPI FOR INBOUND DELIVERY
    REPORT  zmm_bbp_inb_del_create NO STANDARD PAGE HEADING LINE-SIZE 300.
    TABLES: eord.
      data definition
          Batchinputdata of single transaction
    DATA:   bdcdata LIKE bdcdata    OCCURS 0 WITH HEADER LINE.
          messages of call transaction
    DATA:   messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
          error session opened (' ' or 'X')
    DATA:   e_group_opened.
          message texts
    TABLES: t100.
    CONSTANTS: nodata VALUE space,
               ctumode VALUE 'N',
               cupdate VALUE 'S',
               smalllog VALUE space.
    *INCLUDE bdcrecx1.
    DATA: BEGIN OF i_eord OCCURS 100,
            matnr LIKE eord-matnr,
            werks LIKE eord-werks,
            erdat LIKE eord-erdat,
            lifnr LIKE eord-lifnr,
            ebeln LIKE eord-ebeln,
            ebelp LIKE eord-ebelp,
          END OF i_eord.
    DATA: BEGIN OF i_input OCCURS 100,
            sl_no(10) TYPE c,
            lifnr(10) TYPE c,
            erdat(10) TYPE c,
            matnr(18) TYPE c,
            lfimg(13) TYPE c,
            budat(10) TYPE c,
            bldat(10) TYPE c,
            delivnt(10) TYPE c,
            exdat(10) TYPE c,
          END OF i_input.
    DATA: is_inb_delivery_header LIKE bbp_inbd_l.
    DATA: BEGIN OF it_inb_delivery_detail OCCURS 100.
            INCLUDE STRUCTURE  bbp_inbd_d.
    DATA: END OF it_inb_delivery_detail.
    DATA: BEGIN OF bapireturn OCCURS 100.
            INCLUDE STRUCTURE bapireturn.
    DATA: END OF bapireturn.
    DATA: lv_file_header TYPE string.
    DATA: w_vbeln TYPE likp-vbeln,
          lv_date TYPE eord-erdat,
          lv_ref_doc_no(10),
          lv_pos_dt_ex(10),
          lv_doc_dt_ex(10),
          lv_slno(10),
          lv_exdat(10),
          lv_lifnr(10).
    DATA: lv_shed_header  TYPE rlgrap-filename.
    DATA: BEGIN OF it_lips OCCURS 100.
            INCLUDE STRUCTURE lips.
    DATA: END OF it_lips.
    DATA: goodsmvt_header  TYPE bapi2017_gm_head_01.
    DATA: BEGIN OF goodsmvt_code OCCURS 100.
            INCLUDE STRUCTURE bapi2017_gm_code.
    DATA: END OF goodsmvt_code.
    DATA: BEGIN OF goodsmvt_item OCCURS 100.
            INCLUDE STRUCTURE bapi2017_gm_item_create.
    DATA: END OF goodsmvt_item.
    DATA: BEGIN OF return OCCURS 100.
            INCLUDE STRUCTURE  bapiret2.
    DATA: END OF return.
    DATA: lv_pos_date TYPE eord-erdat,
          lv_doc_date TYPE eord-erdat.
    DATA: lv_header TYPE rlgrap-filename.
    DATA: lv_mblnr TYPE bapi2017_gm_head_ret-mat_doc,
          lv_year TYPE bapi2017_gm_head_ret-doc_year,
          flag TYPE i.
    DATA: BEGIN OF it_display OCCURS 100,
            d_slno(10) TYPE c,
            d_lifnr(10) TYPE c,
            d_vbeln LIKE likp-vbeln,
            d_mblnr LIKE mseg-mblnr,
            d_mjahr LIKE mseg-mjahr,
            docyr LIKE j_1iexchdr-docyr,
            docno LIKE j_1iexchdr-docno,
            exnum LIKE j_1iexchdr-exnum,
          END OF it_display.
    PARAMETERS: sch_agr TYPE ibipparms-path.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR sch_agr.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          PROGRAM_NAME        = SYST-CPROG
          DYNPRO_NUMBER       = SYST-DYNNR
          FIELD_NAME          = ' '
       IMPORTING
          file_name           = sch_agr.
    START-OF-SELECTION.
      PERFORM file_upload.
      PERFORM pass_value.
      PERFORM display_corr_data.
    FORM file_upload.
      lv_file_header = sch_agr.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                = lv_file_header              "file 1
          filetype                = 'ASC'
          has_field_separator     = 'X'
        TABLES
          data_tab                = i_input            "itab
        EXCEPTIONS
          file_open_error         = 1
          file_read_error         = 2
          no_batch                = 3
          gui_refuse_filetransfer = 4
          invalid_type            = 5
          no_authority            = 6
          unknown_error           = 7
          bad_data_format         = 8
          header_not_allowed      = 9
          separator_not_allowed   = 10
          header_too_long         = 11
          unknown_dp_error        = 12
          access_denied           = 13
          dp_out_of_memory        = 14
          disk_full               = 15
          dp_timeout              = 16
          OTHERS                  = 17.
    ENDFORM.                    "FILE_UPLOAD
    FORM pass_value.
      SORT i_input BY lifnr sl_no.
      LOOP AT i_input.
        CLEAR: lv_date,lv_pos_date,lv_doc_date,lv_pos_dt_ex,lv_doc_dt_ex,lv_exdat, lv_lifnr.
        MOVE i_input-budat TO lv_pos_dt_ex.
        MOVE i_input-bldat TO lv_doc_dt_ex.
        MOVE i_input-lifnr TO lv_lifnr.
        CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
           EXPORTING
             date_external                  = i_input-budat
            ACCEPT_INITIAL_DATE            =
          IMPORTING
            date_internal                  = lv_pos_date
          EXCEPTIONS
            date_external_is_invalid       = 1
            OTHERS                         = 2
        IF sy-subrc <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
           EXPORTING
             date_external                  = i_input-bldat
            ACCEPT_INITIAL_DATE            =
          IMPORTING
            date_internal                  = lv_doc_date
          EXCEPTIONS
            date_external_is_invalid       = 1
            OTHERS                         = 2
        IF sy-subrc <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
        EXPORTING
          date_external                  = i_input-erdat
          ACCEPT_INITIAL_DATE            =
       IMPORTING
         date_internal                  = lv_date
       EXCEPTIONS
         date_external_is_invalid       = 1
         OTHERS                         = 2
        IF sy-subrc <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        MOVE i_input-delivnt TO lv_ref_doc_no .
        MOVE i_input-exdat TO lv_exdat.
        SELECT matnr werks lifnr ebeln ebelp
        INTO CORRESPONDING FIELDS OF TABLE i_eord
        FROM eord
       WHERE lifnr EQ i_input-lifnr
         AND matnr EQ i_input-matnr
         AND ( vdatu LE lv_date
         AND bdatu GE  lv_date )
         AND werks EQ '4210'
         AND notkz NE 'X'
         AND febel EQ 'X'.
        READ TABLE i_eord WITH KEY lifnr = i_input-lifnr.
        IF sy-subrc EQ 0.
          MOVE lv_date TO is_inb_delivery_header-deliv_date.
          MOVE i_input-matnr TO it_inb_delivery_detail-material.
          MOVE i_input-lfimg TO it_inb_delivery_detail-deliv_qty.
          MOVE i_eord-ebeln TO it_inb_delivery_detail-po_number.
          MOVE i_eord-ebelp TO it_inb_delivery_detail-po_item.
          it_inb_delivery_detail-unit = 'EA'.
          APPEND it_inb_delivery_detail.
        ENDIF.
        AT END OF  sl_no.
          CLEAR lv_slno.
          lv_slno = i_input-sl_no.
          it_display-d_slno = lv_slno.
          it_display-d_lifnr = lv_lifnr.
    *Inbound delivery creation
          PERFORM create_inb_deliv.
          IF NOT w_vbeln IS INITIAL.
            PERFORM extract.
          ELSE.
            WRITE /.
            FORMAT COLOR 2.
            WRITE:/ 'Inbound delivery is not created'.
            WRITE:/(64) sy-uline.
          ENDIF.
        ENDAT.
      ENDLOOP.
    ENDFORM.                    "PASS_VALUE
    *inbound delivery creating
    FORM create_inb_deliv.
      CLEAR w_vbeln.
      CALL FUNCTION 'ZBBP_INB_DELIVERY_CREATE'
        EXPORTING
          is_inb_delivery_header = is_inb_delivery_header
        IMPORTING
          ef_delivery            = w_vbeln
        TABLES
          it_inb_delivery_detail = it_inb_delivery_detail
          return                 = bapireturn.
      UPDATE likp SET   xabln = lv_slno
                        WHERE vbeln = w_vbeln.
      COMMIT WORK AND WAIT.
      IF w_vbeln IS INITIAL.
        FORMAT COLOR 6.
        WRITE:/ 'Record no:' , lv_slno.
        SKIP 1.
        WRITE:/ 'INBOUND DELIVERY: ', w_vbeln.
       WRITE:/(64) sy-uline.
        FORMAT COLOR OFF.
        APPEND it_display.
        CLEAR it_display.
        LOOP AT bapireturn.
          WRITE:/ bapireturn-type , bapireturn-message.
        ENDLOOP.
      ELSE.
        FORMAT COLOR 5.
        it_display-d_vbeln = w_vbeln.
      ENDIF.
      CLEAR: it_inb_delivery_detail, bapireturn.
      REFRESH: it_inb_delivery_detail, bapireturn.
    ENDFORM.                    "CREATE_INB_DELIV
    FORM extract.
      goodsmvt_code-gm_code = '01'.
      MOVE lv_pos_date TO goodsmvt_header-pstng_date.
      MOVE lv_doc_date TO goodsmvt_header-doc_date.
    MOVE lv_ref_doc_no TO goodsmvt_header-ref_doc_no.
    goodsmvt_header-header_txt = goodsmvt_header-ref_doc_no.
      goodsmvt_header-ref_doc_no = i_input-sl_no.
      goodsmvt_header-header_txt = i_input-sl_no.
      SELECT * INTO TABLE it_lips
        FROM lips
       WHERE vbeln EQ w_vbeln.
      LOOP AT it_lips.
        MOVE it_lips-matnr TO goodsmvt_item-material.
        MOVE it_lips-werks TO goodsmvt_item-plant.
        MOVE it_lips-bwart TO goodsmvt_item-move_type.
        MOVE it_lips-lfimg TO goodsmvt_item-entry_qnt.
        goodsmvt_item-entry_uom = 'EA'.
        goodsmvt_item-mvt_ind = 'B'.
        MOVE it_lips-vbeln TO goodsmvt_item-deliv_numb_to_search.
        MOVE it_lips-posnr TO goodsmvt_item-deliv_item_to_search.
        MOVE lv_lifnr TO goodsmvt_item-item_text.
        APPEND goodsmvt_item.
      ENDLOOP.
    *GR Creation
      PERFORM create.
      IF NOT lv_mblnr IS INITIAL AND
       NOT lv_year IS INITIAL.
    *Excise Creation
        PERFORM bdc.
      ELSE.
        WRITE /.
        FORMAT COLOR 2.
        WRITE:/ 'Record no:' , i_input-sl_no.
        WRITE / 'Goods Receipt is not created'.
      ENDIF.
      REFRESH: it_lips , goodsmvt_item.
      CLEAR: it_lips, goodsmvt_header, goodsmvt_item.
    ENDFORM.                    "EXTRACT
    FORM create.
      CLEAR: lv_mblnr,lv_year.
      CALL FUNCTION 'J_1I6_STORE_EXCISE_INVOICE_NUM'
       EXPORTING
        DOCNO                 =
        DOCYR                 =
         EXNUM                 =
        EXYEAR                =
        LIFNR                 =
         exgrp                 = '42'
         regtyp                = 'A'
        STATUS                =
        SUBCON_CHALLANS       =
        GRXREF                =
      CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
        EXPORTING
          goodsmvt_header               = goodsmvt_header
          goodsmvt_code                 = goodsmvt_code
        TESTRUN                       = ' '
        GOODSMVT_REF_EWM              =
       IMPORTING
        GOODSMVT_HEADRET              =
         materialdocument              = lv_mblnr
         matdocumentyear               = lv_year
        TABLES
          goodsmvt_item                 = goodsmvt_item
        GOODSMVT_SERIALNUMBER         =
          return                        = return
        GOODSMVT_SERV_PART_DATA       =
        EXTENSIONIN                   =
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
      IF lv_mblnr IS INITIAL AND
         lv_year IS INITIAL.
        FORMAT COLOR 6.
        WRITE:/ 'Record no:' , lv_slno.
        WRITE:/ 'GOODS MOVEMENT', lv_mblnr , lv_year.
        APPEND it_display.
        CLEAR it_display.
        FORMAT COLOR OFF.
        LOOP AT return.
          WRITE:/ return-type,return-message.
        ENDLOOP.
      ELSE.
        FORMAT COLOR 5.
        it_display-d_mblnr = lv_mblnr.
        it_display-d_mjahr = lv_year.
      ENDIF.
    ENDFORM.                    "CREATE
    FORM bdc.
      WAIT UP TO 1 SECONDS.
      PERFORM bdc_dynpro      USING 'SAPLJ1IEX' '0001'.
      PERFORM bdc_field       USING 'J_1IEXDYNPRO-ACTION'
                                       'A01'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=J1IEX_OK_ACTION'.
      PERFORM bdc_dynpro      USING 'SAPLJ1IEX' '0001'.
      PERFORM bdc_field       USING 'J_1IEXDYNPRO-REFDOC'
                                       'R05'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=J1IEX_OK_REFDOC'.
      PERFORM bdc_dynpro      USING 'SAPLJ1IEX' '0001'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=J1IEX_OK_GO'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'J_1IEXDYNPRO-MAT_DOC_YEAR'.
      PERFORM bdc_field       USING 'J_1IEXDYNPRO-MAT_DOC'
                                     lv_mblnr .
      PERFORM bdc_field       USING 'J_1IEXDYNPRO-MAT_DOC_YEAR'
                                     lv_year.
      PERFORM bdc_dynpro      USING 'SAPLJ1IEX' '0001'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '=OK_CENVAT'.
      PERFORM bdc_field       USING 'BDC_CURSOR'
                                    'J_1IEXHEAD-BUDAT'.
      PERFORM bdc_field       USING 'J_1IEXHEAD-EXNUM'
                                        lv_ref_doc_no.
      PERFORM bdc_field       USING 'J_1IEXHEAD-EXDAT'
                                        lv_exdat.
      PERFORM bdc_field       USING 'J_1IEXHEAD-EXGRP'
                                       '42'.
      PERFORM bdc_field       USING 'J_1IEXHEAD-BUDAT'
                                        lv_pos_dt_ex.
      PERFORM bdc_transaction USING 'J1IEX'.
    ENDFORM.                    "bdc
           Start new screen                                              *
    FORM bdc_dynpro USING program dynpro.
      CLEAR bdcdata.
      bdcdata-program  = program.
      bdcdata-dynpro   = dynpro.
      bdcdata-dynbegin = 'X'.
      APPEND bdcdata.
    ENDFORM.                    "BDC_DYNPRO
           Insert field                                                  *
    FORM bdc_field USING fnam fval.
      IF fval <> nodata.
        CLEAR bdcdata.
        bdcdata-fnam = fnam.
        bdcdata-fval = fval.
        APPEND bdcdata.
      ENDIF.
    ENDFORM.                    "BDC_FIELD
           Start new transaction according to parameters                 *
    FORM bdc_transaction USING tcode.
      DATA: l_mstring(480).
      DATA: l_subrc LIKE sy-subrc.
    batch input session
      REFRESH messtab.
      CALL TRANSACTION tcode USING bdcdata
                       MODE   ctumode
                       UPDATE cupdate
                       MESSAGES INTO messtab.
      l_subrc = sy-subrc.
      IF smalllog <> 'X'.
        CLEAR flag.
        READ TABLE messtab WITH KEY msgtyp = 'E' .
        IF sy-subrc = 0.
          FORMAT COLOR 6.
          APPEND it_display.
          CLEAR: it_display, flag.
        ELSE.
          FORMAT COLOR 5.
          flag = 1.
        ENDIF.
        READ TABLE messtab WITH KEY msgnr = '344'.
        IF sy-subrc = 0.
          FORMAT COLOR 6.
          APPEND it_display.
          CLEAR: it_display, flag.
        ELSE.
          FORMAT COLOR 5.
          flag = 1.
        ENDIF.
        IF flag = 1.
          it_display-exnum  = lv_ref_doc_no.
          it_display-d_slno = lv_slno.
          APPEND it_display.
          CLEAR it_display.
        ELSE.
          WRITE /.
          FORMAT COLOR 2.
          WRITE:/ 'Record no:' , lv_slno.
          FORMAT COLOR 6.
          WRITE / 'Excise creation for Part 2'.
          FORMAT COLOR OFF.
          WRITE: / 'CALL_TRANSACTION',
                   tcode,
                   'returncode:'(i05),
                   l_subrc,
                   'RECORD:',
                   sy-index.
          LOOP AT messtab.
            SELECT SINGLE * FROM t100 WHERE sprsl = messtab-msgspra
                                      AND   arbgb = messtab-msgid
                                      AND   msgnr = messtab-msgnr.
            IF sy-subrc = 0.
              l_mstring = t100-text.
              IF l_mstring CS '&1'.
                REPLACE '&1' WITH messtab-msgv1 INTO l_mstring.
                REPLACE '&2' WITH messtab-msgv2 INTO l_mstring.
                REPLACE '&3' WITH messtab-msgv3 INTO l_mstring.
                REPLACE '&4' WITH messtab-msgv4 INTO l_mstring.
              ELSE.
                REPLACE '&' WITH messtab-msgv1 INTO l_mstring.
                REPLACE '&' WITH messtab-msgv2 INTO l_mstring.
                REPLACE '&' WITH messtab-msgv3 INTO l_mstring.
                REPLACE '&' WITH messtab-msgv4 INTO l_mstring.
              ENDIF.
              CONDENSE l_mstring.
              WRITE: / messtab-msgtyp, l_mstring(250).
            ELSE.
              WRITE: / messtab.
            ENDIF.
          ENDLOOP.
          SKIP.
        ENDIF.
      ENDIF.
    Erzeugen fehlermappe ************************************************
      REFRESH bdcdata.
    ENDFORM.                    "BDC_TRANSACTION
    *&      Form  display_corr_data
          text
    -->  p1        text
    <--  p2        text
    FORM display_corr_data .
      WRITE:/01 sy-vline, 'SL NO' COLOR 3,
             13 sy-vline, 'Vendor' COLOR 3,
             23 sy-vline, 'INB DEL' COLOR 3,
             34 sy-vline, 'GR NUMBER' COLOR 3,
             46 sy-vline, 'EXCISE NO' COLOR 3,
             58 sy-vline, 'EXCISE YEAR' COLOR 3,
             74 sy-vline.
      WRITE:/(74) sy-uline.
      SORT it_display BY d_lifnr d_slno.
      LOOP AT it_display.
        SELECT SINGLE docno docyr
        INTO (it_display-docno,
               it_display-docyr)
        FROM j_1iexchdr
       WHERE exnum EQ it_display-exnum.
        WRITE:/01 sy-vline, it_display-d_slno,
               13 sy-vline, it_display-d_lifnr,
               23 sy-vline, it_display-d_vbeln,
               34 sy-vline, it_display-d_mblnr,
               46 sy-vline, it_display-docno,
               58 sy-vline, it_display-docyr,
               74 sy-vline.
      ENDLOOP.
      WRITE:/(74) sy-uline.
    ENDFORM.                    " display_corr_data
    this will create automatically
    1. inbound delivery
    2. GR  IR
    3. excise part1
    4. excise part 2
    regards
    Pravin kumar

  • Field to MIGO cert.enclosed in the BAPI BAPI_GOODSMVT_CREATE

    Hi All,
    I am doing Good Receipt for Purchase Order.
    In MIGO we have Cert.enclosed (Quality) value Yes or No.
    I want to insert the Cert.enclosed (Quality) using BAPI BAPI_GOODSMVT_CREATE.
    Please let me know which field in BAPI_GOODSMVT_CREATE, I can insert the Cert.enclosed (Quality) value.
    Thanks in Advance.
    Debopriya G

    Please take a look at SAP KBA- 0001718791. Kindly mark if helpful.
    SAP Knowledge Base Article
    Symptom
    There is no import parameter in BAPI_GOODSMVT_CREATE that you can use to confirm the QM certificate.
    Environment
    SAP Release Independent
    Reproducing the Issue
    1. In T-code SE37, execute the function module BAPI_GOODSMVT_CREATE
    2. In the import tab and tables tab, check all the parameters, there is no place to enter the QM certificate (COA)
    Cause
    Missing functionality in BAPI_GOODSMVT_CREATE
    Resolution
    Please use BDC (batch input) for MB** transactions (MB01, MB0A, MB1A, MB1B, MB1C, etc.) instead.
    Keywords
    QCERT_MIGO-ANSWER, QBCK_QM_GR_CHECK
    Header Data
    Product
    This document is not restricted to a product or product version
    References
    This document refers to:
    CSS SAP Notes
    1718791 - Certificate of Analysis (COA) in BAPI_GOODSMVT_CREATE
    Version 1 Validity: 05/15/2012 - active Language English
    Released On 02/12/2013 02:32:24
    Release Status Released to Customer
    Component MM-IM-GF-BAPI BAPIs for Goods Movements
    QM-CA Quality Certificates
    Priority Normal
    Category How To
    304122 MIGO: Batch input and CATT not supported
    Other Components

  • BAPI_GOODSMVT_CREATE for MIGO

    HI I want to use BAPI_GOODSMVT_CREATE to to MIGO,
    gmcode-gm_code    = '01', itemitab-mvt_ind    = 'B'.
    and I want to use the Delivery note, but I didn't find this field in the BAPI? Can anyone tell me how to add delivery note in the BAPI?
    Thanks in advance!

    Hi Friend,
    Add in BAPI2017_GM_HEAD_01-REF_DOC_NO in GOODSMVT_HEADER Parameter of that BAPI.
    Hope it will solve ur problem.
    Regards
    Krishnendu

  • BAPI_GOODSMVT_CREATE to import data in MIGO tcode

    Hi ,
    Under tcode MIGO if we give material document number and display it displays several tabs in the bottom along with import tab.
    In Import tab we have a button details that opens Import data popup.
    Using BAPI BAPI_GOODSMVT_CREATE can we fill the data in that popup like prelim doc no? those fields are coming from EIPO table.
    what is the link between material document number and EIPO
    Thanks
    Bala Duvvuri

    Hi,
      Please take a look at this links for sample coding of BAPI_GOODSMVT_CREATE.
    http://www.sap-img.com/abap/bapi-goodsmvt-create-to-post-goods-movement.htm
    http://www.4ap.de/abap/bapi_goodsmvt_create.php
    Regards
    Kiran Sure

  • BAPI_GOODSMVT_CREATE different VBUND error, MIGO works

    Hi,
    I am getting the following error trying to receipt goods via BAPI_GOODSMVT_CREATE.
    F5080 "Consolidated companies & and & are different". This is due to having 2 entries having vendors with different VBUNDs.
    I went through SAP notes 4152 and 183989 but they suggest to modify document type settings to allow cross-company postings. The problem is doing the same posting via MIGO works fine, but BAPI returns an error.
    Here is the (pseudo) code:
      items-material = material.
      items-plant = stany-zaklad.
      items-stge_loc = stany-sklad.          
      items-move_type = stany-rodzaj_ruchu. " 561
      items-spec_stock = stany-wskaznik_zapasow_spec. " 'O'
      items-batch = stany-numer_partii. " INITIAL
      items-entry_qnt = stany-ilosc.
      items-amount_lc = stany-kwota_w_wk.
      items-vendor = stany-dostawca.
      APPEND items.
      CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
            goodsmvt_code                 = '05'
    At document level I only set document date, posting date and header text.
    What am I missing ?
    Cheers,
    Bart

    Hi Mike,
    There is a BADI but it is not getting trigered(MB_DOCUMENT_UPDATE)while posting documents.
    Thanks,Thanks for responding.

  • BAPI_GOODSMVT_CREATE is not working for movement type 701 in MIGO

    Hi gurus
    Can anybody help to track that bapi: BAPI_GOODSMVT_CREATE is not working for movement type 701 for MIGO Transaction.

    call this standard BAPI, AND EXECUTE IN SE37
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(GOODSMVT_HEADER) LIKE  BAPI2017_GM_HEAD_01 STRUCTURE
    *"        BAPI2017_GM_HEAD_01
    *"     VALUE(GOODSMVT_CODE) LIKE  BAPI2017_GM_CODE STRUCTURE
    *"        BAPI2017_GM_CODE
    *"     VALUE(TESTRUN) LIKE  BAPI2017_GM_GEN-TESTRUN DEFAULT SPACE
    *"     VALUE(GOODSMVT_REF_EWM) LIKE  /SPE/BAPI2017_GM_REF_EWM STRUCTURE
    *"        /SPE/BAPI2017_GM_REF_EWM OPTIONAL
    *"  EXPORTING
    *"     VALUE(GOODSMVT_HEADRET) LIKE  BAPI2017_GM_HEAD_RET STRUCTURE
    *"        BAPI2017_GM_HEAD_RET
    *"     VALUE(MATERIALDOCUMENT) TYPE  BAPI2017_GM_HEAD_RET-MAT_DOC
    *"     VALUE(MATDOCUMENTYEAR) TYPE  BAPI2017_GM_HEAD_RET-DOC_YEAR
    *"  TABLES
    *"      GOODSMVT_ITEM STRUCTURE  BAPI2017_GM_ITEM_CREATE
    *"      GOODSMVT_SERIALNUMBER STRUCTURE  BAPI2017_GM_SERIALNUMBER
    *"       OPTIONAL
    *"      RETURN STRUCTURE  BAPIRET2
    *"      GOODSMVT_SERV_PART_DATA STRUCTURE
    *"        /SPE/BAPI2017_SERVICEPART_DATA OPTIONAL
    *"      EXTENSIONIN STRUCTURE  BAPIPAREX OPTIONAL
    *"      GOODSMVT_ITEM_CWM STRUCTURE  /CWM/BAPI2017_GM_ITEM_CREATE
    *"       OPTIONAL
      call function 'BAPI_GOODSMVT_CREATE'
        exporting
          goodsmvt_header         = goodsmvt_header
          goodsmvt_code           = goodsmvt_code
          testrun                 = testrun
          goodsmvt_ref_ewm        = goodsmvt_ref_ewm
        importing
          goodsmvt_headret        = goodsmvt_headret
          materialdocument        = materialdocument
          matdocumentyear         = matdocumentyear
        tables
          goodsmvt_item           = goodsmvt_item
          goodsmvt_serialnumber   = goodsmvt_serialnumber
          return                  = return
          goodsmvt_serv_part_data = goodsmvt_serv_part_data
          extensionin             = extensionin.
    commit work.
    hi, rewards point, if this is useful,
    regrds
    karthikeyan

  • Update field LSMNG in MIGO transaction using bapi bapi_goodsmvt_create

    Hi ,
       I am using bapi bapi_goodsmvt_create  for creating goods receipt against purchase order in which I have to update field LSMNG i.e. Del. Note Qty. But this field is not there in BAPI input parameters/table fields.
    How i can update this field using the same bapi
    Thanks and regards
    Deepak Sharma

    Hi,
       Can I update this field using BAPI bapi_goodsmvt_create.
    thanks
    Deepak

  • BADI for MIGO & BAPI_GOODSMVT_CREATE

    Hello Experts,
    I want to find out a BADI which fills MSEG-LGPLA with MARD-LGPBE at the time of creation of a Material document from MIGO or a BAPI. Could you please suggest me a solution for this.
    I am working 4.6c Version
    Thanks in Advance
    Regards,
    Vasanth
    Message was edited by: Vasanth M

    Hi Vasanth!
    For field MSEG-LGORT you can use user-exit EXIT_SAPMM07M_009 (extension MBCF0009).
    If you can influence MARD directly - or if you have to change a field in MSEG to forward your value by standard into MARD - I don't know.
    At least have a look at extensions (in SMOD) starting MBCF* and MB_CF001.
    Regards,
    Christian

  • Error while using BAPI_GOODSMVT_CREATE

    Hi friends,
                    When I do a 301 movement from MIGO transaction using BAPI BAPI_GOODSMVT_CREATE ..  I m getting an error "The plant material data is locked by the user".. Can you help me out to solve this and post the goods movement.. it is very urgent requirement... Will reward points for helpfull answers,
    Thanks in advance,
    Rama..

    Hi ,
    Check the Following :
    Is your material is being edited by some user via MM02 etc.
    Can you try calling the BAPI FM in Background task ? I guess that might Solve the problem ?
    <b>REWARD IF USEFUL</b>
    Regards,
    Saket Sharma
    null

  • Getting error while posting GR using IBD from BAPI_GOODSMVT_CREATE

    Hi Experts,
    While posting GR from IBD using BAPI_GOODSMVT_CREATE with all necessary values like plant,material,mvttype and serial numbers etc...
    getting error from BAPI return "1  E VLA 315 Item 000010 requires serial numbers; use the inbound delivery dialog".
    I have tried with same IBD number from Tx: VL32N able to post Goods receipt successfully with above data,but whereas tried to post same IBD with Tx:MIGO getting same bapi error as above mentioned.
    I have tried with solutions some of the blogs from SCN but no luck
    is it necessary to implement this note in my system?
    Error message VLA315 during GR for inbound deliv. using MIGO
    Can you please give me suggestions what i have missed in my code/Configurations.
    Thanks,
    Syam

    is it necessary to implement this note in my system?
    Error message VLA315 during GR for inbound deliv. using MIGO
    Yes. Installing notes using Tx SNOTE is very easy. If you find a note that is relevant for your system, just install it.

  • Regarding BAPI_GOODSMVT_CREATE

    Hi Experts!
    I am using BAPI_GOODSMVT_CREATE to create a material document in migo screen using mb01 transaction.
    I am getting one error that is whenever i put the quantity in , for example
    if ordered quantity is 20 and i put quantity in unit of entry 21 it does not qive me error that p0 exceeded by 1. and post the data.
    but after 24 it gives me an error which it has to given earlier 'po exceeded by 4'.
    i am using gm_code = 01
    with kzbew = B.
    also populating fields like
    matnr, po, po item, entry_qnt, movement type = 101
    posting date, document date and reference document.
    so plz help me out with that.
    thanks in advance

    Hi
    Check this and do accordingly
    REPORT ZRICH_0001 .
    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 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      = '04'.                                " MB1A
    Write 971 movement to table
    CLEAR GM_ITEM.
    MOVE '412'                 TO GM_ITEM-MOVE_TYPE     .
    MOVE 'Q'                 TO GM_ITEM-SPEC_STOCK.
    MOVE '3800533484'  TO GM_ITEM-MATERIAL.
    MOVE '1'     TO GM_ITEM-ENTRY_QNT.
    *MOVE 'PC'    TO GM_ITEM-ENTRY_UOM.
    MOVE '1060'  TO GM_ITEM-PLANT.
    MOVE '0007'  TO GM_ITEM-STGE_LOC.
    *MOVE '0901'   TO GM_ITEM-MOVE_REAS.
    MOVE 'P203601001' TO GM_ITEM-WBS_ELEM.
    MOVE 'P203601001' TO GM_ITEM-VAL_WBS_ELEM.
    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.
    WRITE:/ GM_RETMTD.
    LOOP AT GM_RETURN.
      WRITE:/ GM_RETURN.
    ENDLOOP.
    check the BAPI_GOODSMVT_CREATE.
    Functionality
    You can use this method to create a material document for a goods movement.
    You can only create one material document each time you call up the method.
    You can use a simulation function before posting the goods movement to check how the data is updated in the database. The standard system is configured so that the goods movement is posted immediately without simulating beforehand.
    Ensure that you transfer the data in the same way as it is run in the database, for example,
    Material number 18-figure with leading zeros
    Batches with uppercase letters
    Note that for all transactions/events listed below, the posting date is entered in the header data of the material document. In the BAPI2017_GM_HEAD_01 interface, fill the PSTNG_DATE (import structure GOODSMVT_HEADER) field.
    Notes
    Authorization check check
    In the MM Inventory Management component, the method does not execute any authorization checks.
    Note that during a posting of a goods movement, depending on the business transaction of the system, authorization objects of other applications can also be checked.
    Transfer
    The following information about the material document that is to be created is transferred to the method:
    a structure with header data
    a structure with the code for the movement
    a table with the item data
    a table with the serial numbers
    The posting is carried out in the SAP R/3 via the MB_CREATE_GOODS_MOVEMENT function module.
    Confirmations
    Messages are returned in the Return parameter. The parameter documentation shows the return codes and their meanings.
    Further Information
    The method can only carry out your function if no error messages were generated in the Return table. This is the case if the header data and all the items were processed successfully.
    Transaction control is not implemented. The calling program therefore has to execute the Commit Work itself after this method has been successfully called (in other words, if no errors were reported in the Return parameter).
    Which fields have to be filled during the various transactions/ events?
    The following sample scenarios demonstrate which fields have to be filled for which business transactions/events (code).
    There are the following types of transactions/events:
    1. GM_Code 01: Goods receipt for purchase order
    2. GM_Code 02: Goods receipt for production order
    3. GM_Code 03: Goods issue
    4. GM_Code 04: Transfer posting
    5. GM_Code 05: Other goods receipts
    6. GM_Code 06: Reversal of goods movements
    7. GM_Code 07: Subsequent adjustment to a subcontract order
    Entering the movement indicator
    Depending on the transaction, you must enter the following in the movement indicator:
    GM_Code 01 (Goods receipt for purchase order): B
    GM_Code 02 (Goods receipt for production order): F
    For all other transactions, you leave the field blank.
    For 1: GM_Code 01: Goods receipt for purchase order
    Purchase order known
    The following fields have to be filled:
    Purchase order
    Purchase order item
    Movement type
    Movement indicator
    Quantity in unit of entry
    ISO code unit of measurement for unit of entry or
    quantity proposal
    The following fields may have to be filled in some cases (incomplete listing):
    Shelf life expiration date (if it has been configured like this in the system)
    Reason for movement (if it has been configured like this in the system)
    Batch (if the material is handled in batches and batch numbers are not assigned automatically)
    Storage location (if a storage location has not been specified in the purchase order item)
    The following fields can be filled (incomplete listing):
    Stock type
    Item text
    Unloading point
    Delivery completed indicator
    You cannot fill the following fields (incomplete listing):
    Account assignment fields (account assignment is adopted from the purchase order)
    Reservation
    Receiving/issuing material
    Receiving/issuing plant
    Receiving/issuing storage location
    In the case of a purchase order item with the "subcontracting" item category, only the GR item in the interface is to be transferred. The system automatically determines GI items.
    Purchase order unknown: Shipping notification known
    The following fields have to be filled:
    Delivery
    Delivery item
    Movement type
    Other fields, such as those under "Purchase order known". The system determines the relevant purchase order item via the delivery/delivery item.
    Purchase order unknown: Purchase order should be created automatically
    The following fields have to be filled:
    Material number
    Plant
    Storage location
    Vendor
    Movement type
    Movement indicator
    Quantity in unit of entry
    ISO code unit of measurement for unit of entry
    The following fields may have to be filled in some cases (incomplete listing):
    Shelf life expiration date (if it has been configured like this in the system)
    Reason for movement (if it has been configured like this in the system)
    Batch (if the material is handled in batches and batches are not assigned automatically)
    The following fields can be filled (incomplete listing):
    Stock type
    Item text
    Unloading point
    You cannot fill the following fields (incomplete listing):
    Account assignment fields (automatic creation of purchase order items with account assignment is not supported)
    Reservation
    Receiving/issuing material
    Receiving/issuing plant
    Receiving/issuing storage location
    Purchase order unknown: A purchase order should not be created
    The following fields have to be filled:
    Material number
    Plant
    Storage location
    Vendor
    Movement type
    Movement indicator
    Quantity in unit of entry
    ISO code unit of measurement for unit of entry
    The following fields may have to be filled in some cases (incomplete listing):
    Shelf life expiration date (if it has been configured like this)
    Reason for movement (if it has been configured like this)
    Batch (if the material is handled in batches and automatic assignment of batch numbers is not set)
    The following fields can be filled (incomplete listing):
    Special stock indicator
    Item text
    Unloading point
    Goods recipient
    The following fields cannot be filled (incomplete listing):
    Account assignment fields (automatic creation of purchase order items with account assignment is not supported)
    Reservation
    Receiving/issuing material
    Receiving/issuing plant
    Receiving/issuing storage location
    Receiving/issuing batch
    The input combinations listed above for the GM_CODE 01 can be combined within an input table so that they can be posted in a material document. Items can also be posted for different purchase orders, provided that all the purchase orders refer to the same vendor.
    Transfer of subcontracting components
    During the posting of the ordered material of a subcontract order with movement type 101, for the transfer of the subcontracting components, the filled unique identification of the document line (LINE_ID) is also required.
    More information on LINE_ID and PARENT_ID
    The following fields have to be filled for the components:
    Unique identification of the document line
    Identification of the immediately superior line
    Material number
    Plant
    Storage location
    Quantity in unit of entry
    The following fields can be filled for the components:
    All other fields in the method that are included in this list.
    The following fields cannot be filled for the components:
    All fields that are not included in the list above. The movement indicator must be initial.
    Additional fields in goods-receipt-based invoice verification
    When you post a goods receipt to purchase order with movement type 102, an issue with reference to a previously posted goods issue, the following fields must also be transferred:
    REF_DOC_IT (LFPOS): Item of a reference document
    REF_DOC (LFBNR): Document number of a reference document
    REF_DOC_YR (LFBJA): Fiscal year of a reference document
    Only when you transfer these fields is it guaranteed that the reference to the original goods movement stay the same.
    For 2 GM_Code 02: Goods receipt for production order
    The following fields have to be filled:
    Order
    Movement type
    Movement indicator
    Quantity in unit of entry
    ISO code unit of measurement for unit of entry or
    quantity proposal
    The following fields may have to be filled in some cases (incomplete listing):
    Shelf life expiration date (if the system has been configured like this)
    Reason for movement (if the system has been configured like this)
    Batch (if the material is handled in batches and automatic batch number assignment is not set)
    Storage location (if storage location has not been specified in the order)
    The following fields can be filled (incomplete listing):
    Order item (co-product)
    Stock type
    Item text
    Unloading point
    "Delivery completed" indicator
    The following fields cannot be filled (incomplete listing):
    Account assignment fields (the account assignments are adopted from the purchase order)
    Reservation
    Receiving/issuing material
    Receiving/issuing plant
    Receiving/issuing storage location
    Receiving/issuing batch
    For 3 GM_Code 03: Goods issue
    Goods issue without reference to a reservation
    The following fields have to be filled:
    Material number
    Plant
    Storage location
    Movement type
    Movement indicator
    Quantity in unit of entry
    ISO code unit of measurement for unit of entry
    The following fields may have to be filled in some cases (incomplete listing):
    Special stock (e.g. sales order, project, vendor etc.)
    Shelf life expiration date (if the system is configured like this)
    Reason for movement (if the system has been configured like this)
    Batch (if the material is handled in batches and automatic batch number assignment is not set)
    Account assignment fields
    The following fields can be filled (incomplete listing):
    Special stock indicator
    Item text
    Unloading point
    Goods recipient
    The following fields cannot be filled (incomplete listing):
    Reservation
    Receiving/issuing material
    Receiving/issuing plant
    Receiving/issuing storage location
    Receiving/issuing batch
    Goods issue with reference to a reservation
    The following fields have to be filled:
    Reservation number
    Reservation item
    Record type of the reservation
    Movement indicator
    Quantity in unit of entry
    ISO code unit of measurement for unit of entry
    The following fields may have to be filled in some cases (incomplete listing):
    Shelf life expiration date (if this has been configured in the system)
    Reason for movement (if this has been configured in the system)
    Batch (if the material is handled in batches and automatic batch number assignment is not set)
    Storage location (if not planned in the reservation)
    The following fields can be filled (incomplete listing):
    Special stock indicator
    Item text
    Unloading point
    Goods recipient
    The following fields cannot be filled (incomplete listing):
    Movement type
    Material
    Plant
    Account assignment fields
    For 4 GM_Code 04: Transfer posting
    Transfer posting without reference to a reservation
    The following fields have to be filled:
    Material number
    Plant
    Storage location
    Movement type
    Movement indicator
    Quantity in unit of entry
    ISO code unit of measurement for unit of entry
    The following fields may have to be filled in some cases (incomplete listing):
    Receiving material
    Receiving plant
    Receiving storage location
    Receiving batch (if material is handled in batches and you want to change batches)
    Receiving/issuing special stock (e.g. sales order, project, vendor etc.)
    Shelf life expiration date (if this has been configured in the system)
    Reason for movement (if this has been configured in the system)
    Batch (if the material is handled in batches and automatic batch number assignment is not set)
    The following fields can be filled (incomplete listing):
    Special stock indicator
    Item text
    Account assignment fields (for automatic posting lines: Expense/income from stock transfer)
    The following fields cannot be filled (incomplete listing):
    Reservation
    Transfer posting with reference to a reservation
    See goods issue with reference to a reservation
    For 5 GM_Code 05: Other goods receipts
    Other goods receipt without reference to a reservation
    See goods issue without reference to a reservation
    Other goods receipt with reference to a reservation
    See goods issue with reference to a reservation
    For 6 GM_Code 06: Reversal of goods movements
    You can use the Cancel method to reverse goods movements. But you may also want to cancel a goods movement without referring to a material document (see the Cancel method).
    If you want to work without referring to the document, you have to fill the field BAPI_GM_ITEM_CREATE-XSTOB in the interface (import table GOODSMVT_ITEM). In this case, the system converts the movement type assigned in the interface to the reversal movement type. Alternatively, you can set the reversal movement type in the interface. In this case, the BAPI_GM_ITEM_CREATE_XSTOB field must be transferred blank.
    If you want to cancel a goods movement with reference to a reservation (without using the Cancel method) you can only transfer the field BAPI_GM_ITEM_CREATE_XSTOB if it is filled. Movement types are not transferred when you post with reference to a reservation, as the movement type is contained in the reservation item.
    For 7. GM_Code 07: Subsequent adjustment to a subcontract order
    Ordered material of subcontract order
    The following fields have to be filled:
    Unique identification of document line (can be assigned to anything)
    Posting date in document header
    Document number of purchasing document
    Item number of purchasing document
    Material number check
    Plant check
    Movement type (select movement type 121)
    Movement indicator (must be O)
    Further entries are not allowed. The entry quantity for the ordered material of a subcontract order must be zero.
    Components
    The following fields have to be filled:
    Unique identification of document line (can be assigned to anything)
    Identification of the immediately superior line
    Plant
    Material number check
    Quantity in unit of entry; can also be negative
    The following fields can be filled:
    Storage location
    All other fields in the method that are included in this list.
    The following fields may not be filled:
    All fields that are not in the list above. The movement indicator must be blank.
    More information on LINE_ID and PARENT_ID
    Additional fields in goods-receipt-based invoice verification
    When you post a subsequent adjustment, the following fields must also be transferred:
    REF_DOC_IT (LFPOS): Item of a reference document
    REF_DOC (LFBNR): Document number of a reference document
    REF_DOC_YR (LFBJA): Fiscal year of a reference document
    Only when you transfer these fields is it guaranteed that the reference to the original goods movement stays the same.
    Regards
    Anji

  • MIGO BDC is not working in  Scheduled BG Job

    Hello,
    For Subcontracting Purchase Order Item, we are using the BDC Call Transaction method for the TCode
    MIGO in the program  'ZMIGO_TEST'.
    When we are testing the Program 'ZMIGO_TEST' through SE38 it is running successfuly and document is also posted but problem is when we schedule the same program 'ZMIGO_TEST' in SM36, same BDC code for MIGO Transaction is not working and giving the Error in IST_BDCMSGCOLL as folloow.
    MSGID: - DC
    MSGTYP: - S
    MSGNR: - 006
    DYNAME: -  0001
    MSGV4: -  SAPLMIGO
    NOTE: - We can not use the BAPI 'BAPI_GOODSMVT_CREATE' because we have to update the Challan Number and Challan Year also for each PO Line Item and this BAPI does not have thses two fields in its Parameter Interface.
    Please suggest.
    Thanks & Regards
    Jagesh

    hi,
    check below tcodes..
    Subcontracting Process
    Subcontracting without Payment of Duty
    Creation of Subcontracting PO (ME21N) 
    Transfer Posting of Components to Subcontractor (Mvmt Type - 541) (MB1B/ME2O/MIGO) 
    Creation of Subcontracting Challan w.r.t. Transfer Posting Doc (J1IF01) 
    Goods Receipt w.r.t. Subcontracting PO and Refer Subcontracting Challan at the time of GR (MIGO) {GR with 101 and auto consumption of components with 543 movement} 
    Reconciliation of Subcontracting Challan (J1IFQ) 
    Completion of Subcontracting Challan (J1IF13) 
    Generation of Annexure IV (J1IFR) 
    Note: - In this case, you have to maintain the Assessable Value for the Components to be supplied to Vendor in J1ID and also Excise Tax rates for the Chapter IDs linked with these components. So during J1IF01, system will take the Assessable Value as Excise base Value and calculates the Excise Duties by taking Excise Tax Rates.
    Subcontracting under Full Payment of Duty
    Creation of Subcontracting PO (ME21N) 
    Transfer Posting of Components to Subcontractor (MB1B/ME2O/MIGO) 
    Creation of Outgoing Excise Invoice w.r.t. Transfer Posting Document (J1IS) - Used to send the components to Subcontractor's. Here 57F4 Challan is not created. 
    Accounting Entry: -
    CENVAT Input BED - Cr
    CENVAT Input ECS - Cr
    CENVAT Input ECS - Cr
    CENVAT Suspense A/c - Dr
    Capture Vendor Excise Invoice at the time of GR of Finished Goods w.r.t. Subcontracting PO (MIGO) 
    Post Excise Invoice for FG received from Subcontractor (J1IEX) 
    Accounting Entry: -
    CENVAT Input BED - Dr
    CENVAT Input ECS - Dr
    CENVAT Input ECS - Dr
    CENVAT Clearing A/c - Cr
    Master Data:-
    MM01- Material Masters for Components and FG 
    XK01 - Vendor Master (Subcontractor) 
    CS01 - BOM for FG 
    ME11 - Purchase Info record for Subcontracting

Maybe you are looking for