Update qty in delivery note through bapi for migo

hi im using bapi for migo upload
my requiremnt is to update QTY IN DELIVERY NOTE in migo.
i got the folowing error if i dont pass the quantity.
qty and/0r delivery indicator or final issue indicator missing
if i pass the quantity field then it is changing quantity in unity of entity and qty in SKU i dnt want to change this field
here is my code,
gmcode-gm_code = '01'.
    ls_GOODSMVT_HEADER-pstng_date = tdate . "sy-datum.
    ls_GOODSMVT_HEADER-doc_date   = sy-datum.
    ls_GOODSMVT_HEADER-pr_uname   = sy-uname.
loop at itab.
  ls_GOODSMVT_HEADER-REF_DOC_NO = itab-LFSNR.
  it_goodsmvt-move_type  = itab-BWART.
  it_goodsmvt-po_number  = itab-EBELN.
  it_goodsmvt-PO_ITEM  = '10'.
  it_goodsmvt-STGE_LOC  = itab-LGORT.
it_goodsmvt-QUANTITY  = itab-LSMNG.
it_goodsmvt-BASE_UOM = 'KG'.
it_goodsmvt-material = 'RC1092'.
it_goodsmvt-entry_qnt = itab-LSMNG.
it_goodsmvt-ENTRY_UOM  = 'KG'.
  it_goodsmvt-mvt_ind = 'B'.
  it_goodsmvt-plant = 'G001'.
it_goodsmvt-NO_MORE_GR = 'X'.
append it_goodsmvt.
clear it_goodsmvt.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
  EXPORTING
    goodsmvt_header               = ls_GOODSMVT_HEADER
    goodsmvt_code                 = gmcode-gm_code
  TESTRUN                       = ' '
  GOODSMVT_REF_EWM              =
IMPORTING
  GOODSMVT_HEADRET              =
   MATERIALDOCUMENT              =  lf_MATERIALDOCUMENT
   MATDOCUMENTYEAR               = lf_MATERIALDOCYEAR
  tables
    goodsmvt_item                 = it_goodsmvt
  GOODSMVT_SERIALNUMBER         =
    return                        = return
  GOODSMVT_SERV_PART_DATA       =
  EXTENSIONIN                   =
if return-type ca 'EA'.
      rollback work.
      message id '26' type 'I' number '000'
      with return-message.
    else.
      call function 'BAPI_TRANSACTION_COMMIT'
EXPORTING
  WAIT          =
IMPORTING
  RETURN        =
      wait up to 5 seconds.
    endif.
select * fROM mseg
      INTO CORRESPONDING FIELDS OF TABLE IT_MSEG
                         where mblnr = lf_MATERIALDOCUMENT and
                                   MJAHR = lf_MATERIALDOCYEAR.
  LOOP AT IT_MSEG INTO WA_MSEG.
    IF WA_MSEG-LSMNG IS INITIAL.
      wa_mseg-lsmng = ITab-LSMNG.
      UPDATE MSEG from wa_mseg.
      commit work.
      wait up to 5 seconds.
    ENDIF.
  ENDLOOP.
ENDLOOP.

It is been done by implementing one implicit enhancement in FM: MAP2I_B2017_GM_ITEM_TO_IMSEG
I have added the below functionality at the end of the function module.
Just i have maped the ERFMG i.e ent_qnt(Received quanity) with LSMNG i.e qty.in del note
All best for others.
$$-Start: (1)----
$$
ENHANCEMENT 1  Z_EV_IMP_GOODSMOVEMENT.    "active version
Populate the delivery note quantity and UoM
IF IMSEG-ERFMG IS NOT INITIAL.
  MOVE IMSEG-ERFMG TO IMSEG-LSMNG.
  MOVE IMSEG-ERFME TO IMSEG-LSMEH.
ENDIF.
ENDENHANCEMENT.
Thanks,
Mahesh.Gattu
Edited by: Maheshkumar gattu on Dec 3, 2010 4:35 PM

