Bapi/FM tp update DO storage location

hi all,
any bapi/FM to update SD DO storage location... thanks for the help

Hello,
Solved the error. Just miss some parameters:
     lwa_item_data-deliv_numb = lwa_lips-vbeln.
     lwa_item_data-deliv_item = lwa_lips-posnr.
     lwa_item_data-fact_unit_nom = lwa_lips-umvkz.
     lwa_item_data-fact_unit_denom = lwa_lips-umvkn.
     APPEND lwa_item_data TO lit_item_data.
     lwa_item_control-deliv_numb = lwa_lips-vbeln.
     lwa_item_control-deliv_item = lwa_lips-posnr.
     APPEND lwa_item_control TO lit_item_control.
     lwa_item_data_spl-deliv_numb = lwa_data-vbeln.
     lwa_item_data_spl-deliv_item = lwa_data-posnr.
     lwa_item_data_spl-stge_loc = 'H114'.
     APPEND lwa_item_data_spl TO lit_item_data_spl.
CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
     EXPORTING
       header_data    = lwa_header_data
       header_control = lwa_header_control
       delivery       = p_vbeln
     TABLES
       item_data      = lit_item_data
       item_control   = lit_item_control
       return         = lit_return
       item_data_spl  = lit_item_data_spl.
it's important to fill fact_unit_nom and fact_unit_denom.
Best regards,
Pedro Nunes

