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.

Similar Messages

  • L_TO_CREATE_DN for quantity that is over outbound delivery quantity.

    Hi all,
    I use l_to_create_dn to create to's for shipments. If the qty entered is lower then the quantity needed all works fine because the option komim is used in the call. The quantity is updated to the quantity the was put in t_delit. The problem is, if m'I quantity is higher than the outbound delivery the exception 15 is returned. The customizing is done for batch split.
    I saw that there's an oss note 855729. But I'm not convinced that it will help the situation.
    Regards!
    Curtis

    Hi all,
    I implemented the note and this does not correct m'I problem.
    The exception 15 is raised if qty picked is greater the outboud delivery qty.
    No userexit, no enhancement available.
    Please help.
    Regards!
    Curtis

  • LSMW Custom program for updating picked quantity in outbound delivery

    I have been tasked with creating an LSMW that will update the picked quantity in an outbound delivery.  I originally thought of using a recording on transaction vl02n, but I need the LSMW to work with variable amount of item lines. 
    Through some research I figured out that FM WS_DELIVERY_UPDATE_2 can update the picked quantity.  I have successfully created a custom program that calls this FM. 
    I have created what I believe to be the correct entries in the SXDA0, SXDA1, SXDA2, and SXDA3 tables to make my custom program work with LSMW.  I am able to find my program in the "Maintain Object Attributes."  I am also able to "Maintain Structure Relations Step" (screen shot attached)  I am currently using VBKOK and VBPOK for the header and line item structures respectively. 
    My difficulty is converting the data.  I have tried everything from having no conversion rules to mapping many fields and I always receive the following error (screen shot also provided).
    Error analysis
    The statement
         "Move src TO dst"
    requires that the operands "dst" and "src" are convertible.
    Since this statement is in a Unicode program, the special conversion
    rules for Unicode programs apply.
    In this case, these rules were violated.
    Program /SAPDMC/SAP_LSMW_CONV_FORMS
    Include  /SAPDMC/SAP_LSMW_CONV_FORMS
    Row 1,080
    Module type (FORM)
    Module Name TRANSFER_RECORD
    Since I have run the conversion with no conversion rules I am very confused as to why I am still receiving this error.  Any insight would be greatly appreciated.

    For anyone I have uncovered some interesting things about my issue.  I started going through the conversion code piece by piece trying to figure out what data element the system was choking on. 
    After digging though the program and using the debugger I found out that the issue was in FORM transfer_record. 
    ASSIGN (g_record) TO <l_record>.
         CASE g_objecttype.
           WHEN '01' OR '02'.
             gt_buffer-record = g_record.
             gt_buffer-data = <l_record>.
             APPEND gt_buffer.
    If this LSMW was working
    g_record = 'VBKOK'
    <l_record> = 'VBKOK'
    But what is actually happening
    g_record = 'VBKOK'
    <l_record> = "Structure of some sort
    I do not know why this is happening since the field symbol is being assigned right before this piece of code.  Any suggestions are greatly appreciated.

  • Where to Authorization check for the plant while creating outbound delivery

    Hi Experts,
    For outbound delivery , the standard program is not doing the authorization check .
    Can i use BADI       *LE_SHP_DELIVERY_PROC *        and the method :     DELIVERY_FINAL_CHECK
    To write Authority-check statement ,
    If the particular is not authorized for any of the plants of the items in the outbound delivery i will throw a error message
    Can i use as above?
    And if i use it has to apply only for outbound delivery?Because for inbound delivery also the same BADI is getting triggered?
    Please suggest.
    Regards
    Ramakrishna L

    Hi,
    Yes you can use the said BAdi and the method if it is triggerd before the SAVE of the Outbound Delivery Order to do the Authorisation Check. In case the code is triggered for all the orders and you want only to restrict for the Outbound Delivery, then check for the Delivery Type (LFART) from the Delivery Header table for only the Outbound Delivery Order.
    Thanks,
    Susanth Swain

  • MIGO for GRN against Outbound delivery

    Hi,
    I have a requirement for creation of GRN against outbound delivery using MICO tcode, i have used the FM 'BAPI_GOODSMVT_CREATE but in table T158G for MIGO tcode there is no number assigned in our system landscape as it is std table, but respectively (MB01,MB31,etc no's are there) how to create number for MIGO in table T158G and correspondingly Movement Indicator which should be used for Outbound delivery, please kindly sujjest me.
    Thanks in advance,
    Puneetraj.

    Hi
    No, I am not having any release procedure.
    Yes, I have picked the qty in VL02N
    In vendor master, I have assigned the supplying plant to vendor.
    Actually, i have created the plant as vendor and assigned it to itself.
    Its not a error message. plz see the message.
    Document 0080016192   does not contain any selectable items
    Message no. M7064
    Diagnosis
    The document or document item entered cannot be adopted.
    Possible reasons for this are:
    The document items have already been processed
    (Suggest zero lines indicator set?).
    the document items have been deleted or are blocked.
    the document items have been created for a different plant.
    (for reservations only) movements are not yet allowed for the reservation items.
    (for reservations only) the document items are retrograde components of the order. These are posted using the order confirmations.
    A confirmation must exist for the document items.
    The document items must be released first.
    The document is an R/2 document.
    Procedure
    Make sure your entries are correct.
    If the system has already processed the total quantity, you can set the Suggest zero lines indicator. The system will suggest the quantity zero for the items that have already been processed.
    If you have entered a particular item, cancel the item. If you do not enter an item, the system searches all of the open items in the document.
    If the document is a purchase order, production order or a reservation, you can enter search criteria in the dialog box.
    You access the dialog box by choosing Enter with reference on the initial screen.
    If the document is an SAP R/2 document, you have to cancel it manually by entering the reversal movement type.
    Regards
    Neeraj Kumar Jain

  • Bapi for posting Outbound Delivery

    Hi,
    Can anyone please let me know about bapi for posting goods issue of outbound delivery.I have checked bapi like
    BAPI_OUTB_DELIVERY_CONFIRM_DEC
    If i use the with this bapi i can't cancellation the outbound with vl09.
    thanks,

    hi,
    i try to doing posting goods issue for outbound delivery out fo the regular progression.
    the posting is automaticly as part of outside program.
    thanks alot,

  • User Authorization for Outbound Delivery

    Hi sap gurus,
       I want to restrict sales document delete option for selective users in vl02n(outbound delivery). Can anyone tell me. How to do this?
    Warm Regards,
    Vinodh Rajendran
    Edited by: Vinodh Rajendran on Jul 27, 2009 8:30 AM

    Hi,
    Check with your BASIS person.
    They will provide/delete authorisations for a specific Transaction.
    SUIM is the T.Code for checking roles of a Transaction code.
    In SU01,by entering the user name one can delete that role for the user.
    Regards,
    Krishna.

  • MIGO against Outbound Delivery, fully GR-booked items appear again

    Hello gurus,
    I am totally confused with the MIGO behavior. Please help me out.
    We have a user Movement Type 9xx, which is made as a copy of MvT 101. We use this MvT 9xx to support our intra company Stock Transfer Order process.
    After STO is created, Outbound Delivery is made and Goods Issue is done we can do MIGO GR for the corresponding Outbound Delivery. (Well, I have to post GR again Outbound Delivery not STO because otherwise the outbound delivery document flow <in table VBFA> is not updated.)
    Say I have two items (X and Y) in one outbound delivery.
    If I post a GR 101 against outbound delivery item X and then I do MIGO GR against the same outbound delivery I only see item Y. This is perfectly correct.
    But the strange thing is that if I post a GR 9xx against the outbound delivery item X and I try again to post GR 9xx against the same outbound delivery (at this time I want to do GR for item Y) the both items (X and Y) are displayed on the MIGO screen.
    What can I do to let MIGO don't display the item X when a full qty GR 951 has taken place?
    Because of some constrains we need to realize MIGO GR against outbound delivery on item level. Is this doable?
    Any help will be appreciated. Thanks in advance.
    Yongmei

    Dear Yongmei,
    From your explanation, it appears that there is a difference in the attributes for the two Mvt types. I wld suggest you to compare the Quantity updation rules for both the Mvt types in OMJJ.
    Also check all the settings have been made for 9xx in OMJJ.
    Hope this helps.
    Regards
    Keshav

  • Automatic Pick Quantity In Outbound Delivery

    Dear all,
    Please give me a solution for Automatic Pick Quantity In Outbound Delivery using t-code VL01N.
    Thanks & Regards
    Amit Karalkar

    Hi Amit,
    I will explain how you set up this automatic picking, and then you can
    work backwards from there.  The automatic picking you are experiencing
    is actually related to the output type EK00 assigned to your shipping
    point.
    Consider the following two setup steps which will result is automatic
    picking:
    Set the output type to EKOO, in the print picking list of the shipping
    point in customizing.
    Make sure the parameters below are set:
    Message Language
    Number of Messages
    Send Time              <<<<<<<<<<< this must be set to 4 (send immed)!!
    Transmission Medium
    1) you have to set the parameters for EK00 in the shipping-point-
       maintenance in customizing:
              -> Enterprise Structure
                 -> Definition
                    -> Logistics Execution
                       -> Define, copy, delete, check shipping point
    2) as second step you define the shipping-print-parameters in
       customizing:
               -> Logistics Execution
                  -> Shipping
                     -> Basic Shipping Functions
                        -> Output Control
                           -> Define print parameters shipping
                             -> Shipping (Spec.case)
    Therein there should be an entry for every shipping-point, where
    you like to use the picking-list EK00!
    If you have 1 & 2 setup for a particular shipping point you will
    experience the "automatic" picking of deliveries.
    Regards,
    Ramana

  • Goods Receipt w.r.t Outbound Delivery with HU-STO

    Hi All,
    We are doing STO Process with Handling Unit.
    When doing GR w.r.t outbound delivery, we select Via.Hand.Units and execute then we enter into it and select the HU and click and copy.Then item OK and Save.
    Upto here its fine.
    When i save the GR,it is giving the Inbound Delivery no. I want to know how this inbound delivery is generating in background when i save the GR.
    Kindly help me.
    With Regards
    Azeez.Mohd

    Hi Attila,
    Appreciate yor reply.
    The problem is that for one of my client it is generating the inbound delivery when we do GR w.r.t outbound delivery via HU.
    But when iam trying do the same scenario for other client it is not generating.
    I have maintained same config w.r.t that client even though i am unable to get the inbound delivery for GR w.r.t outbound delivery via HU.
    What might be the problem? where i need to check?
    Kindly help me.
    with regards
    Azeez.Mohd

  • BDC for MIGO for GR OutBound Delivery( A01 & R05 ) from Movement Type 107 to 109

    Hi,
    I am stuck with a very typical situation need all your expertise and advices for a solution.
    We are basically trying to create change the movement type from 107 to 109 through MIGO.
    I have made a BDC recording for MIGO ( because we would like to track each delivery specifically under shipment , I know that there is a BAPI which is there to do this but it works fine if we do the shipment with Purchase Order as input which dont want in that manner )
    Process:
    1. Creating Production Order
    2. Creating Purchase Order
    3. Creating STO
    4. Deliveries
    5. PGI for Deliveries
    6. Shipment for group of outbound Deliveries
    I have created a z program where i am passing shipment number in the selection screen.
    Then it would take all the deliveries for that shipment and pass each delivery to MIGO and process it and change the status from 107 to 109.
    Interesting part here is, the code works absolutely perfect only from my ID. But when I test from other ID it is not executing, so to check where is the problem I have added mess_tab to the CALL TRANSACTION to capture what message is been populated for my ID comparing with others
    Message Captured on Others ID's:
    MSGID: 00
    MSGNR: 344
    MSGV1: SAPLMIGO
    MSGV2: 1300
    Message Captured on MY ID:
    MSGID: MIGO
    MSGNR: 012
    MSGV1: 5000005802
    MSGV2: (empty)
    This is the problem this program is executing only on MY ID, rest all ID's it is not processing.
    We have cross verified with security and basis regarding any authorization issues but nothing came up.
    Please help me what could be the issue ( WHY it is processing successfully for my and WHY NOT for other ID's)
    Below is the main code :
    CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'                     " Converting Date format to DD/MM/YYYY
         EXPORTING
           DATE_INTERNAL            = sy-datum
         IMPORTING
           DATE_EXTERNAL            = lv_date_external
         EXCEPTIONS
           DATE_INTERNAL_IS_INVALID = 1
           OTHERS                   = 2.
           IF SY-SUBRC <> 0.                                     "#EC NEEDED
    * Implement suitable error handling here
           ENDIF.
    *   Validating input shipment number with database table VTTP
           SELECT VTTP~TKNUM
                  VTTP~TPNUM
                  VTTP~VBELN
             FROM VTTP INNER JOIN VTTK
             ON VTTP~TKNUM = VTTK~TKNUM
             INTO TABLE IT_VTTP
             WHERE VTTK~TKNUM = P_TKNUM
               AND VTTK~STDIS = 'X'.
           IF sy-subrc = 0.
    *   Validating all deliveries having same Delivery type or not
             SELECT * FROM likp INTO TABLE it_likp FOR ALL ENTRIES IN it_vttp WHERE vbeln = it_vttp-vbeln
                                                                                AND vbtyp = 'J'.
             IF sy-subrc = 0.
               CLEAR lv_lines.
               LOOP AT it_likp INTO wa_likp.
                 REFRESH:it_vbfa,BDCDATA.
    *   Validating if Delivery Type = 109 (GR already done), or Delivery Type = 107 (must process for GR )
                 SELECT * FROM vbfa INTO TABLE it_vbfa WHERE vbelv = wa_likp-vbeln
    *                                                AND vbtyp_v = 'J'
                                                         AND bwart = '109'.
                 IF sy-subrc = 0.
                   lv_flag1 = 'X'.
                 ELSE.
                   SELECT * FROM vbfa INTO TABLE it_vbfa WHERE vbelv = wa_likp-vbeln
    *                                                  AND vbtyp_v = 'J'
                                                           AND bwart = '107'.
                   IF sy-subrc NE 0.
                     MESSAGE 'No Deliveries with Movement Type "107" ' TYPE 'I'.
                   ELSE.
                     lv_flag2 = 'X'.
                     lv_lines = lv_lines + 1.
    **  BDC for MIGO
                     perform bdc_dynpro      using 'SAPLMIGO' '0001'.
                     perform bdc_field       using 'BDC_OKCODE'
                                                   '=OK_GO'.
                     perform bdc_field       using 'GODYNPRO-ACTION'
                                                   'A01'.
                     perform bdc_field       using 'GODYNPRO-REFDOC'
                                                   'R05'.
                     perform bdc_field       using 'GODEFAULT_TV-BWART'
                                                   '109'.
                     perform bdc_field       using 'BDC_CURSOR'
                                                   'GODYNPRO-OUTBOUND_DELIVERY'.
                     perform bdc_field       using 'GODYNPRO-OUTBOUND_DELIVERY'
                                                   wa_likp-vbeln. "'80019574'.
                     perform bdc_field       using 'GOHEAD-BLDAT'
                                                   lv_date_external. "'04/29/2015'.
                     perform bdc_field       using 'GOHEAD-BUDAT'
                                                   lv_date_external. "'04/29/2015'.
                     perform bdc_field       using 'GOHEAD-WEVER'
                                                   '1'.
                     perform bdc_dynpro      using 'SAPLMIGO' '0001'.
                     perform bdc_field       using 'BDC_OKCODE'
                                                   '=OK_POST1'.
                     perform bdc_field       using 'GODEFAULT_TV-BWART'
                                                   '109'.
                     perform bdc_field       using 'GOHEAD-BLDAT'
                                                   lv_date_external. "'04/29/2015'.
                     perform bdc_field       using 'GOHEAD-LFSNR'
                                                   wa_likp-vbeln. "'0080019574'.
                     perform bdc_field       using 'GOHEAD-BUDAT'
                                                   lv_date_external. "'04/29/2015'.
                     perform bdc_field       using 'GOHEAD-WEVER'
                                                   '1'.
                     perform bdc_field       using 'GODYNPRO-DETAIL_ZEILE'
                                                   '   1'.
                     perform bdc_field       using 'GOITEM-ERFME'
                                                   'EA'.
                     perform bdc_field       using 'GOITEM-ERFMG'
                                                   '1'.
                     perform bdc_field       using 'GOITEM-LSMNG'
                                                   '1'.
                     perform bdc_field       using 'GOITEM-LSMEH'
                                                   'EA'.
                     perform bdc_field       using 'GOITEM-MIGO_ELIKZ'
                                                   '1'.
                     perform bdc_field       using 'GOITEM-BWART'
                                                   '109'.
                     perform bdc_field       using 'GOITEM-LGOBE'
                                                   'RX Cross-docking'.
                     perform bdc_field       using 'BDC_CURSOR'
                                                   'GODYNPRO-DETAIL_TAKE'.
                     perform bdc_field       using 'GODYNPRO-DETAIL_TAKE'
                                                   'X'.
                     PERFORM bdc_dynpro      USING 'SAPLMIGO' '1300'.
                     PERFORM bdc_field       USING 'BDC_CURSOR'
                                                   'G_TIP_DONT_SHOW_AGAIN'.
                     PERFORM bdc_field       USING 'BDC_OKCODE'
                                                   '=OK_TIP_GO'.
                     PERFORM bdc_field       USING 'G_TIP_DONT_SHOW_AGAIN'
                                                   'X'.
    *& Avoid unncessary screens to populate while processing background.
                     LV_OPTIONS-DISMODE = 'N'.
                     LV_OPTIONS-UPDMODE = 'S'.
                     LV_OPTIONS-NOBINPT = 'X'.
                     CALL TRANSACTION 'MIGO' USING BDCDATA  OPTIONS FROM LV_OPTIONS MESSAGES INTO IT_MESSTAB1 .
                     WAIT UP TO 1 SECONDS.
                     DELETE IT_MESSTAB1 WHERE MSGTYP NE 'E'.
                     IF IT_MESSTAB1[] IS NOT INITIAL.
                       APPEND LINES OF IT_MESSTAB1 TO IT_MESSTAB.
                     ENDIF.
                   ENDIF.
                 ENDIF.
               ENDLOOP.
             ENDIF.
           ELSE.
             MESSAGE 'Shipment Number does not exists Or not Planned' TYPE 'E'.
           ENDIF.
         ELSE.
           MESSAGE 'Please insert Shipment Number' TYPE 'E'.
         ENDIF.
         IF lv_flag1 = 'X' AND lv_flag2 = 'X'.
           MESSAGE 'This shipment is processed with an inconsistent goods receipt' TYPE 'I'.
         ELSEIF lv_flag1 = 'X'.
           MESSAGE 'Shipment already been processed for these deliveries' TYPE 'I'.
         ELSEIF lv_flag2 = 'X'.
           lv_lines1 = lv_lines.
           CONDENSE lv_lines1 NO-GAPS .
           CONCATENATE lv_lines1 'Goods Receipt are posted for the shipment '
                  INTO lv_message SEPARATED BY space.
           MESSAGE  lv_message TYPE 'I'.
         ENDIF.
    * Display Messages from Message TAB.
         DELETE ADJACENT DUPLICATES FROM IT_MESSTAB.
         DATA:lv_msg TYPE string.
         LOOP AT IT_MESSTAB INTO WA_MESSTAB.
           CALL FUNCTION 'FORMAT_MESSAGE'
             EXPORTING
               ID        = WA_MESSTAB-MSGID
               NO        = WA_MESSTAB-MSGNR
               V1        = WA_MESSTAB-MSGV1
               V2        = WA_MESSTAB-MSGV2
               V3        = WA_MESSTAB-MSGV3
               V4        = WA_MESSTAB-MSGV4
             IMPORTING
               MSG       = lv_msg
             EXCEPTIONS
               NOT_FOUND = 1
               OTHERS    = 2.
           IF sy-subrc <> 0.
    * Implement suitable error handling here
           ENDIF.
           WRITE:/ lv_msg.
         ENDLOOP.
    *        Start new screen                                              *
       FORM BDC_DYNPRO USING PROGRAM DYNPRO.                 "#EC PF_NO_TYPE
         CLEAR BDCDATA.
         BDCDATA-PROGRAM  = PROGRAM.
         BDCDATA-DYNPRO   = DYNPRO.
         BDCDATA-DYNBEGIN = 'X'.
         APPEND BDCDATA.
       ENDFORM.
    *        Insert field                                                  *
       FORM BDC_FIELD USING FNAM FVAL.                       "#EC PF_NO_TYPE
         CLEAR BDCDATA.
         BDCDATA-FNAM = FNAM.
         BDCDATA-FVAL = FVAL.
         APPEND BDCDATA.
       ENDFORM.
    Thanks,
    Srini

    Hi Rob,
    Thanks for quick reply.
    I have checked the NOTE : 304122
    But there in the NOTE it says ( " BAPI, BAPI_GOODSMVT_CANCEL, BAPI_GOODSMVT_CREATE, CNTL_ERROR" )
    These BAPI's work perfectly for (purchase order as input type), but here out type is ( A01 & R05 ) we are giving DELIVERY NUMBER as input to MIGO.
    So for this scenario we cannot use those BAPI's mentioned in the NOTE.
    Also as stated earlier in the message interesting part is
    "The code works absolutely perfect only from my ID. But when I test from other ID it is not executing. Code is working exactly as expected ONLY to my ID. When i try to execute the same code from another's ID it is not working"
    So what do you think might be the issue?

  • FM for migo against outbound delivery

    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
    I am using this FM for migo against outbound delivery can i get waht parameters i have to pass
    for this FM for outbound delivery

    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
    itab-move_type  = '101'.
      itab-mvt_ind    = 'B'.
      itab-plant      = 'FD11'.
      itab-material   = '0000900152'.
      itab-entry_qnt  = '1.000'.
      itab-move_stloc = 'FG'.
      itab-stge_loc   = 'FG' .
      itab-po_number  = '5500004086'.
    itab-DELIV_NUMB = '0171000465'.
    itab-DELIV_ITEM    = '10'.
      itab-PO_ITEM    = '10'.
    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
    Error in function
    Material document data and PO data do not match (Material)
    i am getting this error
    help me

  • Need BAPI for MIGO to create a Goods Receipt against PO &Outbound Delivery

    Hi Friends,
    GRN’s (Good receipt notifications) created in DHL (Non SAP system) will need to be communicated to SAP.
    I need to post goods receipt using input data in MIGO. Is there any BAPI that i can use.The requirement is like below:
    PO number field in output file is checked against entries in EKKO-EBELN, if a match is found the GR is posted against a Purchase Order otherwise LIKP-VBELN is checked and if a match is found GR is posted against an Outbound Delivery.
              If PO Number = EKKO-EBELN    GR against Purchase Order
                            = LIKP-VBELN      GR against Outbound Delivery
    Based on the above condition I need to create a Goods Receipt. 
    Could you please tell me the GM code, movement types and the required fields to be passed for the BAPI?
    The fields available are with us are...
    Header text. - Bill of Lading- Posting Date-Quantity- UOM--- Vendor Batch / Batch / Serial No --- PO Number or Delivery Number… SLED
    Are these fields sufficient for doing MIGO with the BAPI or do we require more fields???
    Please provide sample code if possible.
    Waiting for replies,
    Thanks and Regards,
    Sudha

    Hi Friends,
    GRN’s (Good receipt notifications) created in DHL (Non SAP system) will need to be communicated to SAP.
    I need to post goods receipt using input data in MIGO. Is there any BAPI that i can use.The requirement is like below:
    PO number field in output file is checked against entries in EKKO-EBELN, if a match is found the GR is posted against a Purchase Order otherwise LIKP-VBELN is checked and if a match is found GR is posted against an Outbound Delivery.
              If PO Number = EKKO-EBELN    GR against Purchase Order
                            = LIKP-VBELN      GR against Outbound Delivery
    Based on the above condition I need to create a Goods Receipt. 
    Could you please tell me the GM code, movement types and the required fields to be passed for the BAPI?
    The fields available are with us are...
    Header text. - Bill of Lading- Posting Date-Quantity- UOM--- Vendor Batch / Batch / Serial No --- PO Number or Delivery Number… SLED
    Are these fields sufficient for doing MIGO with the BAPI or do we require more fields???
    Please provide sample code if possible.
    Waiting for replies,
    Thanks and Regards,
    Sudha

  • Goods Receive for Outbound Delivery Without Reference using MIGO

    Dear Colleague ...
    We might need your insight on the case below related to Goods Receive of Outbound Delivery without Reference using MIGO:
    (1) In the current SAP Enjoy screen of MIGO, we are allowed to select the reference document (e.g. = PO, Material Document, Inbound Document, Outbound Document, etc.)
    (2) We did 3 (three) kind of test set: GR for Inbound Delivery, GR for Outbound Delivery with STO and GR for Outbound Delivery without reference.
    (3) The first 2 (two) cases work just find with MIGO.  We believe it is because the receiving plant is pretty much determined in the reference document, which is PO (case 1) or STO (case 3)
    (4) However, the last case came up with the error message "Goods receipt not possible for delivery 8000610236: error code 5".  We believe that this is the standard design of SAP, that the receiving plant is required and it is not defined explicitly in the delivery document.
    (5) Moreover, we also believe that that's the reason why SAP (via the Logistic Execution module) provide the Handling Unit and Shipment, which can be used to perform such receive function, which will imply the MM posting (goods issue and goods receive) IF there is stock transfer involved.
    Appreciate for any thoughts or input on the above.  Many thanks,
    Alvon Sibarani

    use transaction mb0a it will work for the scenario.

  • BAPI_GOODSMVT_CREATE update VBFA or not for Outbound Delivery?

    Dear Gurus,
    When I try to use BAPI_GOODSMVT_CREATE to do the goods receipt for the outbound delivery as the replacement for MIGO transaction, I use 01 as movement code and the bapi create material document and updating MSEG. But it doesn't update VBFA so the items is still showed in MIGO and cannot post there (because it is already moved in BAPI in program.)
    Anybody have any suggestion for this situation? Thanks a lot and points will be rewarded.

    Hello,
    When you use BAPI_GOODSMVT_CREATE  to post Goods Receipt for outbound delivery, reference documents at header and line items should be delivery number and line numbers (BAPI2017_GM_HEAD_01-REF_DOC_NO, BAPI2017_GM_ITEM_CREATE-DELIV_NUMB_TO_SEARCH & BAPI2017_GM_ITEM_CREATE-DELIV_ITEM_TO_SEARCH). Then only document flow will be updated.
    Thanks,
    Venu

Maybe you are looking for

  • There is no SIM card installed after IOS update on 3GS

    Hey! I just upgraded my iPhone 3GS to iOS 5. All went well, then at the end, it asks me a few set ups (like language, Location, and WiFi settings). After that, it attempts to activate, and fails, giving me the following error in iTunes: "There is no

  • Cable specification to connect the Document Camera to the CODEC CTS 3010

    Hi to all, I would like to know  the cable specification to connect the Document Camera to the CODEC in a CTS 3010 and which way round it needs to go.  As I understand it we need a DVI (Camera end) to HDMI (CODEC end) cable plus one CAT5/CAT6 cable. 

  • Facing problem in group message

    Hi I am facing problem in sending group text message from my Lumia 720 . Error message : cant send try agian appears when I send message to individual it delivers I cross check with moble operator, they told me their is no problem with service.

  • Airport Extreme and Time Machine. Despite now being officially supported, does it work?

    The subject says it all. After purchasing the new tall Airport Extreme and connecting a WD 2TB drive (as I had with the earlier AE) I have yet to have a backup execute properly. It will be fine for a few days then TM will announce it's done a verific

  • Comunication between Admin and Manged Server

    Hi, How we can proove that when the Administration Server starts, it communicates with the Managed Servers and informs them that the Administration Server is now running on a different IP address. They are some debug flags for that. Thanks in advance