Similar Messages

  • MIGO againts Inbound delivery: Qty in delivery note field

    Hi all,
    I wondered if it is possible to have the field Qty in delivery note in the trx MIGO NOT being populated. When doing a GR against a PO, the field Qty in delivery note is left blank. But when doing a GR against an Inbound delivery this field is populated.
    thanks a lot!

    Becasue the delivery note quanitty field wil be updated from your vendor confirmations controlled through confirmation control key in PO.Lets say your confirmation control key is defined to have an inbound delivery as a vendor confirmation (AB or LA ) for a PO, then the quantity in the inbound delivery will appear in the delivery note quantity in MOGO screen.
    In standard PO, the confirmation quantity from the vendor is recored anywhere and also there is no AB/LA confirmtions in PO, this is the reason the qnty in the delivery note will not appear when you try to book a GR with reference to PO.

  • Need BAPI for uploading "Qty in Delivery Note" in MIGO

    Hi All,
    Please find the details of my requirement as below :
    Goto T-code MIGO and select goods receipt for a PO , here under material Item tab there is a field as "Qty in Delivery Note" under Quantity tab.
    I need to update this field using my BAPI. Is there is any FM , RFC for getting this output.
    Right now i am using BAPI  BAPI_GOODSMVT_CREATE, please let me know if any field of this BAPI can be used for thid purpose.
    Thanks,
    Mahesh.Gattu
    9900380302

    It is been done by implementing one implicit enhancement in FM: MAP2I_B2017_GM_ITEM_TO_IMSEG
    I have added the below functionality at the end of the function module.
    Just i have maped the ERFMG i.e ent_qnt(Received quanity) with LSMNG i.e qty.in del note
    All best for others.
    $$-Start: (1)----
    $$
    ENHANCEMENT 1  Z_EV_IMP_GOODSMOVEMENT.    "active version
    Populate the delivery note quantity and UoM
    IF IMSEG-ERFMG IS NOT INITIAL.
      MOVE IMSEG-ERFMG TO IMSEG-LSMNG.
      MOVE IMSEG-ERFME TO IMSEG-LSMEH.
    ENDIF.
    ENDENHANCEMENT.
    Thanks,
    Mahesh.Gattu
    Edited by: Maheshkumar gattu on Dec 3, 2010 4:35 PM

  • Profit Center not getting uploaded through BAPI for MM01. Pls help

    Hello all,
                  I am getting an errror while uploading a file through BAPI for MM01 , The error says
    Error:
    Profit center 1000/sslcommon does not exist
    for material: AC2
    *& Report  ZBAPI_DUMMY
    REPORT  ZBAPI_MM01.
    *& Report  ZBAPI2
    TABLES
    FLAGS *
    DATA: F_STOP. " Flag used to stop processing
    DATA DECLARATIONS *
    DATA : V_EMPTY TYPE I, " No. of empty records
    V_TOTAL TYPE I. " Total no. of records.
    STRUCTURES & INTERNAL TABLES
    *--- BAPI structures
    DATA: BAPI_HEAD LIKE BAPIMATHEAD,  " Header Segment with Control
    BAPI_MAKT LIKE BAPI_MAKT, " Material Description
    BAPI_MARA1 LIKE BAPI_MARA, " Client Data
    BAPI_MARAX LIKE BAPI_MARAX, " Checkbox Structure for BAPI_MARA
    BAPI_MARC1 LIKE BAPI_MARC, " Plant View
    BAPI_MARCX LIKE BAPI_MARCX, " Checkbox Structure for BAPI_MARC
    BAPI_MBEW1 LIKE BAPI_MBEW, " Accounting View
    BAPI_MBEWX LIKE BAPI_MBEWX, " Checkbox Structure for BAPI_MBEW
    BAPI_RETURN LIKE BAPIRET2, " Return Parameter
    BAPI_MARDL LIKE BAPI_MARD,
    BAPI_MARDX LIKE BAPI_MARDX.
    *--- Internal table to hold excel file data
    DATA: IT_INTERN TYPE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
    *--- Internal table to hold Matetrial descriptions
    DATA: BEGIN OF IT_MAKT OCCURS 100.
            INCLUDE STRUCTURE BAPI_MAKT.
    DATA: END OF IT_MAKT.
    *--- Internal to hold the records in the text file
    DATA : BEGIN OF IT_DATA OCCURS 100,
    WERKS(4), " Plant
    MTART(4), " Material type
    MATNR(18), " Material number
    MATKL(9) , " Material group
    MBRSH(1), " Industry sector
    MEINS(3), " Base unit of measure
    SPART(2), " Division
    EKGRP(3), " Purchasing group
    PRCTR(10), " Profit Center
    VPRSV(1), " Price control indicator
    BKLAS(4), "Valuation Class
    *stprs(12), " Standard price
    PEINH(3), " Price unit
    SPRAS(2), " Language key
    MAKTX(40), " Material description
    LGORT(4) , " storage location
    DISMM(2) , "MRP TYPE
    VERPR(23), " Moving Average Price
    MTVFP(2) , " Availability Check
    DISLS(2) , "Lot Size
    DISPO(3) , "MRP Controller
    BESKZ(1) , "Procurment Type
    FHORI(3) , "SCHEDMARGIN KEY
    PERKZ(1) , "Period Indicator
    END OF IT_DATA.
    SELECTION SCREEN. *
    SELECTION-SCREEN BEGIN OF BLOCK SCR1 WITH FRAME TITLE TEXT-111.
    PARAMETER : P_FILE TYPE RLGRAP-FILENAME OBLIGATORY  " Input File
    PARAMETER : P_MAX(4) OBLIGATORY DEFAULT '100'. " no.of recs in a session
    PARAMETERS: P_HEADER TYPE I DEFAULT 0. " Header Lines
    PARAMETERS: P_BEGCOL TYPE I DEFAULT 1 NO-DISPLAY,
    P_BEGROW TYPE I DEFAULT 2 NO-DISPLAY,
    P_ENDCOL TYPE I DEFAULT 100 NO-DISPLAY,
    P_ENDROW TYPE I DEFAULT 32000 NO-DISPLAY.
    SELECTION-SCREEN END OF BLOCK SCR1.
    AT SELECTION-SCREEN *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    *--- Validating file
      PERFORM VALIDATE_FILE USING P_FILE.
    START-OF-SELECTION
    START-OF-SELECTION.
    *--- Perform to convert the Excel data into an internal table
      PERFORM CONVERT_XLS_ITAB.
      IF NOT IT_DATA[] IS INITIAL.
    *--- Perform to delete Header lines
        PERFORM DELETE_HEADER_EMPTY_RECS.
      ENDIF.
    END OF SELECTION. *
    END-OF-SELECTION.
    *--- Perform to upload Material Master data
      PERFORM UPLOAD_MATMAS.
    Form : validate_input_file
    Description : To provide F4 help for file if read from PC
    FORM VALIDATE_FILE USING F_FILE TYPE RLGRAP-FILENAME.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        CHANGING
          FILE_NAME     = F_FILE
        EXCEPTIONS
          MASK_TOO_LONG = 1
          OTHERS        = 2.
      IF SY-SUBRC <> 0.
        MESSAGE S010(ZLKPL_MSGCLASS). " 'Error in getting filename'.
      ENDIF.
    ENDFORM. " validate_input_file
    *& Form CONVER_XLS_ITAB
    text
    FORM CONVERT_XLS_ITAB.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          FILENAME    = P_FILE
          I_BEGIN_COL = P_BEGCOL
          I_BEGIN_ROW = P_BEGROW
          I_END_COL   = P_ENDCOL
          I_END_ROW   = P_ENDROW
        TABLES
          INTERN      = IT_INTERN.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    *--- Perform to move the data into an internal data
      PERFORM MOVE_DATA.
    ENDFORM. " CONVERT_XLS_ITAB
    *& Form MOVE_DATA
    text
    FORM MOVE_DATA.
      DATA : LV_INDEX TYPE I.
      FIELD-SYMBOLS <FS>  .
    *--- Sorting the internal table
      SORT IT_INTERN BY ROW COL.
      CLEAR IT_INTERN.
      LOOP AT IT_INTERN.
        MOVE IT_INTERN-COL TO LV_INDEX.
    *--- Assigning the each record to an internal table row
        ASSIGN COMPONENT LV_INDEX OF STRUCTURE IT_DATA TO <FS> .
    *--- Asigning the field value to a field symbol
        MOVE IT_INTERN-VALUE TO <FS> .
        AT END OF ROW.
          APPEND IT_DATA.
          CLEAR IT_DATA.
        ENDAT.
      ENDLOOP.
    ENDFORM. " MOVE_DATA
    *& Form DELETE_HEADER_EMPTY_RECS
    To delete the Header and empty records
    FORM DELETE_HEADER_EMPTY_RECS.
      DATA: LV_TABIX LIKE SY-TABIX.
      IF NOT P_HEADER IS INITIAL.
        LOOP AT IT_DATA.
          IF P_HEADER > 0 AND NOT IT_DATA IS INITIAL.
            DELETE IT_DATA FROM 1 TO P_HEADER.
    P_HEADER = 0.
            EXIT.
          ENDIF.
        ENDLOOP.
      ENDIF.
      CLEAR IT_DATA.
    *--- To delete the empty lines from internal table
      LOOP AT IT_DATA.
        LV_TABIX = SY-TABIX.
        IF IT_DATA IS INITIAL.
          V_EMPTY = V_EMPTY + 1.
          DELETE IT_DATA INDEX LV_TABIX..
        ENDIF.
      ENDLOOP.
      CLEAR IT_DATA.
    *--- Total no of recs in file
      DESCRIBE TABLE IT_DATA LINES V_TOTAL.
      IF V_TOTAL = 0.
        MESSAGE I013(ZLKPL_MSGCLASS). " No records in the file
        F_STOP = 'X'.
        STOP.
      ENDIF.
    ENDFORM. " DELETE_HEADER_EMPTY_RECS
    *& Form UPLOAD_MATMAS
    to upload Material Master data
    FORM UPLOAD_MATMAS .
      LOOP AT IT_DATA.
    Header
        BAPI_HEAD-MATERIAL = IT_DATA-MATNR.
        BAPI_HEAD-IND_SECTOR = IT_DATA-MBRSH.
        BAPI_HEAD-MATL_TYPE = IT_DATA-MTART.
        BAPI_HEAD-BASIC_VIEW = 'X'.
        BAPI_HEAD-PURCHASE_VIEW = 'X'.
        BAPI_HEAD-ACCOUNT_VIEW = 'X'.
        BAPI_HEAD-storage_view ='X'.
        bapi_head-mrp_view = 'X'.
        bapi_head-COST_view ='X'.
    Material Description
        REFRESH IT_MAKT.
        IT_MAKT-LANGU = IT_DATA-SPRAS.
        IT_MAKT-MATL_DESC = IT_DATA-MAKTX.
        APPEND IT_MAKT.
    Client Data - Basic
        BAPI_MARA1-MATL_GROUP = IT_DATA-MATKL.
        BAPI_MARA1-BASE_UOM = IT_DATA-MEINS.
       bapi_mara1-unit_of_wt = it_data-gewei.
        BAPI_MARA1-DIVISION = IT_DATA-SPART.
        BAPI_MARAX-MATL_GROUP = 'X'.
        BAPI_MARAX-BASE_UOM = 'X'.
        BAPI_MARAX-UNIT_OF_WT = 'X'.
        BAPI_MARAX-DIVISION = 'X'.
    Plant - Purchasing
        BAPI_MARC1-PLANT = IT_DATA-WERKS.
        BAPI_MARC1-PUR_GROUP = IT_DATA-EKGRP.
        BAPI_MARC1-PROFIT_CTR = IT_DATA-PRCTR.
        BAPI_MARC1-MRP_TYPE = IT_DATA-DISMM.
        BAPI_MARC1-AVAILCHECK = IT_DATA-MTVFP.
        BAPI_MARC1-LOTSIZEKEY = IT_DATA-DISLS.
        BAPI_MARC1-MRP_CTRLER = IT_DATA-DISPO.
        BAPI_MARC1-PROC_TYPE = IT_DATA-BESKZ.
        BAPI_MARC1-SM_KEY = IT_DATA-FHORI.
        BAPI_MARC1-PERIOD_IND = IT_DATA-PERKZ.
        BAPI_MARCX-PLANT = IT_DATA-WERKS.
        BAPI_MARCX-PUR_GROUP = 'X'.
        BAPI_MARCX-AVAILCHECK = 'X'.
        BAPI_MARCX-PROFIT_CTR = 'X'.
        BAPI_MARCX-MRP_TYPE = 'X'.
        BAPI_MARCX-MRP_CTRLER = 'X'.
        BAPI_MARCX-SM_KEY = 'X'.
        BAPI_MARCX-LOTSIZEKEY = 'X'.
       Storage Location.
        BAPI_MARDL-PLANT     = IT_DATA-WERKS.
        BAPI_MARDL-STGE_LOC = IT_DATA-LGORT.
        BAPI_MARDX-PLANT    = IT_DATA-WERKS.
        BAPI_MARDX-STGE_LOC = IT_DATA-LGORT.
    Accounting
        BAPI_MBEW1-VAL_AREA = IT_DATA-WERKS.
        BAPI_MBEW1-PRICE_CTRL = IT_DATA-VPRSV.
        BAPI_MBEW1-VAL_CLASS = IT_DATA-BKLAS.
        BAPI_MBEW1-MOVING_PR = IT_DATA-VERPR.
       bapi_mbew1-std_price = it_data-stprs.
        BAPI_MBEW1-PRICE_UNIT = IT_DATA-PEINH.
        BAPI_MBEWX-VAL_AREA = IT_DATA-WERKS.
        BAPI_MBEWX-PRICE_CTRL = 'X'.
        BAPI_MBEWX-STD_PRICE = 'X'.
        BAPI_MBEWX-PRICE_UNIT = 'X'.
        BAPI_MBEWX-MOVING_PR = 'X'.
    *--- BAPI to create material
        CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
        EXPORTING
        HEADDATA = BAPI_HEAD
        CLIENTDATA = BAPI_MARA1
        CLIENTDATAX = BAPI_MARAX
        PLANTDATA = BAPI_MARC1
        PLANTDATAX = BAPI_MARCX
    FORECASTPARAMETERS =
    FORECASTPARAMETERSX =
    PLANNINGDATA =
    PLANNINGDATAX =
    STORAGELOCATIONDATA = BAPI_MARDL
    STORAGELOCATIONDATAX = BAPI_MARDX
    VALUATIONDATA = BAPI_MBEW1
    VALUATIONDATAX = BAPI_MBEWX
    WAREHOUSENUMBERDATA =
    WAREHOUSENUMBERDATAX =
    SALESDATA = BAPI_MVKE1
    SALESDATAX = BAPI_MVKEX
    STORAGETYPEDATA =
    STORAGETYPEDATAX =
        IMPORTING
        RETURN = BAPI_RETURN
        TABLES
        MATERIALDESCRIPTION = IT_MAKT
    UNITSOFMEASURE =
    UNITSOFMEASUREX =
    INTERNATIONALARTNOS =
    MATERIALLONGTEXT =
    TAXCLASSIFICATIONS =
    RETURNMESSAGES =
    PRTDATA =
    PRTDATAX =
    EXTENSIONIN =
    EXTENSIONINX =
        IF BAPI_RETURN-TYPE = 'E'.
          WRITE:/ 'Error:' ,BAPI_RETURN-MESSAGE ,'for material:' ,
    IT_DATA-MATNR.
        ELSEIF BAPI_RETURN-TYPE = 'S'.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          WAIT          =
         IMPORTING
           RETURN        = BAPI_RETURN
          WRITE: 'Successfully created material' ,IT_DATA-MATNR.
        ENDIF.
       CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          WAIT          =
        IMPORTING
          RETURN        = BAPI_RETURN
      ENDLOOP.
    ENDFORM. " UPLOAD_MATMAS

    the Profit center 1000/sslcommon  not created. first create the profit center and then upload your data.check tcode KE52 for created profit centers...

  • Problem of BOM components uploading through BAPI,for  the Network(CN01)

    Hello,Friends,
    Iam PP consultant and facing a problem of BOM components uploading through BAPI,for creating of the Network (CN21)
    we have 300 components in the network activity and while uploading the BOM through BAPI , only 295 components has been uploaded.Others components has not uploaded.
    Please suggest me what will be the Problem? and
    What is the solution for the same?
    Regards,
    MYS

    in customizing availability checked has been applied ,for this reason one additional screen is appearing in BAPI for all these components
    How this screen could be by passed

  • Bapi for MIGO that can update freight supplier

    dear all
    we are presently using ALE_GOODSMVT_CREATE to create a migo document.
    the requirement now is to update the frieght supplier too.
    this present bapi is not able to update the supplier.
    does any one faced this problem before and if yes how did it got overcome ??
    regards

    check this link: It may not be exactly what you are looking for but will guide you:
    BAPI for MIGO
    cheers
    Aveek

  • BAPI for MIGO with respect to Outbound delivery or Stk trfer pur order

    please let me know is there any standard BAPI for MIGO transaction with respect to Outbound delivery or Stock transfer purchase order

    try these...
    BAPI_OUTB_DELIVERY_CONFIRM_DEC
    BAPI_OUTB_DELIVERY_SAVEREPLICA
    BAPI_OUTB_DELIVERY_SPLIT_DEC

  • I just purchased a Canon 7D Mark II, new DellXPS and the Lightroom 5.2.  The Lighthouse is not openinging the 7DMark II but does open the older 7D that I imported.  I checked the Abode update page and do not see one for the 7D Mark II.  Please say it is t

    I just purchased a Canon 7D Mark II, new DellXPS and the Lightroom 5.2.  The Lighthouse is not openinging the 7DMark II but does open the older 7D that I imported.  I checked the Abode update page and do not see one for the 7D Mark II.  Please say it is there - if not when.  I am "on hold till its done.  Thanks.

    Update to the current release, which is Lightroom 5.7.1. You can do this from the Lightroom help menu and choosing updates.

  • How to use BAPI extension for updating field which is not in BAPI stracture

    I am doing a conversion for control cycle create. The data is maintained in DB Table "PKHD". i have to update 12 fields threre through BAPI "BAPI_KANBANCC_CREATE". there are 11 fields in BAPI structure. but 1 field called"BERKZ" is not there . How can i update it through EXTENSION.

    Hi ,
    in the bapi extension check one structure with name BAPIPAREX will available..
    you need to pass custom structure in that..
    ands conactenate 12 field of your structure and pass in to value1 in bapirex structure and append.
    go to se11 and enter >bapiparex> check where it is used -->see the zprogram and check how it is used the add your code according to that..
    Regards,
    Prabhudas

  • How to pass delivery date through BAPI while creating a sale order

    Dear frndz,
         I am using 'BAPI_SALESORDER_CREATEFROMDAT1'
    to create a sale order .
        I don't have any problem..
        But I have to pass schedule line delivery date through this bapi .
       I used REQ_DATE in structure BAPISCHDL.
       But I can' t get it.
       Through which parameter can i meet this..
       The sale order should be created line item wise along with my delivery date..
      Any suggestions...
    regards.
    siva

    Dear frnd,
        Danq for your response..I can't use DLV_DATE for this requirement..
        But I used REQ_DATE in the structure BAPISCHEDULE .
       I came to know that the problem i faced previously  was only
    internal data conversion.
        Now am able to pass my delivery date..
        so I am closing the thread..
    Regards.
    siva

  • Warning message in MIGO - Diference on Qty of entry/Qty in delivery note

    Hello,
    I want to set a warning (or even error) message when, in MIGO transaction, the quantity in the delivery note is higher than the quantity in unit of entry set up (both in the quantity screen).
    A message regarding the difference between the quantity in unit of entry and the quantity order is standard and is already set.
    How can I proceed?
    Thank you,
    Gonçalo.

    Hi,
    Thanks for the help, but I still can't manage to set the warning message. In fact I tried to set it on OMRM and in spro-mat management-purchasing-environment data-define messages. The only message I get in MIGO is M7021 (difference between the quantity order and the quantity in unit of entry (quantity details)... but I also want a message to occur in case of a difference in quantity of delivery note and qty in unit of entry.
    I set as much messages as possible, do you know what's the message regarding this warning on table V_160M_
    Thanks again,
    Goncalo.

  • While i send the delivery date to BAPI for PO create,it still going for ATP

    Hi Friends,
    while creating PO through BAPI I am sending delivery date to "BAPI_PO_CREATE1" in the schedule lines ,but still it is picking the delivery dates from the ATP.
    I want my delivery dates to be populated in the PO rather than the ATP.
    Please suggest.
    Do we have any new BAPI i am using R/3 version 4.7.
    Thanks Regards,
    Sandipan Jena

    There seems to be lot of threads in SDN and OSS Notes( 770120)
    bapi_po_create1 - enjoy purchase orders

  • Updating values in mara table through bapi

    Hi friends,
    I am very new to ABAP , just now i have started my carrier in SAP-ABAP.
    I have to update these three fields MSTAE, EXTWG, MTPOS_MARA in MARA table through bapi. I need to give these values from selection screen followed by Material no.
    I already found some program in the forum  but that programs are very lenthy , i am not able to understand.
    Can anyone help me by giving some idea or sample program so that i can learn how to do this thing.
    Thankx in advance...

    Hi Ritesh,
    Use BAPI_MATERIAL_SAVEDATA to update the entries MSTAE, EXTWG and MTPOS_MARA by passing the following fields:
    DATA: ls_headdata     TYPE  bapimathead,
           ls_clientdata   TYPE  bapi_mara,
           ls_clientdatax  TYPE  bapi_marax,
           ls_return       TYPE  bapiret2.
    CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
       EXPORTING
         input        = ls_material-matnr
       IMPORTING
         output       = ls_headdata-material
       EXCEPTIONS
         length_error = 1
         OTHERS       = 2.
    IF sy-subrc <> 0.
       CLEAR: ls_headdata-material.
    ENDIF.
    ls_clientdata-extmatlgrp  = ls_material-extwg.
    ls_clientdata-pur_status  = ls_material-mstae.
    ls_clientdata-item_cat    = ls_material-mtpos_mara.
    ls_clientdatax-extmatlgrp  = 'X'.
    ls_clientdatax-pur_status  = 'X'.
    ls_clientdatax-item_cat    = 'X'.
    CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
       EXPORTING
         headdata    = ls_headdata
         clientdata  = ls_clientdata
         clientdatax = ls_clientdatax
       IMPORTING
         return      = ls_return.
    IF ls_return-type = 'E' OR ls_return-type = 'A'.
       CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
    ELSE.
       CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
         EXPORTING
           wait = 'X'.
    ENDIF.
    Thanks & Regards,
    Prasanna

  • With the new update my screen is not wide enough for the format. How do I change this?

    After the new update, the screen shows only 3/4 of what is presented. I have reduced the size of the print and that did not help. For instance, in typing this, once I got as far as "presented" the screen had to shift to the left to allow me to see what I was typing. It did this automatically. I don't know what caused this in the latest edition of the update, but it has caused me a number of problems in doing on line banking because unmovable windows do not show enough to allow me to hit the submit button.
    I want to see the entire window when I log onto a site. When I now open Yahoo News for instance, I cannot see the last three inches. I can see them if I move the page over, but up until now, I have always seen the entire page when it comes up without having to take any action on my part.
    Where do I go or what do I do to get it back to how it always functioned before?
    I opened the learn system and it references a Mozilla tool bar which I do not have either. Don't know if this is relevant or not.

    Hello,
    Firefox on Windows is now following display scaling options which may render text larger on high resolution displays. There's more than one way to resolve this problem. See the [[Webpages are large and blurry after updating Firefox - how to fix ]] article for one suggestion. Here's another possible solution:
    * Type '''about:config''' into the Firefox address bar and tap on the Enter key.
    * If the warning '''This might void your warranty''' appears, click '''I'll be careful, I promise'''.
    * Search for '''layout.css.devPixelsPerPx'''
    [[Image:Fx22layout.css.devPixelsPerPx]]
    * Double-click on layout.css.devPixelsPerPx to modify its value. The default is -1.0 in Firefox 22 and above. Change it to '''1.0''' to make it work like in previous Firefox versions.
    If necessary, further adjust the value in 0.1 or 0.05 steps. Use values between 1.0 and about 0.5 to reduce elements in size. Use values greater than 1.0 to increase size. For example, a value of 1.25 will increase font size to 125% to accommodate the default DPI setting in Windows 8. '''Double check the value that you enter.''' Setting a too small value will make everything disappear and a too large value will blow things up.
    If web pages still need to be adjusted then you can look at the [https://addons.mozilla.org/firefox/addon/default-fullzoom-level/ Default FullZoom Level] or [https://addons.mozilla.org/firefox/addon/nosquint/ NoSquint] extension.
    To adjust the font size for the user interface, you can use the [https://addons.mozilla.org/firefox/addon/theme-font-size-changer/ Theme Font & Size Changer] extension.
    Did this fix your problems? Please report back to us!
    Thank you.

  • Bapi for migo transaction

    i have created a bapi to upload data for MIGO transaction.. (GOODS RECEIPT-->PURCHASE ORDER)
    i am getting the error " stock posting is not possible for this material "'.
    when i create directly, it is posted.. while uploading through the program it shows the above error.
    please suggest if anyone knows....
    Thanks in advance,
    Dhivya N.

    *& Report  ZR_MIGO_UPLOAD
    *& package name : zabap
    *& transport request number : MIDK901443
    *& program to upload goods movement
    REPORT ZR_MIGO_UPLOAD.
    ***DATA DECLARATION***
    type-POOLs:  icon.
    TYPES: BEGIN OF TY_GR_PO,
            EBELN(10) TYPE c ,     "'PO NUMBEr
            EBELP(10) TYPE c,     "PO ITEM NUMBER
    *       LGOBE TYPE LGOBE,     "STORAGE LOCATION DESCRIPTION
            LGORT(10) TYPE c,     "STORAGE LOCATION
            XFELD TYPE c,     "ITEM OK
            GERNR(10) TYPE c,     "SERIALNUMBER
            END OF TY_GR_PO.
    DATA: TA_GR_PO TYPE TABLE OF TY_GR_PO,    "TABLE FOR GOODS RECEIPT PURCHASE ORDER
           WA_GR_PO TYPE TY_GR_PO.
    DATA: BLDAT TYPE BLDAT,     "DOCUMENT DATE
            BUDAT TYPE BUDAT,     "POSTING DATE
            WEVER TYPE WEVER.     "VERSION FOR PRINTING GR SLIP
    ***BAPI DECLARATION***
    DATA: BEGIN OF GM_HEAD OCCURS 0.                    "Material Document Header Data
             INCLUDE STRUCTURE BAPI2017_GM_HEAD_01.
    DATA: END OF GM_HEAD.
    DATA: BEGIN OF GM_CODE OCCURS 0.
             INCLUDE STRUCTURE BAPI2017_GM_CODE.          "Assign Code to Transaction for Goods Movement
    DATA: END OF GM_CODE.
    DATA: BEGIN OF GM_RET OCCURS 0.
             INCLUDE STRUCTURE BAPI2017_GM_HEAD_RET.       "Material Document Number/Material Document Year
    DATA: END OF GM_RET.
    DATA: BEGIN OF GM_ITEM OCCURS 0.
             INCLUDE STRUCTURE BAPI2017_GM_ITEM_CREATE.    "Material Document Items
    DATA: END OF GM_ITEM.
    DATA: BEGIN OF GM_SER OCCURS 0.
             INCLUDE STRUCTURE BAPI2017_GM_SERIALNUMBER.    "Serial Number
    DATA: END OF GM_SER.
    data: BEGIN OF ta_bapireturn OCCURS 0.
            INCLUDE STRUCTURE BAPIRET2.
    data: END OF ta_bapireturn.
    ***declaration of excel file handling table***
    FIELD-SYMBOLS: <fs> type any.    "field symbol for alsm_excel
    DATA: TA_EXCEL TYPE TABLE OF ALSMEX_TABLINE,  "table to contain excel sheet values
           WA_EXCEL TYPE ALSMEX_TABLINE.
    ***declaration of other parameters***
    data:       V_brow type i VALUE    2,    "BEGIN OF ROW
                 V_bcol type i value   1,     "BEGIN OF COL
                 V_erow type i value 65536,   "END OF ROW
                 V_ecol type i value 256.     "END OF COLUMN
    DATA:  V_sear type string,
            V_INDEX TYPE i,
            V_tabix type sy-tabix,     "current line.
            v_lines type i.          "total number of records
    DATA: DATE TYPE DATS.
    ***SELECTION SCREEN***
    ***SELECTION SCREEN DESIGN***
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECTION-SCREEN SKIP 3.
    PARAMETERS: zCODE(2) TYPE C MATCHCODE OBJECT H_T158G,
                 zrefdoc type REFDOC,
                 version type WEVER.
    SELECTION-SCREEN skip 5.
    PARAMETERS: p_file type ibipparms-path.
    SELECTION-SCREEN SKIP 3.
    SELECTION-SCREEN END OF BLOCK b1.
    ***SELECTION SCREEN VALUE REQUEST***
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
       CALL FUNCTION 'F4_FILENAME'                                    "f4 help for file name
         EXPORTING
           PROGRAM_NAME  = SYST-CPROG
           DYNPRO_NUMBER = SYST-DYNNR
           FIELD_NAME    = 'P_FILE'
         IMPORTING
           FILE_NAME     = P_FILE.
    ***SELECTION SCREEN EVENT***
    AT SELECTION-SCREEN.                                 "validation
       if p_file <> ''.
         V_sear = p_file.
         SEARCH V_sear for '.xls'.
         if sy-subrc <> 0.
           message 'please provide excel file. it is not valid' type 'E'.
         ENDIF.
       ENDIF.
    INITIALIZATION.
    *   DATE = '17.04.14'.
       GM_HEAD-PSTNG_DATE = SY-DATUM.
       GM_HEAD-DOC_DATE   = SY-DATUM.
       gm_head-pr_uname = sy-uname.
    ***START OF SELECTION***
    START-OF-SELECTION.
       gm_head-REF_DOC_NO = zrefdoc.
       gm_head-VER_GR_GI_SLIP = version.
       GM_CODE-GM_CODE = zCODE.
       PERFORM EXCEL_UPLOAD.
       PERFORM EXCEL_CONVERSION.
       PERFORM NO_RECORDS.
    END-OF-SELECTION.
       PERFORM BAPI_ASSIGNMENT.
       PERFORM BAPI_FM.
    *&      Form  EXCEL_UPLOAD
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM EXCEL_UPLOAD .
       CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
         EXPORTING
           FILENAME                = P_FILE
           I_BEGIN_COL             = V_BCOL
           I_BEGIN_ROW             = V_BROW
           I_END_COL               = V_ECOL
           I_END_ROW               = V_EROW
         TABLES
           INTERN                  = TA_EXCEL
         EXCEPTIONS
           INCONSISTENT_PARAMETERS = 1
           UPLOAD_OLE              = 2
           OTHERS                  = 3.
    ENDFORM.                    " EXCEL_UPLOAD
    *&      Form  EXCEL_CONVERSION
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM EXCEL_CONVERSION .
       if ta_excel is NOT INITIAL.
         sort ta_excel by row col.
         clear wa_excel.
         clear wa_GR_PO.
         LOOP AT ta_excel INTO wa_excel.
           move wa_excel-col to v_index.
           ASSIGN COMPONENT v_index OF STRUCTURE wa_GR_PO to <fs>.
           if sy-subrc = 0.
             move wa_excel-value to <fs>.
           ENDIF.
           at END OF row.
             append wa_GR_PO to ta_GR_PO.
             clear wa_GR_PO.
           ENDAT.
         ENDLOOP.
       else.
         MESSAGE 'no data for conversion' type 'I'.
       ENDIF.
    ENDFORM.                    " EXCEL_CONVERSION
    *&      Form  NO_RECORDS
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM NO_RECORDS .
       DESCRIBE TABLE ta_GR_PO LINES v_lines.
       if v_lines = 0.
         MESSAGE 'NO RECORDS TO UPLOAD' TYPE 'E'.
       ENDIF.
    ENDFORM.                    " NO_RECORDS
    *&      Form  BAPI_ASSIGNMENT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM BAPI_ASSIGNMENT .
       IF TA_GR_PO IS NOT INITIAL.
         LOOP AT TA_GR_PO INTO WA_GR_PO.
           gm_item-PO_NUMBER = wa_gr_po-ebeln.
           GM_ITEM-STGE_LOC = WA_GR_PO-LGORT.
           GM_ITEM-PO_ITEM = WA_GR_PO-EBELP.
           GM_ITEM-NO_MORE_GR = 'X'."WA_GR_PO-XFELD'.
    *      GM_SER-SERIALNO = WA_GR_PO-GERNR.
           gm_item-NO_MORE_GR =  1.
           gm_item-ENTRY_QNT = 2.
           gm_item-MOVE_TYPE = 101.
    *      gm_item-MVT_IND = 'B'.
           gm_item-plant = 'P001'.
           gm_item-move_stloc = 'FG01'.
    *      GM_ITEM-SPEC_STOCK = 'K'.
           APPEND GM_ITEM.
           APPEND GM_SER.
         ENDLOOP.
        ELSE.
          MESSAGE 'DATA IS NOT UPLOADED' TYPE 'I'.
        ENDIF.
    ENDFORM.                    " BAPI_ASSIGNMENT
    *&      Form  BAPI_FM
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM BAPI_FM .
    CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
       EXPORTING
         GOODSMVT_HEADER               = gm_head
         GOODSMVT_CODE                 = gm_code
    *   TESTRUN                       = ' '
    *   GOODSMVT_REF_EWM              =
      IMPORTING
        GOODSMVT_HEADRET              = gm_ret
    *   MATERIALDOCUMENT              =
    *   MATDOCUMENTYEAR               =
       TABLES
         GOODSMVT_ITEM                 = gm_item
        GOODSMVT_SERIALNUMBER         =  gm_ser
         RETURN                        = ta_bapireturn
    *   GOODSMVT_SERV_PART_DATA       =
    *   EXTENSIONIN                   =
    if ta_bapireturn-type = 'S'.
         write:/ icon_green_light as icon,
                 'success: Material document',gm_ret-mat_doc,  'is created for the GOODS RECEIPT- po number : ', wa_gr_po-ebeln,
               / 'reason:' , ta_bapireturn-message.
    ELSEIF ta_bapireturn-type = 'E'.
         write:/ icon_red_light as icon,
                 'error: Material document',gm_ret-mat_doc , 'is not created for the GOOD RECEIPT- po number : ', wa_gr_po-ebeln,
               / 'reason:' , ta_bapireturn-message.
    ENDIF.
    ENDFORM.                    " BAPI_FM

Maybe you are looking for

  • I can not install itunes on windows 7

    Itunes said I needed to upgrade to version 11.1. I tried to download and nothing. It will not let me install ( I have windows 7). Long story short I have deleted itunes then tried to re-install again. This did not work. Now, I don't have itunes at al

  • Help!!  "This does not appear to be a valid Podcast URL" -- but it is!

    I'm having trouble subscribing to the Vatican Radio podcast (English version). I recently moved to a new computer and resubscribed to all my podcasts. This is the only one that won't work for me. I've contacted the Radio Vatican webmaster and he's co

  • Problems obtaining POST data / content using Sockets

    Hi, I have a servlet which needs to listen on a specific port for HTTP post requests. At present I have the following code: try{    inputStream=client.getInputStream();    streamReader=new InputStreamReader(inputStream);    reader=new BufferedReader(

  • How to send a feedback to apple about safari problem?

    how to send a feedback to apple about safari problem? the problem is with a site of mobile phones, www.190.it impossible to log in with safari browser. with firefox or others no problem

  • Export to quicktime movie help

    Hi people, I have a very quick, and slightly embarassing question... I have a movie that is approx 85 minutes in length, shot on DV PAL. When I compress is via quicktime converstion it's coming out at 18.05GB. What I need to do is reduce the file siz