Similar Messages

  • Problem in Address update for storage location via LSMW

    I am trying to update the address of storage location thru LSMW,
    Normally when i run OX09 i get the "dialogue structure' in LHS panel but when I do the recording of OX09 in LSMW, I am not getting the "Dialogue structure" LHS panel & hence I can't go to the 'Addressees for storage location'
    How to get the ""Dialogue structure" in LHS while recording in LSMW so that I can update the address also.
    Currently my recording only takes me to the create storage location & no LHS 'dialogue structure'  for 'Addressees for storage location'
    Please give the suggestions as I its on urgent for me to update 1000 storage location.

    Dearrrrrrr Prasoooon,
    U got it Right Again!!!!!
    Thank you so much.
    I resolved with above Note & now i can happily go on leave from tomorrow.
    Salute to you!!!!!!!!

  • Function module does not update the storage location in delivery

    Hello,
    I've been trying to use SD_DELIVERY_UPDATE_PICKING to update the storage location in SD return deliveries, without any success. Any clues? The FM works fine when it comes to updating the picking quantity, but the storage location issue still persists.
    Thanks in advance,
    Joao

    Hi Joao,
    I have the same problem. I tried to find the FM SD_OUTB_DELIVERY_CHANGE  but couldn't find it. Have you by any change specified the incorrect FM name here? If yes, can you please communicate the correct FM name?
    Regards,
    Divyaman

  • SHPCON - How to update LGORT (Storage Location)

    Hi experts.
    I'm using an INBOUND idoc with message SHPCON to create batch split for delivery items.
    When trying to update Storage Location, the field is not updated, but all the other fields are correctly populated.
    Does anybody know how I can have this field updated?
    Any user-exit I can use?
    Following the data I am using:
    Message Type : SHPCON
    Process Code  : DELV
    Function name : IDOC_INPUT_DELVRY
    Segment E1EDL18: PIC
    Segment E1EDL19: BAS
    Thank you for you attention!
    Edited by: Rodolfo Oliveira on Mar 6, 2012 10:24 AM

    You're a bit confused.  You can not buy more storage for your iPad.  It is what you bought the day you bought it.  So, a 16GB or a 32GB or a 64GB iPad can not be increased.  What you bought was more Cloud storage.  Apple gave you 5GB of cloud storage for free.  Once you've used that, you need to buy more.  Don't confuse that with adding storage to your actual iPad.  Two completely different things.

  • Change Software Update Service storage location - OS X Server 2.2

    What's the best way to change the file storage location used by the Software Update Service in Server 2.2? I don't want to change the default "Service Data" location for the other services.
    Generally I like to make as few changes to the standard configuration as possible, but in this case I need to make an exception. I'd really like to to get the catalog of update files on to an External Pegasus RAID.
    I've tried using a symlink to the /Library/Server/Software Update/Data folder. That didn't work as the service was unable to update the catalogs.
    Should I use a symlink on the whole  /Library/Server/Software Update/ folder or is there perhaps a better way?
    With any potential solutions, how likely is is that changes I make likely to be overwritten with future updates.
    Thanks,
    GRW

    Question (please use responses in bold in square brackets)
    Response
    1
    Update went smoothly with NO problems [No]
    No
    2
    Update actually solved existing previous problem with server [Not sure yet]
    Not sure yet
    3
    Updated from Server App version 2.2 [Yes]
    Yes
    4
    If answer to Q.3 was 'No' please advise previous server version [Server app version #]
    5
    OS X version at the time was 10.8.2 [Yes]
    Yes
    6
    If answer to Q.5 was 'No' please advise previous OS X version [-]
    To clarify:
    1) As it was updating application data, I got an error message at the very end of the update saying that some application data may not be usable/work/wasn't updated (something to that tune) with a yellow triangle and exclamation mark inside it.  After the update, I rebooted the server just in case then let everythign start up normally.  All services turned on as per usual.
    I have gone through most of my services that I run and I'll list off everything that I've tried out and it's state:
    Caching Server - Looks OK
    Contacts - Functioning so far as expected
    Calendar - Functioning so far as expected
    Profile Manager - Was able to test a push profile add and delete with success
    DNS - Functioning as normal
    Software Update - Looking good so far (I had issues with it stopping and restarting randomly with an interval of a month or two between events, hoping that is fixed, though it never affected functionality - it was in the error logs)
    File Sharing - Working as expected
    Open Directory - No issues thus far
    VPN - Looks OK
    Websites - Functioning as expected
    Hope that helps you guys!

  • Quantity not updating in storage location

    Dear one and all,
    For a Sales order  and Delivery order , System has not reduced the entire qty from a storage location after making the invoice.  System reduced only part qty. The balance qty is still remaining in the storage location.
    Plz guide what all needs to be checked.
    Thanks & regards
    Sharad

    Dear GSL & Lakshmipati,
    Thanks for ur responses.
    One last question -
    I have an order wherein there are some physical items:
    - they are not value/text/service items
    - item cat/sch line cat automatically determined
    - sch line cat is relevant for deliv but not for MRP (no movement type defined) in customization
    - there Goods Movement Status is showing as complete (C)  in Delivery
    - there doc flow is showing as "confirmation of service"
    - all the items are completely delivered & invoiced
    - no batch split is occuring
    How will you keep track of such items (in storage loc.)? Why would you have such items?
    Thanks & regards
    Sharad

  • Mass update of Storage Location

    Hi Gurus,
    I've executed mass transaction MMSC_MASS for extending the storage location to 0002 and 0003.
    How to exclude these storage location to exclude in MRP run ?
    Can it be done anywhere in material master ?
    Please throw some idea on this.
    Thanks
    Aadhya

    Hi,
       Storage loc MRP indicator can be maintained in material master - MRP 4 view as shown below. You can maintain the indicator as 1 if you want to exclude the storage loc from MRP.
       Check the documentation for the field and proceed.
    Regards,
    AKPT

  • How to update storage location & batch split on delivery items?

    Any idea how to perform the following using a BAPI or function call with regards to updating a Delivery (VL02/VL02N)?
    1) Enter or update a storage location on a delivery item?
    2) Batch split a delivery item to give multiple batch    numbers. For example if delivery item is '101' then    after batch split additional delivery items with batch number assigned will appear as '900001', '900002', '900003', etc Entering a single batch number is straight forward and can be done using WS_DELIVERY_UPDATE/_2
    Do not wish to use BDC or call transaction. Any help appreciated.

    hi sailatha..
    im doing BDC for VL01N transaction.. how can i pass multiple storage locations for picking quantity..  my requirement is  if the material is not there in the specified storage location it should search in the other storage locations for delivery.
    how can i solve this issue bcoz in the VL01N screen i can pass only one storage location.
    this is urgent requirement..
    kindly revert me back if u can help.
    thankx
    helpful answer will be rewarded.

  • Creation of Storage Location using BAPI

    Hi ABAP Gurus,
    I want to create a Storage Location using a BAPI , namely 'BAPI_MATERIAL_SAVEDATA'.
    I am passing the required parameters like Material, Material Type,Base unit of measure ,Plant and
    the parameter Storage Location(STGE_LOC) as well as corresponding X Structures for the fields.
    But by using these parameters , the BAPI is not creating the Storage Location.
    Please help regarding this.

    Hi,
         Please check are you passing like this.
    PLANTDATA-plant = '3210'.
    PLANTDATAX-plant = 'X'.   or you try like this PLANTDATAX-plant = '3210'. (because the comp. type is WERKS_D)
    Regards
    GK.

  • How to change the storage location using BAPI_OUTB_DELIVERY_CHANGE

    Hi !
    I want to do batch split in the delivery using BAPI_OUTB_DELIVERY_CHANGE.
    Can anyone tell me how to pass/change the storage location of each batch item.
    Is there any other BAPI that can do the batch split and populate the storage location also for the split batches?
    Regards,
    Firoz.

    Hi all,
    BAPI_OUTB_DELIVERY_CHANGE  can be used to do batch split and updating storage loaction against each item of an outbond delivey.
    I have done that in the folllowing way:
    1 > Firstly i have updated the storage location for each delivery item using 'BAPI_OUTB_DELIVERY_CHANGE' passing some mininal parameters.
       Fetch the item details from LIPS table based on the outbound delivery and pass the corresponding fields to item_data, item_control  and item_data_spl parameters and passed into intenal table li_lips.
    Loop at li_lips inti lw_lips.
        lw_item_data-deliv_numb           = lw_lips-vbeln.
        lw_item_data-deliv_item             = lw_lips-posnr.
        lw_item_data-material                = lw_lips-matnr.
        lw_item_data-fact_unit_nom      = lw_lips-umvkz.
        lw_item_data-fact_unit_denom  = lw_lips-umvkn.
        lw_item_data-base_uom            = lw_lips-meins.
        lw_item_data-sales_unit            = lw_lips-vrkme.
        lw_item_control-deliv_numb      = lw_lips-vbeln.
        lw_item_control-deliv_item        = lw_lips-posnr.
        lw_item_data_spl-deliv_numb   = lw_lips-vbeln.
        lw_item_data_spl-deliv_item     = lw_lips-posnr.
        lw_item_data_spl-pick_denial   = 'X'.
        lw_item_data_spl-stge_loc       = v_lgort.
    "(This would be your Storage Location which you want to be updated)
    Appending work areas into internal table to pass as parameter
        APPEND lw_item_data_lgort     TO li_item_data_lgort .
    Appending work areas into internal table to pass as parameter
        APPEND lw_item_control_lgort  TO li_item_control_lgort.
    Appending work areas into internal table to pass as parameter
        APPEND lw_item_data_spl_lgort TO li_item_data_spl_lgort.
    endloop.
    Passing the delivery no in the work area of header data
      lw_header_data-deliv_numb           = v_delivery_no.
      lw_header_control-deliv_numb       = v_delivery_no.
      lw_header_tech_control-upd_ind   = 'U'.
    Calling BAPI to change the Storage location
      CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
        EXPORTING
          header_data       = lw_header_data
          header_control   = lw_header_control
          delivery               = v_delivery_no
          techn_control     = lw_header_tech_control
        TABLES
          item_data           = li_item_data
          item_control       = li_item_control
          return                 = li_return_change
          item_data_spl    = li_item_data_spl.
    Calling BAPI to committ the task
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' .
    2> Then i have used the same BAPI again 'BAPI_OUTB_DELIVERY_CHANGE' to do the batch split/update batch only(if required) and change the Actual Delivered Quantity.
    Here you have to pass the same thing along with actual delivery qauntity and different batches to do batch split.
    Here it is assumed that Batch numbers, actual delivered quantity are coming from an internal table i_lqua.
    Looping through Internal table to get Bin details
      LOOP AT i_lqua INTO w_lqua .
    Clearing work area before use
        CLEAR : lw_item_data, lw_lips, lw_item_control, lw_item_data_spl.
    Reading table comparing metrial number
        READ TABLE li_lips INTO lw_lips
        WITH KEY matnr = w_lqua-matnr BINARY SEARCH.
    If read is successful, passing values from table
        IF sy-subrc EQ 0.
    Passing the delivery details into Item level table
          lw_item_data-deliv_numb              = lw_lips-vbeln.
          lw_item_data-deliv_item                = lw_lips-posnr.
          lw_item_data-material                   = lw_lips-matnr.
          lw_item_data-batch                       = w_lqua-charg.
          lw_item_data-dlv_qty                    = w_lqua-verme.
          lw_item_data-dlv_qty_imunit         = w_lqua-verme.
          lw_item_data-base_uom               = w_lqua-meins.
          lw_item_data-hieraritem                = lw_lips-posnr.
          lw_item_data-usehieritm                = 1.
          lw_item_data-fact_unit_nom          = lw_lips-umvkz.
          lw_item_data-fact_unit_denom      = lw_lips-umvkn.
          lw_item_data-sales_unit                 = lw_lips-vrkme.
          lw_item_control-deliv_numb           = lw_lips-vbeln.
          lw_item_control-deliv_item             = lw_lips-posnr.
          lw_item_control-chg_delqty           = 'X'.
          lw_item_data_spl-deliv_numb        = lw_lips-vbeln.
          lw_item_data_spl-deliv_item          = lw_lips-posnr.
          lw_item_data_spl-stge_loc            = w_lqua-lgort.
          lw_item_data_spl-pick_denial        = 'X'
    Appending work area into internal table to pass as parameter
          APPEND  lw_item_data TO  li_item_data.
    Appending work area into internal table to pass as parameter
          APPEND lw_item_control TO li_item_control.
    Appending work area into internal table to pass as parameter
          APPEND lw_item_data_spl TO li_item_data_spl.
    Clearing work areas after use
          CLEAR : lw_item_data, w_lqua,lw_item_data_spl,lw_item_control,
                        lw_vbpok, lw_lips.
        ENDIF.
      ENDLOOP.
    Passing the delivery no in the work area of header data
      lw_header_data-deliv_numb           = v_delivery_no.
      lw_header_control-deliv_numb       = v_delivery_no.
      lw_header_tech_control-upd_ind   = 'U'.
    Calling BAPI to change the Batch/Batch-Split/Delivery Quantity
      CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
        EXPORTING
          header_data           = lw_header_data
          header_control       = lw_header_control
          delivery                   = v_delivery_no
          techn_control         = lw_header_tech_control
        TABLES
          item_data                = li_item_data
          item_control            = li_item_control
          return                     = li_return_change
          item_data_spl         = li_item_data_spl.
    Calling BAPI to committ the task
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' .
    This is the only way which i found as better way to do the Batch split and updating storage location togetherly.
    I hope this code will help you.

  • MRP for storage locations

    Hi,
    One ROH material is extended to 2 storage locations (A,B). ROH is a BOM component for 2 intermediates.
    ROH Storage location A - Material Master
    ROH Storage location B
    Each tank cannot go less than 10 tonns and cannot exceed more than 50 tonns
    Re order point 25 tonns.
    Order lot size is 35 tonns.
    MRP will consider only one storage location A during requirements generation, becuase material master updated with storage location A only.
    My requirement like MRP should consider the both storage locations during MRP run and generate the requirements as per the re order point for inventory.
    Regards,
    LV

    Hello
    I suggest you to use MRP areas to plan each storage location separately.
    With MRP areas you can define different MRP parameters for each storage location and they can be planned independently.
    See the following link for more details:
    Determining and Assigning Storage Locations to the MRP Area - Special Planning Processes - SAP Library
    BR
    Caetano

  • BAPI or FM to Update storage location in outbound delivery with many items

    Hello!
    I have an urgent problem.
    Storage location determination didn't work and were  created thousands of deliveries without storage location.
    We want to run LSMW using BAPI.
    Which BAPI can update storage location (for many items in delivery. We saw an option to update the first item' but not all of them)
    PLZ try to help
    thank You

    Hi,
    check this FM:
    RV_DELIVERY_PICK_UPDATE
    SD_DELIVERY_UPDATE_PICKING

  • Storage location Data is not saving in table MARD using BAPI method.

    Hi Experts,
    TABLES: T001L, "Storage Locations
            MARA,  "General Material Data
            MAKT,  "Material Descriptions
            MBEW,  "Material Valuation
            MARC,  "Plant Data for Material
            MARD.  "Storage Location Data for Mate
    DATA: BAPI_HEAD   LIKE BAPIMATHEAD,  "MATERIAL
          BAPI_MAKT   LIKE BAPI_MAKT,    "Material Description
          BAPI_MARA1  LIKE BAPI_MARA,    "Client Data
          BAPI_MARAX  LIKE BAPI_MARAX,
          BAPI_MARC1  LIKE BAPI_MARC,    "Plant View
          BAPI_MARCX  LIKE BAPI_MARCX,
          BAPI_MBEW1  LIKE BAPI_MBEW,    "Accounting View
          BAPI_MBEWX  LIKE BAPI_MBEWX,
          BAPI_MARD1  LIKE BAPI_MARD,    "Storage location
          BAPI_MARDX  LIKE BAPI_MARDX,
          BAPI_RETURN LIKE BAPIRET2.
    DATA: BEGIN OF INT_MAKT OCCURS 100.
            INCLUDE STRUCTURE BAPI_MAKT.
    DATA: END OF INT_MAKT.
    DATA: BEGIN OF INT_MAT OCCURS 100,
             WERKS(4),     "Plant
             LGORT(4),     "Storage location
             MTART(4),     "Material type
             MATNR(18),    "Material number
             MAKTX(40),     "Material description
             MATKL(9) ,    "Material group
             MBRSH(1),     "Industry sector
             MEINS(3),     "Base unit of measure
             GEWEI(3),     "Weight Unit
             SPART(2),     "Division
             EKGRP(3),     "Purchasing group
             VPRSV(1),     "Price control indicator
             STPRS(12),    "Standard price
             PEINH(3),     "Price unit
             SPRAS(2),     "Language key
             BKLAS(4),     "VALUATION CLASS
             VERPR TYPE VERPR_BAPI,    "MOVING PRICE
             BWTTY(1),     "Valuation Catogory
             MLAST(1),     "Price determination
             MLMAA(1),     "Material Ledger
             EKLAS(4),     "Valuation Class for sales order stock
             QKLAS(4),     "Valuation Class for Project Stock
             ZKPRS TYPE DZKPRS, "Future price
             ZKDAT TYPE DZKDAT, "Valid From Date
             BWPRS TYPE BWPRS,  "Tax price 1
             BWPS1 TYPE BWPS1,  "Tax price 2
             VJBWS TYPE VJBWS,  "Tax price 3
             ABWKZ TYPE ABWKZ,  "Devaluatin indicator
             BWPRH TYPE BWPRH,  "Commercial price 1
             BWPH1 TYPE BWPH1,  "Commercial price 2
             VJBWH TYPE VJBWH,  "Commercial Price 3
             XLIFO(1),          "LIFO/FIFO revelant
             MYPOL(4),          "Pool no for LIFO
             MMSTA(2),          "Plant specific material status
             AUSME TYPE AUSME,  "Unit of issue
             QMATA(6),          "Material Authorization group
             RBNRM(9),          "Catalog Profile
             WEBAZ TYPE WEBAZ,  "Goods reciept processing time in days
             PRFRQ TYPE PRFRQ,  "Recurring Insepction
             SSQSS(8),          "QM Control key
             QZGTP(4),          "Certificate Type
             QSSYS(4),          "Required QM system for vendor
           END OF INT_MAT.
    DATA: V_MATNR TYPE MARA-MATNR.
    SELECT-OPTIONS:
                PLANT    FOR  MARC-WERKS OBLIGATORY MEMORY ID PLT,
                S_LGORT  FOR  MARD-LGORT MEMORY ID STL,
                MATERIAL FOR  MARA-MATNR MEMORY ID MAT,
                MATLTYPE FOR  MARA-MTART MEMORY ID MTY,
                DIVISION FOR  MARA-SPART MEMORY ID DIV.
    PARAMETERS:  F_FILE LIKE RLGRAP-FILENAME
                 DEFAULT 'C:\DATA\ZMATERIAL.XLS' MEMORY ID F_FILE,
    GETDATA AS CHECKBOX, "Tick to download materials data to local harddisk
             UPDDATA AS CHECKBOX. "Tick to update date to Materials Master
    IF GETDATA = 'X'.
       PERFORM DOWNLOAD_DATA.
       PERFORM DOWNLOAD_FILE.
    ENDIF.
    IF UPDDATA = 'X'.
       PERFORM UPLOAD_FILE.
       PERFORM UPDATE_MM.
    ENDIF.
    FORM DOWNLOAD_DATA.
    SELECT * FROM MARC  WHERE LVORM EQ ' '
                          AND WERKS IN PLANT
                          AND MATNR IN MATERIAL.
        CLEAR MARA.
        SELECT SINGLE * FROM MARA WHERE MATNR =  MARC-MATNR.
        CHECK MATLTYPE.
        CHECK DIVISION.
        CLEAR MBEW.
        SELECT SINGLE * FROM MBEW WHERE MATNR =  MARC-MATNR
                                    AND BWKEY =  MARC-WERKS.
        CLEAR MAKT.
        SELECT SINGLE * FROM MAKT WHERE SPRAS =  'EN'
                                    AND MATNR =  MARC-MATNR.
        CLEAR MARD.
        SELECT SINGLE * FROM MARD WHERE WERKS IN PLANT
                                  AND   LGORT IN S_LGORT.
        WRITE:/ MARC-WERKS,    "Plant
                MARD-LGORT,    "Storage location
                MARA-MTART,    "Material type
                MARA-MATNR,    "Material number
                MARA-MATKL,    "Material group
                MARA-MBRSH,    "Industry sector
                MARA-MEINS,    "Base unit of measure
                MARA-GEWEI,    "Weight Unit
                MARA-SPART,    "Division
                MARC-EKGRP,    "Purchasing group
                MBEW-VPRSV,    "Price control indicator
                MBEW-STPRS,    "Standard price
                MBEW-PEINH,    "Price unit
                MBEW-BKLAS,    "VALUE CLASS
                MAKT-SPRAS,    "Language key
                MBEW-BKLAS,    "Valuation Class
                MBEW-VERPR,    "Moving price
                MAKT-MAKTX,    "Material description
                MBEW-BWTTY,    "Valutaion Catogorey
                MBEW-MLAST,    "Price Determination
                MBEW-MLMAA,    "Material Ledger
                MBEW-EKLAS,    "Valuation class for Sales order stock
                MBEW-QKLAS,    "Valutaion Class for Project Stock
                MBEW-ZKPRS,    "Future Price
                MBEW-ZKDAT,    "Valid From Date
                MBEW-BWPRS,    "Tax price 1
                MBEW-BWPS1,    "Tax price 2
                MBEW-VJBWS,    "Tax price 3
                MBEW-ABWKZ,    "Devaluatin indicator
                MBEW-BWPRH,    "Commercial price 1
                MBEW-BWPH1,    "Commercial price 2
                MBEW-VJBWH,    "Commercial Price 3
                MBEW-XLIFO,    "LIFO/FIFO revelant
                MBEW-MYPOL,    "Pool no for LIFO
                MARC-MMSTA,    "Plant specific material status
                MARC-AUSME,    "Unit of issue
                MARC-QMATA,    "Material Authorization group
                MARA-RBNRM,    "Catalog Profile
                MARC-WEBAZ,    "Goods reciept processing time in days
                MARC-PRFRQ,    "Recurring Insepction
                MARC-SSQSS,    "QM Control key
                MARC-QZGTP,    "Certificate Type
                MARC-QSSYS.    "Required QM system for vendor
                INT_MAT-WERKS = MARC-WERKS.    "Plant
                INT_MAT-LGORT = MARD-LGORT.    "Storage Location
                INT_MAT-MTART = MARA-MTART.    "Material type
                INT_MAT-MATNR = MARA-MATNR.    "Material number
                INT_MAT-MAKTX = MAKT-MAKTX.    "Material description
                INT_MAT-MATKL = MARA-MATKL.    "Material group
                INT_MAT-MBRSH = MARA-MBRSH.    "Industry sector
                INT_MAT-MEINS = MARA-MEINS.    "Base unit of measure
                INT_MAT-GEWEI = MARA-GEWEI.    "Weight Unit
                INT_MAT-SPART = MARA-SPART.    "Division
                INT_MAT-EKGRP = MARC-EKGRP.    "Purchasing group
                INT_MAT-VPRSV = MBEW-VPRSV.    "Price control indicator
                INT_MAT-STPRS = MBEW-STPRS.    "Standard price
                INT_MAT-PEINH = MBEW-PEINH.    "Price unit
                INT_MAT-SPRAS = MAKT-SPRAS.    "Language key
                INT_MAT-BKLAS = MBEW-BKLAS.    "VALVATION CLASS
                INT_MAT-VERPR = MBEW-VERPR.    "MOVING price
                INT_MAT-BWTTY = MBEW-BWTTY.    "Valutaion Catogorey
                INT_MAT-MLAST = MBEW-MLAST.    "Price Determination
                INT_MAT-MLMAA = MBEW-MLMAA.    "Material Ledger
                INT_MAT-EKLAS = MBEW-EKLAS.    "Valuation class forS.O Stock
                INT_MAT-QKLAS = MBEW-QKLAS.    "Valutaion Class for Project
                INT_MAT-ZKPRS = MBEW-ZKPRS.    "Future Price
                INT_MAT-ZKDAT = MBEW-ZKDAT.    "Valid From Date
                INT_MAT-BWPRS = MBEW-BWPRS.    "Tax price 1
                INT_MAT-BWPS1 = MBEW-BWPS1.    "Tax price 2
                INT_MAT-VJBWS = MBEW-VJBWS.    "Tax price 3
                INT_MAT-ABWKZ = MBEW-ABWKZ.    "Devaluatin indicator
                INT_MAT-BWPRH = MBEW-BWPRH.    "Commercial price 1
                INT_MAT-BWPH1 = MBEW-BWPH1.    "Commercial price 2
                INT_MAT-VJBWH = MBEW-VJBWH.    "Commercial Price 3
                INT_MAT-XLIFO = MBEW-XLIFO.    "LIFO/FIFO revelant
                INT_MAT-MYPOL = MBEW-MYPOL.    "Pool no for LIFO
                INT_MAT-MMSTA = MARC-MMSTA.    "Plant specific material
                INT_MAT-AUSME = MARC-AUSME.    "Unit of issue
                INT_MAT-QMATA = MARC-QMATA.    "Material Authorization group
                INT_MAT-RBNRM = MARA-RBNRM.    "Catalog Profile
                INT_MAT-WEBAZ = MARC-WEBAZ.    "Goods reciept processing
                INT_MAT-PRFRQ = MARC-PRFRQ.    "Recurring Insepction
                INT_MAT-SSQSS = MARC-SSQSS.    "QM Control key
                INT_MAT-QZGTP = MARC-QZGTP.    "Certificate Type
                INT_MAT-QSSYS = MARC-QSSYS.    "Required QM system for
                APPEND INT_MAT.
                CLEAR  INT_MAT.
    ENDSELECT.
    ENDFORM.
    FORM DOWNLOAD_FILE.
    call function 'WS_DOWNLOAD'
      EXPORTING
        FILENAME                      = F_FILE
        FILETYPE                      = 'DAT'
      FILETYPE                      = 'WK1'
      tables
        data_tab                      = INT_MAT
      EXCEPTIONS
        FILE_OPEN_ERROR               = 1
        FILE_WRITE_ERROR              = 2
        INVALID_FILESIZE              = 3
        INVALID_TYPE                  = 4
        NO_BATCH                      = 5
        UNKNOWN_ERROR                 = 6
        INVALID_TABLE_WIDTH           = 7
        GUI_REFUSE_FILETRANSFER       = 8
        CUSTOMER_ERROR                = 9
        OTHERS                        = 10.
    IF SY-SUBRC = 0.
       FORMAT COLOR COL_GROUP.
       WRITE:/ 'Data Download Successfully to your local harddisk'.
       SKIP.
    ENDIF.
    ENDFORM.
    FORM UPLOAD_FILE.
    call function 'WS_UPLOAD'
      EXPORTING
        FILENAME                      = F_FILE
        FILETYPE                      = 'DAT'
      FILETYPE                      = 'WK1'
      tables
        data_tab                      = INT_MAT
      EXCEPTIONS
        FILE_OPEN_ERROR               = 1
        FILE_WRITE_ERROR              = 2
        INVALID_FILESIZE              = 3
        INVALID_TYPE                  = 4
        NO_BATCH                      = 5
        UNKNOWN_ERROR                 = 6
        INVALID_TABLE_WIDTH           = 7
        GUI_REFUSE_FILETRANSFER       = 8
        CUSTOMER_ERROR                = 9
        OTHERS                        = 10.
    IF SY-SUBRC = 0.
       FORMAT COLOR COL_GROUP.
       WRITE:/ 'Data Upload Successfully from your local harddisk'.
       SKIP.
    ENDIF.
    ENDFORM.
    FORM UPDATE_MM.
    LOOP AT INT_MAT.
    CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
      EXPORTING
        INPUT              = INT_MAT-MATNR
    IMPORTING
       OUTPUT             = INT_MAT-MATNR
    EXCEPTIONS
      LENGTH_ERROR       = 1
      OTHERS             = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Header
        BAPI_HEAD-MATERIAL        = INT_MAT-MATNR.
        BAPI_HEAD-IND_SECTOR      = INT_MAT-MBRSH.
        BAPI_HEAD-MATL_TYPE       = INT_MAT-MTART.
        BAPI_HEAD-BASIC_VIEW      = 'X'.
        BAPI_HEAD-PURCHASE_VIEW   = 'X'.
        BAPI_HEAD-ACCOUNT_VIEW    = 'X'.
    Material Description
        REFRESH INT_MAKT.
        INT_MAKT-LANGU           = INT_MAT-SPRAS.
        INT_MAKT-MATL_DESC       = INT_MAT-MAKTX.
        APPEND INT_MAKT.
    Client Data - Basic
        BAPI_MARA1-MATL_GROUP     = INT_MAT-MATKL.
        BAPI_MARA1-BASE_UOM       = INT_MAT-MEINS.
        BAPI_MARA1-UNIT_OF_WT     = INT_MAT-GEWEI.
        BAPI_MARA1-DIVISION       = INT_MAT-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      = INT_MAT-WERKS.
        BAPI_MARC1-PUR_GROUP  = INT_MAT-EKGRP.
        BAPI_MARC1-PUR_STATUS = INT_MAT-MMSTA.
        BAPI_MARC1-ISSUE_UNIT = INT_MAT-AUSME.
        BAPI_MARC1-QM_AUTHGRP = INT_MAT-QMATA.
        BAPI_MARC1-GR_PR_TIME = INT_MAT-WEBAZ.
        BAPI_MARC1-INSP_INT   = INT_MAT-PRFRQ.
        BAPI_MARC1-CTRL_KEY   = INT_MAT-SSQSS.
        BAPI_MARC1-CERT_TYPE  = INT_MAT-QZGTP.
        BAPI_MARC1-QM_RGMTS   = INT_MAT-QSSYS.
        BAPI_MARCX-PLANT      = INT_MAT-WERKS.
        BAPI_MARCX-PUR_GROUP  = 'X'.
        BAPI_MARCX-PUR_STATUS = 'X'.
        BAPI_MARCX-ISSUE_UNIT = 'X'.
        BAPI_MARCX-QM_AUTHGRP = 'X'.
        BAPI_MARCX-GR_PR_TIME = 'X'.
        BAPI_MARCX-INSP_INT   = 'X'.
        BAPI_MARCX-CTRL_KEY   = 'X'.
        BAPI_MARCX-CERT_TYPE  = 'X'.
        BAPI_MARCX-QM_RGMTS   = 'X'.
    Accounting 1
        BAPI_MBEW1-VAL_AREA      = INT_MAT-WERKS.
        BAPI_MBEW1-PRICE_CTRL    = INT_MAT-VPRSV.
        BAPI_MBEW1-STD_PRICE     = INT_MAT-STPRS.
        BAPI_MBEW1-PRICE_UNIT    = INT_MAT-PEINH.
        BAPI_MBEW1-MOVING_PR     = INT_MAT-VERPR.
        BAPI_MBEW1-VAL_CLASS     = INT_MAT-BKLAS.
        BAPI_MBEW1-VAL_CAT       = INT_MAT-BWTTY.
        BAPI_MBEW1-ML_SETTLE     = INT_MAT-MLAST.
        BAPI_MBEW1-ML_ACTIVE     = INT_MAT-MLMAA.
        BAPI_MBEW1-VM_SO_STK     = INT_MAT-EKLAS.
        BAPI_MBEW1-VM_P_STOCK    = INT_MAT-QKLAS.
        BAPI_MBEW1-FUTURE_PR     = INT_MAT-ZKPRS.
        BAPI_MBEW1-VALID_FROM    = INT_MAT-ZKDAT.
    *ACCOUNTING 2
       BAPI_MBEW1-TAXPRICE_1    = INT_MAT-BWPRS.
       BAPI_MBEW1-TAXPRICE_2    = INT_MAT-BWPS1.
       BAPI_MBEW1-TAXPRICE_3    = INT_MAT-VJBWS.
       BAPI_MBEW1-DEVAL_IND     = INT_MAT-ABWKZ.
       BAPI_MBEW1-COMMPRICE1    = INT_MAT-BWPRH.
       BAPI_MBEW1-COMMPRICE2    = INT_MAT-BWPH1.
       BAPI_MBEW1-COMMPRICE3    = INT_MAT-VJBWH.
       BAPI_MBEW1-LIFO_FIFO     = INT_MAT-XLIFO.
       BAPI_MBEW1-POOLNUMBER    = INT_MAT-MYPOL.
        BAPI_MBEWX-VAL_AREA   = INT_MAT-WERKS.
        BAPI_MBEWX-PRICE_CTRL = 'X'.
        BAPI_MBEWX-STD_PRICE  = 'X'.
        BAPI_MBEWX-PRICE_UNIT = 'X'.
        BAPI_MBEWX-MOVING_PR =  'X'.
        BAPI_MBEWX-VAL_CLASS =  'X'.
        BAPI_MBEWX-VAL_CAT       = 'x'.
        BAPI_MBEWX-ML_SETTLE     = 'X'.
        BAPI_MBEWX-ML_ACTIVE     = 'X'.
        BAPI_MBEWX-VM_SO_STK     = 'X'.
        BAPI_MBEWX-VM_P_STOCK    = 'X'.
        BAPI_MBEWX-FUTURE_PR     = 'X'.
        BAPI_MBEWX-VALID_FROM    = 'X'.
       BAPI_MBEWX-TAXPRICE_1    = 'X'.
       BAPI_MBEWX-TAXPRICE_2    = 'X'.
       BAPI_MBEWX-TAXPRICE_3    = 'X'.
       BAPI_MBEWX-DEVAL_IND     = 'X'.
       BAPI_MBEWX-COMMPRICE1    = 'X'.
       BAPI_MBEWX-COMMPRICE2    = 'X'.
       BAPI_MBEWX-COMMPRICE3    = 'X'.
       BAPI_MBEWX-LIFO_FIFO     = 'X'.
       BAPI_MBEWX-POOLNUMBER    = 'X'.
    *Storage Locations
        BAPI_MARD1-PLANT      = INT_MAT-WERKS.
        BAPI_MARD1-STGE_LOC   = INT_MAT-LGORT.
        BAPI_MARDX-PLANT      = INT_MAT-WERKS.
        BAPI_MARDX-STGE_LOC   = INT_MAT-LGORT.
       WRITE:/ BAPI_HEAD-MATERIAL, BAPI_MARC1-PLANT ,BAPI_MARD1-STGE_LOC.
        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              =
    <b>      STORAGELOCATIONDATA        =  BAPI_MARD1
           STORAGELOCATIONDATAX       =  BAPI_MARDX</b>
            VALUATIONDATA              = BAPI_MBEW1
            VALUATIONDATAX             = BAPI_MBEWX
          WAREHOUSENUMBERDATA        =
          WAREHOUSENUMBERDATAX       =
          SALESDATA                  = BAPI_MVKE1
          SALESDATAX                 = BAPI_MVKEX
          STORAGETYPEDATA            =
          STORAGETYPEDATAX           =
          IMPORTING
            RETURN                     = BAPI_RETURN
          TABLES
            MATERIALDESCRIPTION        = INT_MAKT
          UNITSOFMEASURE             =
          UNITSOFMEASUREX            =
          INTERNATIONALARTNOS        =
          MATERIALLONGTEXT           =
          TAXCLASSIFICATIONS         =
          RETURNMESSAGES             =
          PRTDATA                    =
          PRTDATAX                   =
          EXTENSIONIN                =
          EXTENSIONINX               =
    IF BAPI_RETURN-TYPE = 'E'.
       WRITE:/ 'Error Message ', BAPI_RETURN-MESSAGE.
    ENDIF.
    ENDLOOP.
    ENDFORM.
    <b>i am using this bapi method to copy materials from one plant to another plant using storage location so here what happenig is everyting is going correct but only the storage location data is not saving in table mard so any body faced this kind of problem please tell me.... and one more dbt
    bapi_marcx-pur_status = 'x' what is 'X' here??? is that mandatory field or required field ???
    points wil be rewarded.
    reagrds,
    sunil k airam.

    In the HEADDATA structure, STORAGE_VIEW should also be set as 'X' , in order to update storage location data
    for example
    BAPI_HEAD-STORAGE_VIEW = 'X'.
    Also, PUR_STATUS corresponds to field MARA-MSTAE whose domain has value table T141, therefore values in the field are checked against T141
    Edited by: Harris Veziris on May 12, 2008 12:37 PM

  • BAPI_REQUISITION_CREATE is updating storage location address (global one)

    Hello Colleagues,
    We have a LN application for PR creation and is integrated with SAP. Process is PR gets transferred from LN to SAP and then PO would be created manually in SAP. Obseved couple of times that storage location address gets updated with delivery address in PR. Any pointers in this regard? Could you give me some insight about REQUISITION_ADDRDELIVERY parameter for BAPI, specially ADDR_NO.
    Thanks and Regards,
    Prasanth

    Simple rule is storage location address should not be changed from transaction data. In case item delivery address differs from storage location, it should made as local to PO. But here storage location got updated with new delivery address. Result is many POs are going to effet with this change in SLoc address. This problem found few months ago and now.

  • Storage location and Batch updation for components in Production Order.

    Hi Friends,
    After creating Production Order,need to update components with Storage Location(RESBD-LGORT) and Batch(RESBD-CHARG).
    Plese any one can help me by providing FM/BAPI for the same(Update Component level)
    Points will be rewarded.
    Thanks,
    Prb.

    Hi Prathap,
    Path - OCHA
    Condition type,access sequence, strategy type,
    Work on automatic batch determination. Assign standard search procedure to order type dependent parameter, check against manual entry.
    Make sort sequence for material by CU 70, tick ascending order, Then assign component in COB1, enter selection values and sort sequence. In finish product material master set automatic batch determination.
    System will copy the required material with batch & storage location, also check against manual entry.
    I think it will solve your problem.
    Regards,
    Suhas

Maybe you are looking for