MB_CREATE_GOODS_MOVEMENT

Hi,
I am using function module MB_CREATE_GOODS_MOVEMENT  to post goods movement.
in this function mosule I am passing alternate unit of measure data in One of the table parameters T_MS2INT (MsegO2). We are setting MANEN flag (Qty Manual Entry flag) to X in this table .
But when the document is created is does not have this flag set to X (MANEN- Qty Manual Entry flag)
Any idea why it does not set this flag? I am working on 4.0B.
Regards,
Umesh

Hi,
I am using function module MB_CREATE_GOODS_MOVEMENT  to post goods movement.
in this function mosule I am passing alternate unit of measure data in One of the table parameters T_MS2INT (MsegO2). We are setting MANEN flag (Qty Manual Entry flag) to X in this table .
But when the document is created is does not have this flag set to X (MANEN- Qty Manual Entry flag)
Any idea why it does not set this flag? I am working on 4.0B.
Regards,
Umesh

Similar Messages

  • Creation of Goods receipt - MB_CREATE_GOODS_MOVEMENT/BAPI_GOODSMVT_CREATE

    Hi Friends,
    I need to create a goods receipt for an inbound delivery.
    Iam planning to use either MB_CREATE_GOODS_MOVEMENT or BAPI_GOODSMVT_CREATE.
    But every time iam getting the error saying that the 101 movement type cant be used.
    In my case i need to use both the movement types 101 and 543.
    Basically i need to populate both the main item and component material information.
    If any one has done this, Can you please give me the sample code.
    Regards
    Sasi

    Hi,
    Iam usig the gm_code as 05.
    I am paasing the movement indicator ,in that particular field.
        lw_goodsmvt_item-material = lw_imseg-matnr.
        lw_goodsmvt_item-plant = lw_imseg-werks.
        lw_goodsmvt_item-batch = lw_imseg-charg.
      IF lw_imseg-sgtxt = 'F'.
        lw_goodsmvt_item-move_type = '101'.
        lw_goodsmvt_item-mvt_ind = 'B'.
        lw_goodsmvt_item-NO_MORE_GR = 1.
        lw_goodsmvt_item-stge_loc = lw_imseg-lgort.
        ELSEIF lw_imseg-sgtxt = 'C'.
        lw_goodsmvt_item-move_type = '543'.
        endif.
        lw_goodsmvt_item-entry_qnt = lw_imseg-erfmg.
        lw_goodsmvt_item-entry_uom = lw_imseg-erfme.
        lw_goodsmvt_item-expirydate = lw_imseg-mhdat.
        lw_goodsmvt_item-DELIV_NUMB =
        lw_goodsmvt_item-DELIV_ITEM =
    am i doing something wrong here.
    iam gettign the following error message
    Goods movement not possible with mvmt type 101
    Goods movement not possible with mvmt type 543

  • MB_CREATE_GOODS_MOVEMENT returning EMKPF-SUBRC = 5

    Hi Guys,
    Need help............!!!!!!!!!!!!!!!!!!!!!!!!!!
    We are unable to delete the service entry sheet(SES) due to error message "Deficit of PU GR quantity 13 ACT" in ML81 tcode.
    We found that the "Quantity Received" field under quantity tab is not updated in GR document(Mov Type 101) of SES. So, could you please suggest how to update the quantity received in the GR document. After doing this then only we can delete the SES.
    We have debuggued the ML81N transaction and in this we found that function module "MB_CREATE_GOODS_MOVEMENT" is returing error EMKPF-SUBRC = 5(Where 5 indicates "No item generated").
    Thanks in advance,
    vinod

    Thanks for the reply.
    No. We have not posted.

  • MB_CREATE_GOODS_MOVEMENT returning subrc = 5

    Hiii guyz...
    Need some help up here ...
    In the below code ..we were calling these FMs to create and post goods movement.Here I have made a lill change,  initially we were passing MIGO in parameter now I am passing MIGO_GO and now FM is returing subrc = 5 instead of 1. No other parameter has been changed.
    v_imkpf-budat     = budat.
      v_imkpf-bldat     = bldat.
      v_imkpf-pr_print  = migo_elikz.
      v_imkpf-wever     = wever.
      v_imkpf-weverx    = weverx.
      v_imseg-global_counter = v_imseg-aufps
                             = v_imseg-posnr
                             = v_imseg-line_id
                             = 1.
      v_imseg-called_by      = 'MIGO_GO'.  "Change of Jahan
      v_imseg-bwart          = bwart.
      v_imseg-matnr          = matnr.
      v_imseg-werks          = werks.
      v_imseg-lgort          = lgort.
      v_imseg-charg          = charg.
      v_imseg-kzbew          = kzbew.
      v_imseg-menge          = v_imseg-erfmg
                             = erfmg.
      v_imseg-meins          = v_imseg-erfme
                             = erfme.
      v_imseg-migo_elikz     = migo_elikz.
      v_imseg-lgnum          = lgnum.
    v_imseg-hsdat          = hsdat. 
      v_imseg-aufnr          = aufnr.
      v_imseg-bukrs          = bukrs.
      v_imseg-weanzx         = weanzx.
      v_imseg-wempfx         = wempfx.
      v_imseg-abladx         = abladx.
      APPEND v_imseg TO t_imseg.
      CALL FUNCTION 'MB_CREATE_GOODS_MOVEMENT'
        EXPORTING
          imkpf = v_imkpf
          xallp = 'X'
          xallb = 'X'
          xallr = 'X'
          ctcod = 'MIGO_GO'      "Change of Jahan
        IMPORTING
          emkpf = v_emkpf
        TABLES
          emseg = t_emseg
          imseg = t_imseg.
      IF v_emkpf-subrc = 1.
        CALL FUNCTION 'MB_POST_GOODS_MOVEMENT'
          IMPORTING
            emkpf = v_emkpf.
      ELSE.
    I tried to dubug , but couldnt figure out any thing.
    Any ideas experts ..!
    Thanks
    Jahan.

    Hi ,
          Please check in table T158B is MIGO_GO entry with a movement type you passing has been maintained or not .
    If you read the documenattion of FM MB_CREATE_GOODS_MOVEMENT  for the Input CTCOD it mentions that entry should be in table T158 and T158B For the Transaction code you are passing .
    Please reward if useful.

  • MB_CREATE_GOODS_MOVEMENT - GI with reference to a reservation; Movement 261

    I have data coming inbound in EDI 944. This data is supposed to come and post as a good's issue and creating a material doc. number in the process. The reservation number and reservation item number field in my IDOC are blank. So, I fill them up in a user exit - EXIT_SAPLLMDE_002 after quering RESB table with my production #,material and plant combination. An IDOC is created. But the reservation # that i filled in the user exit is still blank.Also in MB51, the reservation tab shows up as blank . But there are entries for reservation in MSEG table for the material document number just created. I am trying to make this work for only movement types 261 and 262. Here is the code of my user exit..
    ***   INCLUDE ZXLIDU10
    ***"*"Globale Schnittstelle:
    ***"       IMPORTING
    ***"             VALUE(I_IDOC_CONTROL) LIKE  EDIDC STRUCTURE  EDIDC
    ***"             VALUE(X_XALLR) LIKE  RLREO-XFELD
    ***"             VALUE(X_XALLP) LIKE  RLREO-XFELD
    ***"             VALUE(X_TCODE) LIKE  SY-TCODE
    ***"             VALUE(X_IMKPF) LIKE  IMKPF STRUCTURE  IMKPF
    ***"       EXPORTING
    ***"             VALUE(X_XALLR) LIKE  RLREO-XFELD
    ***"             VALUE(X_XALLP) LIKE  RLREO-XFELD
    ***"             VALUE(X_TCODE) LIKE  SY-TCODE
    ***"             VALUE(X_IMKPF) LIKE  IMKPF STRUCTURE  IMKPF
    ***"       TABLES
    ***"              T_IMSEG STRUCTURE  IMSEG
    ***"              T_IDOC_DATA STRUCTURE  EDIDD
    *Capture Reservation Number & Qty record related to Prod. Ord.
    *Component
    *for Movement type 261/262.
    DATA:   BEGIN OF e1mbxyh.  "Goods movements for mobile data entry
            INCLUDE STRUCTURE e1mbxyh.
    DATA END OF e1mbxyh.
    DATA:   BEGIN OF e1mbxyi.   "Add goods mvment from external systm:
            INCLUDE STRUCTURE e1mbxyi.
    DATA END OF e1mbxyi.
    tables : resb .
    clear e1mbxyi.
    *T_IMSEG-WENUM = X_IMKPF-XABLN.
    check i_idoc_control-mestyp eq 'ZMMBXY'.
    check i_idoc_control-idoctp eq 'WMMBID01'.
    check i_idoc_control-direct eq '2'.
    loop at t_idoc_data.
      case t_idoc_data-segnam.
        when 'E1MBXYI'.
          e1mbxyi = t_idoc_data-sdata.
          if e1mbxyi-bwart eq '261' or e1mbxyi-bwart eq '262'.
            clear resb.
            select single rsnum rspos bdmng from resb into (resb-rsnum,
          resb-rspos,resb-bdmng) where matnr eq e1mbxyi-matnr and aufnr eq e1mbxyi-aufnr
          and
            werks eq e1mbxyi-werks .
            if sy-subrc eq 0 and e1mbxyi-bwart eq '261'.
              e1mbxyi-rsnum = resb-rsnum.
              e1mbxyi-rspos = resb-rspos.
            loop at t_imseg.
    *          clear t_imseg.
              t_imseg-rsnum = resb-rsnum.
              t_imseg-rspos = resb-rspos.
              t_imseg-xrere = 'X'.               "Read this in some OSS note that I need to have it as X
              modify t_imseg .
            endloop.
            endif.
            if sy-subrc eq 0 and e1mbxyi-bwart eq '262'.
              e1mbxyi-rsnum = resb-rsnum.
              e1mbxyi-rspos = resb-rspos.
              e1mbxyi-bdmng = e1mbxyi-erfmg.
              e1mbxyi-enmng = e1mbxyi-erfmg.
            endif.
            t_idoc_data-sdata = e1mbxyi.
            modify t_idoc_data.
          endif.
      endcase.
    endloop.
    After it comes out of the user exit, in SAP it passes through the FM MB_CREATE_GOODS_MOVEMENT, thats where the real Goods movement takes place..
    Any idea guys why the newly generated IDOC doesn't have reservation number and item field filled ?

    Hello Shareen
    I am not really sure where the problem might be yet I would like to suggest some improvements to your coding.
    DATA: ls_edidd    TYPE edidd.  " I do not work anymore with header lines but exclusively with work areas
    DATA: ld_idx        TYPE i.
    loop at t_idoc_data INTO ls_edidd
                                WHERE ( segnam = 'E1MBXYI'  ).
      ld_idx = syst-tabix.
          e1mbxyi = ls_edidd-sdata.
          CHECK ( e1mbxyi-bwart eq '261' or e1mbxyi-bwart eq '262' ).
            clear resb.
            select single rsnum rspos bdmng from resb into (resb-rsnum,
          resb-rspos,resb-bdmng) where matnr eq e1mbxyi-matnr and aufnr eq e1mbxyi-aufnr
          and
            werks eq e1mbxyi-werks .
           LOG-POINT <name of checkpoint group>
             FIELDS e1mbxyi-matnr e1mbxyi-aufnr e1mbxyi-werks
                         syst-subrc resb.
           CHECK ( syst-subrc = 0 ).
            CASE e1mbxyi-bwart.
              WHEN '261'.
              e1mbxyi-rsnum = resb-rsnum.
              e1mbxyi-rspos = resb-rspos.
            loop at t_imseg.
    *          clear t_imseg.
              t_imseg-rsnum = resb-rsnum.
              t_imseg-rspos = resb-rspos.
              t_imseg-xrere = 'X'.               "Read this in some OSS note that I need to have it as X
              modify t_imseg.
            endloop.
            WHEN '262'.
              e1mbxyi-rsnum = resb-rsnum.
              e1mbxyi-rspos = resb-rspos.
              e1mbxyi-bdmng = e1mbxyi-erfmg.
              e1mbxyi-enmng = e1mbxyi-erfmg.
            WHEN OTHERS.
              CONTINUE.
            ENDCASE.
            ls_edidd-sdata = e1mbxyi.
            modify t_idoc_data FROM ls_edidd INDEX ld_idx.
    endloop.
    If you have checkpoint groups available on your SAP release then I would use them to support debugging.
    Regards
      Uwe

  • MB_CREATE_GOODS_MOVEMENT with Reservation reference

    Dear,
    I want to create good movement with Reservation reference and use T_MS1INT structure. Here is my way, but it does not work. Pls check and tell me why!
    Thanks a lot,
    DATA: IMKPF TYPE IMKPF,
            EMKPF TYPE EMKPF,
            EMSEG TYPE TABLE OF EMSEG WITH HEADER LINE,
            IMSEG TYPE TABLE OF IMSEG WITH HEADER LINE,
            T_MS1INT TYPE TABLE OF MSEGO1 WITH HEADER LINE.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          INPUT  = RESERVATION_NO
        IMPORTING
          OUTPUT = IMKPF-XBLNR.
      T_MS1INT-MTTMP = '29'.
      T_MS1INT-TSTMP = '15'.
      T_MS1INT-TDICH = 1.
    APPEND T_MS1INT.
      CALL FUNCTION 'MB_CREATE_GOODS_MOVEMENT'
        EXPORTING
          IMKPF                     = IMKPF
    *   XALLP                    = ' '
    *   XALLB                    = ' '
    *   XALLR                    = ' '
    *   CTCOD                    = ' '
    *   XQMCL                    = ' '
    *   OLD_SUBRC                = ' '
    *   IPKCOM                   =
    *   X_AUTHORITY              = ' '
    *   XLISU                    = 'X'
    *   XQMSR                    = ' '
    *   OIA_PASS                 =
    *   I_OIA_ASTM_VALUES        =
    *   I_OIA_PO_GREC_CALL       =
    *   I_OIB_CALCULATE          =
    *   OI_SHPMT                 =
    IMPORTING
       EMKPF                    = EMKPF
    *   E_LVS_TAFKZ              =
    *   ES_MKPF                  =
        TABLES
          EMSEG                    = EMSEG
          IMSEG                    = IMSEG
    *   IMSEG_CSL_TOKEN          =
    *   ET_MSEG                  =
         T_MS1INT                 = T_MS1INT   "IS-OIl
    *   T_MS2INT                 =
    *   I_OIAACCGI               =
    *   I_OIA_KOMF               =
    *   I_YOIA06                 =
    *   E_OIA_XMSEG              =
    *   T_OIB_EMSEGQTY           =
      COMMIT WORK.
    Edited by: Rob Burbank on Dec 6, 2010 11:24 AM

    Dear,
    I want to create good movement with Reservation reference and use T_MS1INT structure. Here is my way, but it does not work. Pls check and tell me why!
    Thanks a lot,
    DATA: IMKPF TYPE IMKPF,
            EMKPF TYPE EMKPF,
            EMSEG TYPE TABLE OF EMSEG WITH HEADER LINE,
            IMSEG TYPE TABLE OF IMSEG WITH HEADER LINE,
            T_MS1INT TYPE TABLE OF MSEGO1 WITH HEADER LINE.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          INPUT  = RESERVATION_NO
        IMPORTING
          OUTPUT = IMKPF-XBLNR.
      T_MS1INT-MTTMP = '29'.
      T_MS1INT-TSTMP = '15'.
      T_MS1INT-TDICH = 1.
    APPEND T_MS1INT.
      CALL FUNCTION 'MB_CREATE_GOODS_MOVEMENT'
        EXPORTING
          IMKPF                     = IMKPF
    *   XALLP                    = ' '
    *   XALLB                    = ' '
    *   XALLR                    = ' '
    *   CTCOD                    = ' '
    *   XQMCL                    = ' '
    *   OLD_SUBRC                = ' '
    *   IPKCOM                   =
    *   X_AUTHORITY              = ' '
    *   XLISU                    = 'X'
    *   XQMSR                    = ' '
    *   OIA_PASS                 =
    *   I_OIA_ASTM_VALUES        =
    *   I_OIA_PO_GREC_CALL       =
    *   I_OIB_CALCULATE          =
    *   OI_SHPMT                 =
    IMPORTING
       EMKPF                    = EMKPF
    *   E_LVS_TAFKZ              =
    *   ES_MKPF                  =
        TABLES
          EMSEG                    = EMSEG
          IMSEG                    = IMSEG
    *   IMSEG_CSL_TOKEN          =
    *   ET_MSEG                  =
         T_MS1INT                 = T_MS1INT   "IS-OIl
    *   T_MS2INT                 =
    *   I_OIAACCGI               =
    *   I_OIA_KOMF               =
    *   I_YOIA06                 =
    *   E_OIA_XMSEG              =
    *   T_OIB_EMSEGQTY           =
      COMMIT WORK.
    Edited by: Rob Burbank on Dec 6, 2010 11:24 AM

  • MB_CREATE_GOODS_MOVEMENT with & without Item text

    Hi Experts,
    I am using MB_CREATE_GOODS_MOVEMENT to create GR.
    for plant A I have a set of data, which does not have Item text , I find GR is created successfully.
    For plant B, I have another set of data , which does not have Item text(MSEG-SGTXT). GR is not created here.
    In the debugger, if have enter item text, GR gets created.
    I am analysing why is this behaving differently for 2 different data. I dint get any clues yet. Please share your thoughts on this.
    Thanks for your suggestions,
    Seema.

    Hi vinod,
    EMKPF subrc is 5. and EMSEG has
    VBELN     C     10      005298624
    MBLNR     C     10                                                                               
    MJAHR     N     4      0000
    BWART     C     3      Z10
    MSGID     C     20      M7
    MSGNO     C     3      093
    MSGTY     C     1      E
    MSGV1     C     50      Z10
    MSGV2     C     50      35509999
    MSGV3     C     50      Text
    MSGV4     C     50      002
    I am checking the reason for this error. In case you have idea, please share.
    Edited by: M.Seema on Jun 4, 2010 3:24 PM

  • MB_CREATE_GOODS_MOVEMENT Bapi

    I am using MB_CREATE_GOODS_MOVEMENT for certain receipt movement. In case of new batch, I want to enter material characteristic also. Say example Original Source Plant. In this BAPI is it possible ? Or Other BAPI to be used ? If yes, what is the BAPI name ?
    Thanks.

    You can create the characteristic for a charge with BAPI_OBJCL_CREATE, and change with BAPI_OBJCL_CHANGE...
    Regards,

  • MB_CREATE_GOODS_MOVEMENT and BAPI_GOODSMVT_CREATE

    Hello all,
    Ive been asked to modify a program to create inspection lots.  The change involved adding a prompt to supply the serial numbers for the parts to be moved to inspection.
    Previously it was using MB_CREATE_GOODS_MOVEMENT but try as I may, there appeared to be no means of adding the serial numbers. There is a flag for automaticly generating serial numbers but this would not work (The items already have serial numbers anyway.....the user identifies them)
    So I substituted MB_CREATE_GOODS_MOVEMENT  with BAPI_GOODSMVT_CREATE and added a table of serial numbers. This worked, giving the mesages Id expect if the user entered an invalid number or one that had already been assigned.
    Document numbers produced and the BAPI works.
    However, the next step of the program uses 'QPL1_LOT_GET_BY_TABIX_NO'  to get the insprecton lot number from memory. I can only assume that this number is written by MB_CREATE_GOODS_MOVEMENT  because I find no reference anywhere else.
    The BAPI does not seem to do this even though MB_CREATE_GOODS_MOVEMENT  is part of its code (the mysteries of SAP!)
    The CTCOD (txn code) in the FM was 'MB11' and Ive used '06' as the movement code in the BAPI.
    Nothing is going to post without the inspection lot number. Can anyone tell me how this number is generated (and why is it written to memory?)
    Many thanks in advance

    This is the code I used to resolve the issue. This code AFTER the BAPI_GOODSMVT_CREATE
    1) Create a lot number
    2) Write it to memory (I dont know why it has to do this)
    3) Extract from memory.
      CALL FUNCTION 'QPL1_INITIALIZE'
        EXPORTING
          i_lot_data_only = 'X'.
      DATA:  wa_qals_imp TYPE qals,
             wa_rmqed_imp TYPE rmqed,
             lv_qplos TYPE qplos,
             wa_qals TYPE qals,
             lv_subrc TYPE sy-subrc.
      CLEAR: wa_qals_imp, wa_rmqed_imp, lv_qplos, wa_qals, lv_subrc.
      wa_qals_imp-mandant = sy-mandt.
      wa_qals_imp-werk = l_imseg-werks.
      wa_qals_imp-werkvorg = l_imseg-werks.
      wa_qals_imp-matnr = l_imseg-matnr.
      wa_qals_imp-lifnr = l_imseg-lifnr.
      wa_qals_imp-art = 'XXXXXX'.          "This should be in table QMAT...See below
      wa_qals_imp-ebeln = g_imp_ebeln.
      wa_qals_imp-ebelp =  g_imp_ebelp.
      wa_qals_imp-charg = viqmel-charg.
      wa_qals_imp-herkunft = '08'.    "01
      wa_qals_imp-stat01 = 'X'.
      wa_qals_imp-losmenge = viqmel-rkmng.
      wa_qals_imp-mengeneinh = 'EA'.
      MOVE '01' TO wa_rmqed_imp-dbs_steuer.
      MOVE 'X'         TO wa_rmqed_imp-dbs_flag.
      MOVE 'X'         TO wa_rmqed_imp-dbs_nochg.
      MOVE 'X'         TO wa_rmqed_imp-dbs_nowrn.
      MOVE ' '         TO wa_rmqed_imp-dbs_noerr.
    Create a Lot number
      CALL FUNCTION 'QPL1_INSPECTION_LOT_CREATE'
        EXPORTING
          qals_imp   = wa_qals_imp
          rmqed_imp  = wa_rmqed_imp
        IMPORTING
          e_prueflos = lv_qplos
          e_qals     = wa_qals_imp
          subrc      = lv_subrc.
    If a lot number has been created then lv_subrc will be < 8
      IF lv_subrc LT 8.
        CALL FUNCTION 'QPL1_UPDATE_MEMORY'
          EXPORTING
            i_qals  = wa_qals_imp
            i_updkz = 'I'.
      ENDIF.
    get insp. lot number
      CALL FUNCTION 'QPL1_LOT_GET_BY_TABIX_NO'
        EXPORTING
          i_tabix              = '1'
        IMPORTING
          e_qals               = g_qals
        EXCEPTIONS
          x_no_entry_in_memory = 1
          x_tabix_too_small    = 2
          x_tabix_too_big      = 3
          OTHERS               = 4.
      IF sy-subrc = 0.
        IF  ( g_qals-matnr = viqmel-matnr )
        AND ( g_qals-werk = viqmel-mawerk ).
          g_notification_not_saved = c_kreuz.
          MOVE g_qals-objnr    TO g_insplot_objnr.
          MOVE g_qals-prueflos TO viqmel-prueflos.
          MOVE g_qals-prueflos TO e_qnqmaqmel0-prueflos.
        ENDIF.
      ELSE.
        MESSAGE i162(qm).
        RAISE action_stopped.
      ENDIF.
    *wa_qals_imp-art 
    This is the inspection type (ART) you get from table QMAT. 
    Took a while to get this solution working and I know a number of people looking for an answer to this......Hope it helps.

  • Problem with FM MB_CREATE_GOODS_MOVEMENT while creating GRI .

    Hi All,
    I am facing an issue with FM MB_CREATE_GOODS_MOVEMENT. I am using FM MB_CREATE_GOODS_MOVEMENT to create
    material document (Doing GRI) with ref to a delivery document . FM sucessfully creating Material doc but it is not updating delivery document status(from open to completed).
    Regards
    Rahul

        READ TABLE git_header_temp INTO gwa_header WITH KEY vbeln = gwa_final1-vbeln.
        LOOP AT  git_item INTO gwa_item WHERE vbeln = gwa_final1-vbeln.
          READ TABLE git_detail INTO gwa_detail WITH KEY vbeln = gwa_item-vbeln
                                                         matnr = gwa_item-matnr.
      IF sy-subrc EQ 0.
            MOVE : gwa_detail-vbeln TO lwa_item-deliv_numb,
                   gwa_detail-posnr TO lwa_item-deliv_item,
                   gwa_detail-vbeln TO lwa_icontrol-deliv_numb,
                    gwa_detail-posnr TO lwa_icontrol-deliv_item,
                   gwa_detail-vbeln TO lwa_ispecial-deliv_numb,
                   gwa_detail-posnr TO lwa_ispecial-deliv_item.
          ENDIF.
    READ TABLE git_mchb INTO lwa_mchb WITH KEY matnr = gwa_item-matnr
                                                     charg = gwa_item-charg.
          IF sy-subrc EQ 0.
            lv_gross_weight = lwa_mchb-ptare + lwa_mchb-clabs.
    IF sy-subrc EQ 0.
            lv_gross_weight = lwa_mchb-ptare + lwa_mchb-clabs.
            MOVE : lwa_mchb-matnr   TO lwa_item-material,
                   lwa_mchb-charg   TO lwa_item-batch,
                   lwa_mchb-clabs   TO lwa_item-dlv_qty,
                   lv_gross_weight  TO lwa_item-gross_wt,
                   lwa_mchb-clabs   TO lwa_item-net_weight,
                   gwa_detail-gewei TO lwa_item-unit_of_wt,
                   gwa_detail-umrev TO lwa_item-conv_fact,
                   gwa_detail-umvkz TO lwa_item-fact_unit_nom,
                   gwa_detail-umvkn TO lwa_item-fact_unit_denom,
                   lwa_mchb-clabs   TO lwa_item-del_qty_flo.
            APPEND lwa_item  TO lit_item.
    MOVE : lwa_mchb-lgort TO lwa_ispecial-stge_loc.
            APPEND lwa_ispecial TO lit_idataspl.
            lwa_icontrol-chg_delqty = gc_x.
            lwa_icontrol-net_wt_flg = gc_x.
            lwa_icontrol-gross_wt_flg = gc_x.
            APPEND lwa_icontrol TO lit_icontrol.
            MOVE : gv_mandt        TO lwa_idetail-mandt,
                   gwa_item-charg  TO lwa_idetail-charg,
                   gwa_item-zpicid TO lwa_idetail-zpicid,
                   gwa_item-matnr  TO lwa_idetail-matnr,
                   gwa_item-zldno  TO lwa_idetail-zldno,
                   gwa_item-tknum  TO lwa_idetail-tknum.
            lwa_idetail-zstats = 'PICKED'.
            APPEND lwa_idetail TO lit_idetail.
          ENDIF.
          CLEAR : lwa_idetail,
                  lwa_vbpok,
                  lv_gross_weight,
                  lwa_item.
        ENDLOOP.

  • Parameters for Yield and Scrap quantities in BAPI MB_CREATE_GOODS_MOVEMENT

    Hi All,
    I am using BAPI MB_CREATE_GOODS_MOVEMENT and MB_POST_GOODS_MOVEMENT to carry out the confirmation and Unplanned Goods Reciept.
    Which parameters in MB_CREATE_GOODS_MOVEMENT i have to use for passing Yield and Scrap quantities.
    And from which table i can fetch the Material for the Order? Can i use AFKO for the material number.
    Please give some inputs on how to use these Function Modules.
    Can i use only MB_CREATE_GOODS_MOVEMENT for the confirmation.
    Thanks,
    Anil.

    Hi,
    I presume you are referring to production order confirmation. Refer these:
    BAPI_PRODORDCONF_CREATE_ACT    Enter activity confirmation
    BAPI_PRODORDCONF_CREATE_HDR    Enter Order Confirmations
    BAPI_PRODORDCONF_CREATE_TE     Enter Time Event Confirmation
    BAPI_PRODORDCONF_CREATE_TT     Enter Time Ticket Confirmation
    Regards

  • Posting the GR with FM mb_create_goods_movement use the T-code MIGO

    Can any one suggest me It is possible Post the GR with help of FM mb_create_goods_movement with Transaction MIGO .
    The reason for MIGO i want to Post GR with Handling unit .
    I try to post the GR with FM It always export some value in EMKPF-mblnr field and sy-subrc eq 1.
    NO which is available on the MBLNR is not available in database.
    Please give the solution.

    Hi Rajeev,
    Can you please give me the sample code for the same??
    Regards,
    Sankar

  • Goods movement using "MB_CREATE_GOODS_MOVEMENT"

    Hi all,
    we are trying to confirm goods using the the function module
    MB_CREATE_GOODS_MOVEMENT
    the transcation we are using is 'CO11N'.
    we are populating the values in IMSEG table.
    for ex.
    CALL FUNCTION 'MB_CREATE_GOODS_MOVEMENT'
    EXPORTING
    imkpf = s_imkpf
    xallp = ' '
    xallr = 'X'
    ctcod = 'CO11N'
    XQMCL = ' '
    IPKCOM =
    xlisu = 'X'
    IMPORTING
    emkpf = s_emkpf
    TABLES
    emseg = t_emseg
    imseg = t_imseg
    in CO11N transcation we need to confirm
    the yield as well as scrap.
    the problem we are facing is that.
    In which field we populate the values so as to differenciate the yield to confirm quantity and scrap quantity.
    as per current functionality the function module is posting for only yield to confirm only.
    the movement types for both scarp and yield are both 261.
    any suggestion or sample code might help.
    thanks in advance,
    PA

    hi Prabhu,
    thanks.
    but i have already debugged tha standard SAP program but
    could not find what variable value iam missing which has to be passed to
    Table IMSEG in order to differenciate between scrap and yield quantity.
    I need to knowin which field of table IMSEG somevalue is passed
    by which the quantity for scrap or yield is confirmed.
    Please help.
    regards PA

  • Require a BAPI which will do VL02N posting,PGI and create an Invoice

    Hi Gurus,
    My Requirement:
    I will be getting an excel file from the legacy system which will provide me with the Delivery numbers whose Shipment has been confirmed.
    I need a BAPI which will post the picking in VL02N for those Deliveries and do the PGI. And post the PGI will create an Invoice through VF01.
    I know its a bit too much to ask for
    Is there any single BAPI which can do these activities (considering that this is a very standard SAP requirement for almost all organizations). Or do we need to use 2 or more BAPI's for the same. Please let me know !
    Many thanks in advance!

    You can use the following Bapi's for PGI:
    WS_DELIVERY_UPDATE
    BAPI_GOODSMVT_CREATE
    MB_CREATE_GOODS_MOVEMENT
    Thanks,
    Anuradha.

  • Delivery completion flag at delivery document level

    Hello Tean
    we have developed one inbound interface and Now the interface is working fine.. I am able to do the GR against inbound delivery and the PO status and delivery completion flag is also set at the PO level but now my FO is asking to me to set the delivery completion flag at inbound delivery document level and updation of history also. so i request you to please check and help me to find the solution.
    Technical details which i have used for developing the interface
    IDOC type: MBGMCR03
    Message type: MBGMCR
    Post Goods Movements with MB_CREATE_GOODS_MOVEMENT (ie bapi_goods_mvt_create )
    Please check and let me know the solution.
    Regards
    Raj

    use T code SQVI. here you can join tables having atleast one key field among.
    SQVI> give table name> press create> pop up will come> give the details > select table join from the drop down> click insert table> in pop up give table name > table details will appear> again press insert table> give next table name and so on. this way you can join many tablesd with key field. if key field is not there. it will not allow.  after joing all the required tables press back button.
    now from left side pane you can select the fields from ech table and decide which should come as input ( for eg company code , date etc)  and the outputs from each table.  Then save.
    now you can execute this in the same screen. or else you can use it later on also.  go to SQVI. give the Quickveiw name you have selected. and exceute.  it will act a  report with the inputs and outputs you have selected.
    if you want to restructure the report . it is possible.  change the input and output fields.  and save

