Problem in uploading material master data using BAPI?

Hi all,
I am using BAPI_MATERIAL_SAVEDATA to upload materail master data. Here i have to pass moving average price values in two currenices(using account_view and valuationdata in BAPI). But i found only one field for  moving average price i.e moving_pr in valuationdata.
Please help me on how to upload the moving average price in two currencies?
Thanks,
Aravind.

Hi
There is function module BAPI_MATERIAL_SAVEREPLICA where
VALUATIONDATA parameter is in the tables tab.
But I didn't test it. Try, may be it works as you need.

Similar Messages

  • Problem in extending material master data using BAPI?

    Hi all,
    I have created a program to upload material master using BAPI_MATERIAL_SAVEDATA WITH VIEWS
    Basic view, purchase view, account view , storage view and MRP view. I am successful while uploading this data while not  taking  the valuation type  field to account view(passing only valuation area,valuation class and moving price).
    But when i am trying to pass valuation type field also then it is giving error as 'First create the valuation-type-independent data' .
    So i have written another program to extend this material to enter valuation type , then it is giving the error as 'Valuation category does not allow split valuation'.
    Please help me to solve this problem and while modifying what are the mandatory values to pass to BAPI?
    Thanks,
    Vamshi.

    Hi VAMSHI,
    I have your same error but I don't know how to solve it. We have active "material split valuation" and valuation type is mandatory field if using ACCOUNTING and COSTING views.
    Please, let me know.
    Thanks in advance.
    GB

  • Problem in uploading material master data using BDC?

    Hi all,
    I am using  BDC call transaction method to upload material data. Here i am facing a problem that a value in the flat file is going to the wrong screen field . But my recording done properly.
    In recording, after entering the data in the view BASIC DATA1 and trying to enter the text . For this i need to scroll down the scroll bar and after that i am clicking on basic data text and entering the text. Here i am not touching the languge field.
    But the problem is the text to be entered into the basic data text is storing in language and giving error.
    Please help me by specifying the reason and solution for this problem? Whether i did any mistake in recording in scrolling?
    Thanks,
    Vamshi.

    Hi
    Go with BAPI for such huge transactions and screens. Use BAPI: BAPI_MATERIAL_SAVEDATA.
    Regards,
    Vishwa.

  • Zprogram to create material master data using bapi

    can anyone send me a zprogram which uses a
    bapi to create\update material master data .
    thanks ,
    Amit

    hi,
    here below a code sample that will help you
    FORM execution .
      DATA: is_headdata TYPE bapimathead.
      DATA: is_clientdata TYPE bapi_mara.
      DATA: is_clientdatax TYPE bapi_marax.
      DATA: is_plantdata TYPE bapi_marc.
      DATA: is_plantdatax TYPE bapi_marcx.
      DATA: is_valuationdata  TYPE bapi_mbew.
      DATA: is_valuationdatax  TYPE bapi_mbewx.
      DATA: it_materialdescription TYPE bapi_makt OCCURS 0 WITH HEADER LINE.
      DATA : is_storagelocationdata TYPE bapi_mard,
             is_storagelocationdatax TYPE bapi_mardx.
    *... views
      is_headdata-material = mara-matnr.
      is_headdata-ind_sector = 'M'.
      is_headdata-matl_type = 'ROH'.
      is_headdata-basic_view = 'X'.
      is_headdata-purchase_view = 'X'.
      is_headdata-mrp_view = 'X'.
      is_headdata-account_view = 'X'.
      is_headdata-cost_view = 'X'.
      is_headdata-storage_view = 'X'.
    *... constants
      is_clientdata-pur_valkey = '3'.
      is_clientdatax-pur_valkey = 'X'.
    *... Données article générales (de l'écran)
      is_clientdata-base_uom = mara-meins.
      is_clientdata-matl_group = mara-matkl.
      is_clientdata-mfr_no = mara-mfrnr.
      is_clientdata-manu_mat = mara-mfrpn.
      is_clientdata-pur_status = mara-mstae.
      is_clientdata-old_mat_no = mara-bismt.
      is_clientdatax-base_uom = 'X'.
      is_clientdatax-matl_group = 'X'.
      is_clientdatax-mfr_no = 'X'.
      is_clientdatax-manu_mat = 'X'.
      is_clientdatax-pur_status = 'X'.
      is_clientdatax-old_mat_no = 'X'.
    *... Description
      it_materialdescription-langu = sy-langu.
      it_materialdescription-matl_desc = makt-maktx.
      APPEND it_materialdescription.
      is_plantdata-sm_key = '000'.
      is_plantdata-dep_req_id = '2'.
      is_plantdata-availcheck = '02'.
      is_plantdata-auto_p_ord = 'X'.
      is_plantdatax-sm_key = 'X'.
      is_plantdatax-dep_req_id = 'X'.
      is_plantdatax-availcheck = 'X'.
      is_plantdatax-auto_p_ord = 'X'.
      is_plantdata-pur_status = mara-mstae.
      is_plantdatax-pur_status = 'X'.
          is_plantdata-profit_ctr = '100012'.
      is_plantdata-proc_type = 'F'.
      is_plantdata-determ_grp = 'Z001'.
      is_plantdata-deploy_horiz = '000'.
      is_plantdatax-proc_type = 'X'.
      is_plantdatax-determ_grp = 'X'.
      is_plantdatax-deploy_horiz = 'X'.
    *... Plant data
      is_plantdata-plant = marc-werks.
      is_plantdata-pur_group = marc-ekgrp.
      is_plantdata-abc_id = marc-maabc.
      is_plantdata-mrp_type = marc-dismm.
      is_plantdata-plnd_delry = marc-plifz.
      is_plantdata-lotsizekey = marc-disls.
      is_plantdata-safety_stk = marc-eisbe.
      is_plantdata-mrp_ctrler = marc-dispo.
      is_plantdata-iss_st_loc = marc-lgpro.
      is_plantdata-sloc_exprc = marc-lgfsb.
      is_plantdata-round_prof = marc-rdprf.
      is_plantdatax-plant = marc-werks.
      is_plantdatax-pur_group = 'X'.
      is_plantdatax-abc_id = 'X'.
      is_plantdatax-mrp_type = 'X'.
      is_plantdatax-plnd_delry = 'X'.
      is_plantdatax-lotsizekey = 'X'.
      is_plantdatax-safety_stk = 'X'.
      is_plantdatax-mrp_ctrler = 'X'.
      is_plantdatax-iss_st_loc = 'X'.
      is_plantdatax-sloc_exprc = 'X'.
      is_plantdatax-round_prof = 'X'.
    *... Valuation
      is_valuationdata-val_area = marc-werks.
      is_valuationdatax-val_area = marc-werks.
      is_valuationdata-price_ctrl = 'V'.
      is_valuationdata-price_unit = '1'.
      is_valuationdata-val_class = '3000'.
      is_valuationdata-qty_struct = 'X'.
      is_valuationdata-orig_mat = 'X'.
      is_valuationdata-price_unit = mbew-peinh.
      is_plantdata-lot_size = mbew-peinh.
      is_valuationdatax-price_ctrl = 'X'.
      is_valuationdatax-price_unit = 'X'.
      is_valuationdatax-val_class = 'X'.
      is_valuationdatax-qty_struct = 'X'.
      is_valuationdatax-orig_mat = 'X'.
      is_valuationdatax-price_unit = 'X'.
      is_plantdatax-lot_size = 'X'.
    Storage
      IF NOT marc-lgpro IS INITIAL.
        is_storagelocationdata-plant = marc-werks.
        is_storagelocationdata-stge_loc = marc-lgpro.
        is_storagelocationdata-stge_bin = mard-lgpbe.
        is_storagelocationdatax-plant = is_storagelocationdata-plant.
        is_storagelocationdatax-stge_loc = is_storagelocationdata-stge_loc.
        is_storagelocationdatax-stge_bin = 'X'.
      ENDIF.
      CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
      EXPORTING
      headdata                   = is_headdata
      clientdata                 = is_clientdata
      clientdatax                = is_clientdatax
      plantdata                  = is_plantdata
      plantdatax                 = is_plantdatax
      FORECASTPARAMETERS         =
      FORECASTPARAMETERSX        =
      PLANNINGDATA               =
      PLANNINGDATAX              =
       storagelocationdata        = is_storagelocationdata
       storagelocationdatax       = is_storagelocationdatax
      valuationdata              = is_valuationdata
      valuationdatax             = is_valuationdatax
      WAREHOUSENUMBERDATA        =
      WAREHOUSENUMBERDATAX       =
      SALESDATA                  =
      SALESDATAX                 =
      STORAGETYPEDATA            =
      STORAGETYPEDATAX           =
      FLAG_ONLINE                = ' '
      FLAG_CAD_CALL              = ' '
      IMPORTING
      return                     = return
    TABLES
         materialdescription        = it_materialdescription
      UNITSOFMEASURE             =
      UNITSOFMEASUREX            =
      INTERNATIONALARTNOS        =
      MATERIALLONGTEXT           =
      TAXCLASSIFICATIONS         =
         returnmessages             = it_returnmessages
      PRTDATA                    =
      PRTDATAX                   =
      EXTENSIONIN                =
      EXTENSIONINX               =
    endform.
    Regards.
    David

  • Error while updating AFS weights & measures material master data using BAPI

    Hello ABAP experts,
    Please help me in finding the right way in updating AFS weights & measures data (/AFS/MARM) data using BAPI /AFS/BAPI_MATERIAL_SAVE_DATA.
    I'm populating the following table parameters of the BAPI,
    1. SKUUNITSOFMEASURE with /AFS/MARM records
    s_bapi_marm-ALT_UNIT = 'EA'.
    s_bapi_marm-ALT_UNIT_ISO = 'EA'.
    s_bapi_marm-grid_value = 'XXXXS'.
    *s_bapi_marm-STOCK_CATEGORY = '01000'.
    s_bapi_marm-volume  = '10'.
    s_bapi_marm-GROSS_WT  = '10'.
    s_bapi_marm-NET_WEIGHT  = '10'.
    append s_bapi_marm to t_bapi_marm.
    2. UNITSOFMEASURE with MARM records
    s_bapi_uom-ALT_UNIT = 'EA'.
    s_bapi_uom-ALT_UNIT_ISO = 'EA'.
    s_bapi_uom-NUMERATOR = '1'.
    s_bapi_uom-DENOMINATR = '1'.
    s_bapi_uom-UNIT_OF_WT = 'KG'.
    s_bapi_uom-VOLUMEUNIT = 'CCM'.
    append s_bapi_uom to t_bapi_uom.
    But the BAPI returns me an error "Stock Category & is not valid in Category structure  &"
    Let me know if you have any inputs on this one.
    Thanks,
    Partha.

    Hi VAMSHI,
    I have your same error but I don't know how to solve it. We have active "material split valuation" and valuation type is mandatory field if using ACCOUNTING and COSTING views.
    Please, let me know.
    Thanks in advance.
    GB

  • Uploading of material master data using bapi BAPI_MATERIAL_SAVEDATA

    hi guys,
    i am uploading data from a flatfile (say notepad file).
    the value for the field BRGEW(gross_wt) is displayed as 0.0000 WHEN i run the transaction MM03 where as  in the flat file its value  is 0000000000003
    the data type of BRGEW is P
    what should i do to solve this issue.
    my flat file looks like this
    000000000000010760FERTRNY01test material                           KG 005      NY010KG 0000000000003
    My structure is
    DATA:
    BEGIN OF MATERIAL_MASTER,
    MATNR(018) TYPE C,      "Material number
    MTART(004) TYPE C,      "Material type
    MBRSH(001) TYPE C,      "Industry sector
    WERKS LIKE MARC-WERKS,  "TYPE C Plant
    MAKTX(040) TYPE C,      "Material description
    MEINS(3)   TYPE C,      "base unit of measure
    MATKL(009) TYPE C,      "Material group
    SPART(002) TYPE C,      "Division
    WEBAZ(03)  TYPE C,      "GR processing time
    GEWEI LIKE MARA-GEWEI, "Weight unit
    BRGEW(13) type c, "Gross weight
    end of MATERIAL_MASTER.
    thanks
    Edited by: nishant patel on Aug 7, 2008 11:16 AM

    Hi,
    try to fill the BAPI structure
    WRITE ds_output1-brgew
                TO <bapi_structure>
                UNIT 'Pass the unit here'
                NO-GROUPING.
    Hope it will work.
    Thanks,
    Kamesh Bathla
    Edited by: Kamesh Bathla on Aug 7, 2008 6:51 PM

  • I want to upload material master (MM01) using LSMW with BAPI method

    I want to upload material master (MM01) using LSMW with BAPI method and also later on I may need to change the updated data.
    Which business object and Method I should use so that i can do both.
    Thanks
    kumar n

    Hi,
    The business object is BUS1001.
    Thanks,
    Murali

  • I am unable to upload the customer master data using BAPI.?

    Hi Guru's,
    i am unable to upload the customer master data using BAPI.(BAPI_CUSTOMER_CREATEFROMDATA1)
    Please guide me how upload the data...
    Thanks in iadvance
    Srinivas...

    Hello Srinivas
    This BAPI does not allow to create a new customer from scratch but only to copy an existing customer to a new one and change its address data.
    The reference customer has to be provided using IMPORTING parameter PI_COPYREFERENCE. See also the BAPI documentation for more details.
    The BAPI does the same like transaction XD01 with Reference.
    Regards
      Uwe

  • Upload material master data

    Hi friends,
    can u provide prog for upload material master data by using bapi bapi_material_savedata.
    i need to pass the following fields .
                    MARA-MATNR
               MARA-MBRSH
                  MARA-MTART
                MARA-MATKL
                 MARA-MEINS
              MAKT-SPRAS
                MAKT-MAKTX
                MVKE-VKORG
              MVKE-VTWEG
                    MVKE-MTPOS
                 MARA-TRAGR
                          MARC-WERKS
               MARC-EKGRP
                   MBEW-BWKEY   and also using dynamic internal table.

    Hi siddu,
    As a developer you should ask for the code.
    Try u r self writing the code.If u struck any where just post the question.
    There wil be many threads regrading material master data.
    Give ur bapi BAPI_MATERIAL_SAVEDATA and search in the forum then u will get so many threads.
    serach from there and write accrding to ur req.
    Thanks,

  • Problem in uploading HR master Data from excel

    Hello
    When I am  uploading HR master data using excel , I get the error
    "Error in info type 0006 and emp no 00000016 with msg id 00 no. 055 msg Fill in all required entry fields "
    I have filled in   the following fields for  infotype 0006:-
    SUBTY ='1'
    ANSSA = '1'
    STRAS  , LOCAT ,ORT01, STATE , PSTLZ , LAND1, TELNR.'
    But  I am getting the error  for  filling the required entry fields.
    I am using The function module  HR_MAINTAIN_MASTERDATA.
    If anyone has an idea...about the problem, please write

    No work schedule rule for key 1 0501NORM 20090101 ###
    This type of error is a functional one . It simply means you are trying to feed the field with value which is not acceptable (here work schedule does not exist for specific key). Either contatct your functional collegue to check the configuration or change the provided data.
    Also as Bala noticed you should always check if relevant record is allowed to be entered directly in PA30. Make sure all required fields are provided too.The best is to either enter it manually or use SHDB to record this entry and get technical field names. You then know which fields you need to provide in order to create a correct entry.
    Regards
    Marcin

  • Uploading Material Master data from legacy system

    Hi all,
    do we have any sap defined bdc for material master data ,if no ho to do that can anybody explain me step by step procedure how to do that
    Thanks in advance
    Santosh R

    Santosh,
    Use BAPI as we already have pre-defined BAPI for material upload given by SAP.
    <b>BAPI_MATERIAL_SAVEDATA</b>
    Also check this BAPI in MM01 uploading for the complete code I have written.
    Regards
    Aneesh.

  • Create Material Master Data with BAPI

    Hi,
    I don't know using of BAPI. I want using BAPI_MATERIAL_SAVEDATA bapi for creating material master data for Basic Data1, Basic Data2, Purchasing and MRP views. Does anybody can help me ?
    Thank you
    Good night

    Hi,
    Please refer to the documentation below:
    BAPI_MATERIAL_SAVEDATA
    Short Text
    Create and Change Article Master Data
    Functionality
    You use this method to create new material master data or to change existing material master data. The data on a material can be transferred for each call.
    When creating material master data, you must transfer the material number, the material type, and the industry sector to the method. You must also enter a material description and its language.
    When changing material master data, you need enter only the material number.
    In the header data, you must select at least one view for which data is to be created. Depending on the view selected, you must maintain other required parameters. If you do not enter values for all of the required parameters, the method is ended with an error message.
    The corresponding fields in the tables (such as CLIENTDATA) must first be supplied with data by the calling program. An indicator must also be set for each of these fields so that the data is written to the database by the method. This requires the calling program to supply the corresponding field with the indicator in a checkbox table (for example, CLIENTDATAX). Checkbox tables exist for tables that do not contain any language-dependent texts (MAKT, MLTX), International Article Numbers (MEAN), or tax classifications (MLAN). Several data records for a material can be created in these tables.
    If a structure contains fields for units of measurement (such as structure CLIENTDATA, field BASE_UOM), language indicators (such as structure MATERIALDESCRIPTION, field LANGU), or country indicators (such as structure TAXCLASSIFICATIONS, field DEPCOUNTRY), there is always a field of the same name with the ending _ISO. This makes it possible to transfer either the internally used SAP code or a standardized ISO code for the units of measurement, language indicators, or country indicators. ISO codes are converted to an SAP code internally for further processing. The ISO code is used only if the SAP code is not transferred. If you use ISO codes, there must be a unique assignment of the ISO code to the SAP code in the following activities in Customizing for Global Parameters:
    Check Units of Measurement
    Define Countries
    If you want to maintain long texts (basic data texts, internal comments, purchase order texts, material memos, or sales texts) or customer-defined fields for a material, some special conditions have to be observed. They are described in the documentation for parameters MATERIALLONGTEXT and EXTENSIONIN.
    Parameters
    HEADDATA
    CLIENTDATA
    CLIENTDATAX
    PLANTDATA
    PLANTDATAX
    FORECASTPARAMETERS
    FORECASTPARAMETERSX
    PLANNINGDATA
    PLANNINGDATAX
    STORAGELOCATIONDATA
    STORAGELOCATIONDATAX
    VALUATIONDATA
    VALUATIONDATAX
    WAREHOUSENUMBERDATA
    WAREHOUSENUMBERDATAX
    SALESDATA
    SALESDATAX
    STORAGETYPEDATA
    STORAGETYPEDATAX
    FLAG_ONLINE
    FLAG_CAD_CALL
    NO_DEQUEUE
    NO_ROLLBACK_WORK
    RETURN
    MATERIALDESCRIPTION
    UNITSOFMEASURE
    UNITSOFMEASUREX
    INTERNATIONALARTNOS
    MATERIALLONGTEXT
    TAXCLASSIFICATIONS
    RETURNMESSAGES
    PRTDATA
    PRTDATAX
    EXTENSIONIN
    EXTENSIONINX
    Exceptions
    Function Group
    1001UEB
    Thanks,
    Sandeep.

  • Problem when creating material master data

    Hi,
      I use MM01 to create a material master data and save it, the system appears the material created successfully. But when I use MM03 to display the material, the system appears no this material exists in the system. I use ST22 find some runtime error:  "Insert into MARA values MARA" .
    How can I solve this problem?
    Fiona Zhang

    Hi,
    Have you executed the MARA table by material name.
    Then try with MARA-ERNAM field. Enter ur user id and then execute. lets see whether it is really created or not in ur system.
    If u dont find any material created by ur name then go to SO01 transaction and check ur inbox....U will find some mails like update terminated.
    U can talk to ABAPer to get this resolved.
    Thanks & Regards,
    Shaik Hussain

  • Transferring MATERIAL MASTER DATA USING lsmw

    I am using LSMW to transfer material master data from text file using direct input program RMDATIND.  The problem is that the field WRKST in screen is of 48 characters while the batch data structure BMMH1 of field WRKST contains 14 characters. How can we transfer the full 48 characters in text file to THE FIELD BMMH1 IN DIRECT INPUT PROGRAM. Can we write any translation or routines . If yes, how is it possible. I can do the same using BDC but our client is already using the LSMW , only the new field WRKST for material has to be inserted. It is picking only 14 characters.
    Regards
    Debopriyo

    Hi
    Kindly use the sap note 351557 it is applicable for your release
    if you have any further clarifications let me know
    Regards
    Damu

  • Material Master Creation Using BAPI

    Hi,
    I m using BAPI_MATERIAL_SAVEDATA for Material creation using BAPI.
    Now the problem is , i have created a Screen exit long back in Purchasing view.. the corresponding Z field is created in table MARC..
    How can i pass value to this Z field using BAPI.
    i tried with BAPI_MARC.. my Z field is not coming in that structure.
    Can anyone guide me how can this be achieved.
    Thanks in Advance
    Aravindh Mani

    Hi,
    The Function Module BAPI_MATERIAL_SAVEDATA has the options to pass the Z fields. There exits a structure parameters
    EXTENSIONIN
    EXTENSIONINX
    in BPAI. In EXTENSIONIN pass the data and value part you can pass  in EXTENSIONINX. So this will update the Z fileds in material
    master .

Maybe you are looking for

  • Birthday calendar in notification centre alerts

    Hi there For some reason, all my birthday calendar entries have changed their alerts which means that in notification centre, instead of the birthday alert appearing the week before, the alert now only shows on the same day. I generally like to have

  • Merging two XML Document Objects

    I'm trying to merge two seperate XML Document Objects into one Object. Any suggestions would be very much appreciated. This is what the Objects look like when returned. FIRST: <?xml version = '1.0'?> <app> <name>Home</name> <active>true</active> <ord

  • Logical placements of .load() and .onload()

    Hi Folks... I got the following code from Adobe's 'Serverside ActionScript Language Reference'. Here it is: myLoadVars = new LoadVars(); myLoadVars.onLoad = function(result){     trace("myLoadVars load success is " + result); myLoadVars.load(http://w

  • How to configure jobwork process in Co

    Hi, In our business process in one of operation we need to send the material to jobwork and client want to track that amount and want to include in cost rollup? In out scenerio, first two operations will be held inside and third operation will be sen

  • When will Norton Tool Bar be fixed so v7 can be loaded?

    The Norton Tool Bar is needed for me to use Firefox 7. When will a fix be available for this issue?