Maybe you are looking for

  • Fill amount field

    Hi,   When i am assinging the value '0' for amount filed in badi i am getting the error "Data objects in a Unicode program are not convertible". Actually i have to fill the keyfigure amount with value '0' using badi. How to get this. Thanks for your

  • Ping Failed - Sun Application Server 8

    My Sun Application server can not start - It has started O.K. for a couple months. I seem to have a domain.xml issue. The log shows this error: java.util.logging.ErrorManager: 0: Error In getLogService java.util.logging.ErrorManager: 0: Error In getL

  • CANNOT EXECUTE "CEC_MAIN.EXE" after Kasperesky installation

    HI, iIm using Toshiba Satellite series laptop. Ever since i installed kasperesky software, i'm getting this msg, when i start my system: CANNOT EXECUTE "CEC_MAIN.EXE". Kindly help. sandeep sathyan

  • AD_Link Cable for Platinum Ex C

    I think my cable is damaged and want to purchase a new one. The cable is described as an AD_Link cable in the documentation but I can't locate it on various retail sites when looking for the cable. The cable consists of two leads just joined together

  • Outlook 2013: HTML stripped off email signature upon receipt

    Unfortunately, none of the other questions are the same as the issue I'm having.  My designer recently created an html signature with multiple hyperlinks.  I have Windows 8 and Outlook 2013.   I followed all of the instructions to properly install th