LSMW - Cost Center Upload using BAPI

I have to upload Cost Centers in SAP. I want to use BAPI BUS0012-CostCenter.CreateMultiple for the purpose, but neither does this have a message type attached to it nor it is registered in the Data Transfer Program Library (Tcode-BDLR). The ALE interface is also missing for this.
Can someone guid me for
1. Registering the program in Data Transfer Library (Tcode-BDLR),
2. Creating a message type for the same,
3. Generating ALE interface (Tcode-BDBG).
Your award is assured for all the replies you post.
Thanks in advance.
Regards,
Gajendra Bhatt

Hi!
Sounds like you pretty good know what to do already. Then you should have found the application help, too - but I'm not sure, so here are the links:
BDLR: http://service1.sap.getro.net//ecc_5.0_sr1/helpdata//EN/7b/3519b3fed111d2a6250060087832f8/frameset.htm
Messages can be defined with WE81 (I hope, that's the right kind of message)
BDBG: http://service1.sap.getro.net//ecc_5.0_sr1/helpdata//EN/78/21740f51ce11d189570000e829fbbd/frameset.htm
The ALE Programming Guide http://service1.sap.getro.net//ecc_5.0_sr1/helpdata//EN/78/2173cf51ce11d189570000e829fbbd/frameset.htm says quite a lot to the necessary steps - this should be quite usefull on your way to your own data migration.
Regards,
Christian

Similar Messages

  • LSMW Cost Center creation using BAPI BUS0012

    Hi
    I am creating a LSMW using BAPI BUS0012, I have done the setting for inbound Idoc Processing, but when i am clicking on maintain structure relations, i am getting an error No Target structure could be
    found
    please let me know what to do ?
    thanks in advance
    Lokesh

    Hi
    YOu can check http://help.sap.com/saphelp_nw04/helpdata/en/ad/2d54a41d7011d2b42e006094b944c8/frameset.htm
    Here you may get a answer to your question.
    Cheers,
    Hakim

  • LSMW - Cost Center Upload

    Hi Gurus,
    Any idea on what BAPI should we use on uploading Cost Center using LSMW? Currently we are using a BAPI with the following characteristics:
    Business Object    BUS0012      Cost Center
    Method                   CREATEMULTIPLE
    Message Type       COSTCENTER_CREATEMULTIPLE
    Basic Type             COSTCENTER_CREATEMULTIPLE
    Unfortunately on step  4 - Maintain Structure Relations, we are encountering an error "No target structures could be found" upon executing it. It seems that the selected bapi has no export parameter/structure.
    Any suggestions for the approach should we use?
    Thanks and Regards,
    Jay

    Hi,
    Check the below links.
    LSMW Cost Center creation using BAPI BUS0012
    http://wiki.sdn.sap.com/wiki/display/ABAP/ListofBAPI%27s
    Hope this helps.
    Regards,
    Satish Kanteti

  • Profit Center upload using LSMW

    Hello,
    I have created a LSMW project for profit center upload using the BAPI methodology, BUS0015(Profit center)/CREATE(method)
    PROFITCENTER_CREATE(message type)
    PROFITCENTER_CREATE01(basic type)
    The Idoc inbound seeting are set as follows :
    File port              DX_PORT_00
    Partn.Type             US
    Partner no.            LSMW_PAR00
    Message Type           PROFITCENTER_CREATE
    Process code           BAPI
    When I run the data file in, the Idocs are created successfully in status 53, but I do not see the actual profit center when I go to KE53. We are on ECC 5.0
    Thanks in advance.

    Dear all,
    We are on ECC 6.0 and trying using the same configuration for loading profit center.
    Unfortunately, we received error message in the step of IDoc generation and we found that the message type and basic type got truncated as 'PROFIT' and 'PROFITCE' respectively.  But we could still see the correct info at the step of 'Display converted data' which is a step just before generation.
    Have you guys had the same problem previously?  Do you know what went wrong?
    Cheers,
    Ivan

  • Sales order details uploading using BAPI method in LSMW

    Hi Guys,
    Sales order details uploading using BAPI in LSMW, could you please suggest me, is any standard method or programs is available for this.
    I have some queries about this.
    1) One header line having multiple line items, in this case  we able to upload use the  LSMW method,
        if possible please tell me the steps.
      2) Do we need to do any config changes while uploading data?     
      3) Flat file should be which format.
      4) Steps to process each step wise if possible.
    Please help me
    Thanks,
    Gourisanakar.

    Hi Gouri Sankar,
    would you be able to upload the sales orders with multiple line items using BAPI LSMW?
    if so could you plz suggest?
    Thanks in advance.
    Suresh/

  • LSMW Cost Center

    I'm looking for a LSMW to upload the cost center from a xls-file or csv-file in the R/3 System. Which LSMW can I use for this?

    hi
    You can user recording method. In LSMW first step, select the radio button for recording option then record the tcode. It is easier than all others
    Reward if it dose
    Siva Kuamr

  • KP06 Cost Center Upload-How to do

    Dear Experts,
    Please Let me know how to upload Cost center Plan through KP06-Urgent

    Hello,
    You cannot postphone go live till the books of accounts being audited. You do not know how much time it will take. What you are trying to do is bringing the books from your legacy data to ERP, in other system you packing from one bag to another bag. The following information is useful to you.
    Hello,
    Broadly I will divide data uploading process into two categories.
    1. Master data (GL accounts, customers, vendors, assets, cost elements, cost centers, profit centers etc.)
    2. Transactional Data (Open Items for customers and vendors, GL line items, Cost Center planning, profit center plan data load etc.)
    In the first case mostly you can use LSMW, if you are conversant. The following document is useful to you.
    http://www.scmexpertonline.com/downloads/SCM_LSMW_StepsOnWeb.doc
    Note: No template is suitable for you, because, your configuration is different and their configuration is different, field status of various fields must be different. Therefore, follow the above document and start from fresh with recording. Recording is more or less sufficient for master data.
    In the second case, you create 5 Offsetting accounts + one main offsetting account.
    1. Vendor Offsetting Account
    2. Customer Offsetting Account
    3. Asset Offsetting Account
    4. GL Offsetting Account
    5. Stock Offsetting Account
    At the end of the day, the total balances within these accounts must be ZERO. Make ZERO these accounts and transfer the balance to MAIN offsetting account. Once you have done this, make sure you have blocked all these accounts.
    Technically, in second case, you should take help from ABAPer to write BDC, particularly in case if your entries are having different line items. For example your first document is having 5 line items and second document is having 10 line items, in such case LSMW recording will not work. You can depend on some standard SAP programs to map the LSMW. If you are not conversant with how to map, then you can refer the following document posted by Naimesh.
    /people/naimesh.patel/blog/2008/08/14/lsmw-with-rfbibl00
    Still, if you are not able to map, then there is no other way, you need to depend on ABAPer for uploading the transaction data through BDC. He / she will create a program and a customized transaction code for you and provide you the format. You may have to help the ABAPer with your requirement what you are exactly looking to upload.
    Hope this is informative and let me know if you need any further information.
    Regards,
    Ravi

  • Material master upload using BAPI...

    Helo SDNers,
    I am trying to upload material master using BAPI.
    data :  begin of t_mat occurs 0,
            material type matnr,             " Material - MATNR
            ind_sec type mbrsh,              " Industry sector  - MBRSH
            mat_typ type mtart,              " Material type - MTART
            plant type werks_d,              " plant - WERKS_D
            stge_loc type lgort_d,           " Storage location - LGORT_D
            sales_org type vkorg,            " Sales org - VKORG
            distr_chan type vtweg,           " Distribution channel - VTWEG
            mat_desc type maktx,             " Material description - MAKTX
            base_uom type meins,             " Base unit of measurement- MEINS
            mat_grp type matkl,              " material group - MATKL
            division type spart,             " Division - SPART
            gen_itmcatmgrp type MTPOS,       " General item category group -MTPOS_MARA
            gros_weight type BRGEW,          " Gross weight - BRGEW
            net_weight type NTGEW,          " Net weight - NTGEW
            mat_grppack type MAGRV,          " Material group pack - MAGRV
            delv_plant type DWERK_EXT,       " Delivery plant
            tax_clasif type TAXKM,           " Tax classification
            item_catgrp type MTPOS,          " Item category group
            aval_check type MTVFP,           " Availability check
            trans_grp type TRAGR,            " Transportation group
            load_grp type LADGR,             " Loading group
            pur_grp type EKGRP,              " Purchasing grp,
            mrp_type type DISMM,             " MRP type
            mrp_contr type DISPO,            " MRP Controller
            lot_size type DISLS,             " Lot size,
            gr_processing type WEBAZ,        " GR Processing time
            schdmargin_key type FHORI,       " Schedule margin key
            batch_mangment type XCHPF,       " Batch management
            strog_cond type RAUBE,           " Storage condition
            source_list type KORDB,          " Source list
            mrp_grp type DISGR,              " MRP group
            reorder_point type MINBE,        " Reorder point
            procurement_type type BESKZ,     " Procurement type
            sp_procurement_type type SOBSL,  " Special  Procurement type
            inhouse_prod type DZEIT,                    " Inhouse production
            safety_stock type EISBE,         " Safety stock
            strategy_group type STRGR,       " Strategy group
            availabilty_grp type MTVFP,      " Availability group
            batch_entry type KZECH ,         " Batch entry
            valuation_class type BKLAS,      " Valuation class
            price_control type VPRSV,        " Price control
            moving_price type VERPR,         " Moving price
            standard_price type STPRS,       " Standard price - STPRS
            langu(2),                        " Language
    end of t_mat.
    this is my internal table i have these many content in my excel file
    please explain me what the following code does .....
    move-corresponding wa to bapi_head.
    bapi_head-basic_view = 'X'.
    bapi_head-sales_view = 'X'.
    bapi_head-purchase_view = 'X'.
    bapi_head-mrp_view = 'X'.
    bapi_head-forecast_view = 'X'.
    bapi_head-work_sched_view = 'X'.
    bapi_head-prt_view = 'X'.
    bapi_head-storage_view = 'X'.
    bapi_head-warehouse_view = 'X'.
    bapi_head-quality_view = 'X'.
    bapi_head-account_view = 'X'.
    bapi_head-cost_view = 'X'.
    and also please help with an example how do i upload data from IT (my internal table) using BAPI.
    Regards,
    Ranjith N

    Hi ,
    First you upload your Excel data into Internal Table.
    Move all data to Respected BAPI Structures.
    and then call 'BAPI_MATERIAL_SAVEDATA' and pass all structures.
    Sample Code:
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          filename                = p_fname
          i_begin_col             = v_c1
          i_begin_row             = l_v_r
          i_end_col               = v_cl
          i_end_row               = v_rl
        TABLES
          intern                  = i_excel
        EXCEPTIONS
          inconsistent_parameters = 1
          upload_ole              = 2
          OTHERS                  = 3.
      IF sy-subrc eq 0.
        LOOP AT i_excel.
          CASE i_excel-col.
            WHEN 0001.
              wa_final-field1 = i_excel-value.
            WHEN 0002.
              wa_final-field2 = i_excel-value.
            WHEN 0003.
              wa_final-field3 = i_excel-value.
            WHEN 0004.
              wa_final-field4 = i_excel-value.
            WHEN 0005.
              wa_final-field5 = i_excel-value.
            WHEN 0006.
              wa_final-field6 = i_excel-value.
            WHEN 0007.
              wa_final-field7 = i_excel-value.
            WHEN 0008.
              wa_final-field8 = i_excel-value.
            WHEN 0009.
              wa_final-field9 = i_excel-value.
            WHEN 0010.
              wa_final-field10 = i_excel-value.
            WHEN 0011.
              wa_final-field11 = i_excel-value.
            WHEN 0012.
              wa_final-field12 = i_excel-value.
            WHEN 0013.
              wa_final-field13 = i_excel-value.
            WHEN 0014.
              wa_final-field14 = i_excel-value.
            WHEN 0015.
              wa_final-field15 = i_excel-value.
            WHEN 0016.
              wa_final-field16 = i_excel-value.
          ENDCASE.
    *-at end of each row, a record needs to append the internal table
          AT END OF row.
            APPEND wa_final TO i_final.
            CLEAR: wa_final.
          ENDAT.
        ENDLOOP.
      ENDIF.
    Move all your Inatrnal tbale data to respected BAPI structures
    *&      Form  MOVE_HEADDATA
       * Move Header data to BAPI Header.
    FORM move_headdata .
    Move Header Data to BAPI Fields
      MOVE : wa_final-matnr      TO wa_mathead-material,
             wa_final-mbrsh      TO wa_mathead-ind_sector,
             wa_final-mtart      TO wa_mathead-matl_type.
    To get UOM
      SELECT SINGLE * FROM t006 INTO t006 WHERE msehi = wa_final-meins.
      MOVE: t006-isocode TO wa_mara-base_uom_iso,
            c_x          TO wa_marax-base_uom_iso.
    **-- Move Material Descriptions
      PERFORM move_materialdescription .
    ENDFORM.                    " MOVE_HEADDATA
    *&      Form  MOVE_CLIENTDATA
          * Move Basic data to Clientdata
    FORM   move_clientdata .
      MOVE : wa_final-spart      TO wa_mara-division,
             wa_final-bismt      TO wa_mara-old_mat_no,
             wa_final-extwg      TO wa_mara-extmatlgrp,
             wa_final-mtpos_mara TO wa_mara-item_cat,
             wa_final-groes      TO wa_mara-size_dim,
             wa_final-zeivr      TO wa_mara-doc_vers,
             wa_final-ekwsl      TO wa_mara-pur_valkey.
      MOVE : c_x      TO wa_marax-division,
             c_x      TO wa_marax-old_mat_no,
             c_x      TO wa_marax-extmatlgrp,
             c_x      TO wa_marax-item_cat,
             c_x      TO wa_marax-size_dim,
             c_x      TO wa_marax-doc_vers,
             c_x      TO wa_marax-pur_valkey.
    ENDFORM.                    " MOVE_CLIENTDATA
    *&      Form  MOVE_STORAGELOCATIONDATA
          * Move storage location data to STORAGELOCATIONDATA
    FORM move_storagelocationdata .
      CLEAR: wa_mard,wa_mardx.
      MOVE : wa_final-werks      TO wa_mard-plant,
             wa_final-lgort      TO wa_mard-stge_loc.
      MOVE : wa_final-werks      TO wa_mardx-plant,
             wa_final-lgort      TO wa_mardx-stge_loc.
    ENDFORM.                    " MOVE_STORAGELOCATIONDATA
    *&      Form  MOVE_SALESDATA
         * Move Salesdate to SALESDATA
    FORM move_salesdata .
      MOVE : wa_final-vkorg      TO wa_mvke-sales_org,
             wa_final-vtweg      TO wa_mvke-distr_chan,
             wa_final-dwerk      TO wa_mvke-delyg_plnt,
             wa_final-versg      TO wa_mvke-matl_stats,
             wa_final-ktgrm      TO wa_mvke-acct_assgt,
             wa_final-mtpos      TO wa_mvke-item_cat,
             wa_final-mvgr1      TO wa_mvke-matl_grp_1,
             wa_final-mvgr2      TO wa_mvke-matl_grp_2,
             wa_final-mvgr3      TO wa_mvke-matl_grp_3,
             wa_final-mvgr4      TO wa_mvke-matl_grp_4,
             wa_final-mvgr5      TO wa_mvke-matl_grp_5,
             wa_final-vrkme      TO wa_mvke-sales_unit.
      MOVE : wa_final-vkorg      TO wa_mvkex-sales_org,
             wa_final-vtweg      TO wa_mvkex-distr_chan,
             c_x                 TO wa_mvkex-delyg_plnt,
             c_x                 TO wa_mvkex-matl_stats,
             c_x                 TO wa_mvkex-acct_assgt,
             c_x                 TO wa_mvkex-item_cat,
             c_x                 TO wa_mvkex-matl_grp_1,
             c_x                 TO wa_mvkex-matl_grp_2,
             c_x                 TO wa_mvkex-matl_grp_3,
             c_x                 TO wa_mvkex-matl_grp_4,
             c_x                 TO wa_mvkex-matl_grp_5,
             c_x                 TO wa_mvkex-sales_unit.
    ENDFORM.                    " MOVE_SALESDATA
    *&      Form  MOVE_MATERIALDESCRIPTION
          * Move MATERIALDESCRIPTION to Material Description
    FORM move_materialdescription .
      CLEAR: wa_makt,i_makt.
      MOVE : wa_final-maktx TO wa_makt-matl_desc,
             sy-langu       TO wa_makt-langu.
      APPEND wa_makt TO i_makt.
      CLEAR wa_makt.
    ENDFORM.                    " MOVE_MATERIALDESCRIPTION
    *&      Form  basic_data
    FORM basic_data .
    **-- Move Material Data at Storage Location Level
      PERFORM move_storagelocationdata .
      MOVE : wa_final-vkorg      TO wa_mvke-sales_org,
             wa_final-vtweg      TO wa_mvke-distr_chan.
      MOVE : wa_final-vkorg      TO wa_mvkex-sales_org,
             wa_final-vtweg      TO wa_mvkex-distr_chan.
    **-- Move Material Data at Client Level
      PERFORM move_clientdata .
    IF ALT_UOM is not Given in flat file Move BASEUOM as ALT_UOM
      IF wa_final-meinh EQ c_space.
        MOVE : wa_final-meins     TO wa_marm-alt_unit,
               wa_final-meins     TO wa_marmx-alt_unit.
      ELSE.
        MOVE : wa_final-meinh      TO wa_marm-alt_unit,
                wa_final-umren      TO wa_marm-numerator.
        MOVE : wa_final-meinh     TO wa_marmx-alt_unit,
               c_x                TO wa_marmx-numerator.
      ENDIF.
      MOVE : wa_final-numtp      TO wa_marm-ean_cat,
             wa_final-brgew      TO wa_marm-gross_wt,
             wa_final-volum      TO wa_marm-volume,
             wa_final-voleh      TO wa_marm-volumeunit,
             wa_final-gewei      TO wa_marm-unit_of_wt.
      APPEND wa_marm TO i_marm.
      CLEAR wa_marm.
      MOVE : c_x                TO wa_marmx-ean_cat,
             c_x                TO wa_marmx-gross_wt,
             c_x                TO wa_marmx-volume,
             c_x                TO wa_marmx-volumeunit,
             c_x                TO wa_marmx-unit_of_wt.
      APPEND wa_marmx TO i_marmx.
      CLEAR wa_marmx.
    ENDFORM.                    " basic_data
    *&      Form  sales_data1
    FORM sales_data1 .
    Move Sales & Plant Data
      MOVE : wa_final-werks      TO wa_marc-plant,
             wa_final-mtvfp      TO wa_marc-availcheck,
             wa_final-ladgr      TO wa_marc-loadinggrp,
             wa_final-prctr      TO wa_marc-profit_ctr.
      MOVE : wa_final-werks      TO wa_marcx-plant,
             c_x                 TO wa_marcx-availcheck,
             c_x                 TO wa_marcx-loadinggrp,
             c_x                 TO wa_marcx-profit_ctr.
      MOVE: wa_final-tragr      TO wa_mara-trans_grp,
            c_x                 TO wa_marax-trans_grp.
    **-- Move Sales Data
      PERFORM move_salesdata .
    Move Tax Data
      MOVE : 'JP'              TO wa_mlan-depcountry_iso,
            'MWAR'             TO wa_mlan-tax_type_1,
             wa_final-taklv    TO wa_mlan-taxclass_1.
      APPEND wa_mlan TO i_mlan.
      CLEAR wa_mlan.
    ENDFORM.                    " sales_data1
    *&      Form  purchase_data
    FORM purchase_data .
    Move Plant Data
      MOVE : wa_final-werks      TO wa_marc-plant,
             wa_final-werks      TO wa_marcx-plant.
    Move PO data
      MOVE : wa_final-ekgrp  TO wa_marc-pur_group,
             wa_final-kautb  TO wa_marc-auto_p_ord,
             wa_final-usequ  TO wa_marc-quotausage,
             wa_final-kordb  TO wa_marc-sourcelist,
             c_x             TO wa_marcx-pur_group,
             c_x             TO wa_marcx-auto_p_ord,
             c_x             TO wa_marcx-quotausage,
             c_x             TO wa_marcx-sourcelist.
      MOVE: wa_final-matkl  TO wa_mara-matl_group,
            wa_final-bstme  TO wa_mara-po_unit,
             c_x            TO wa_marax-matl_group,
             c_x            TO wa_marax-po_unit.
    ENDFORM.                    " purchase_data
    *&      Form  mrp_data
    FORM mrp_data .
    **-- Move Material Data at Storage Location Level
      PERFORM move_storagelocationdata .
    Move All MRP data
      MOVE: wa_final-diskz TO wa_mard-mrp_ind,
            c_x            TO wa_mardx-mrp_ind.
      MOVE : wa_final-werks TO wa_marc-plant,
             wa_final-dismm TO wa_marc-mrp_type,
             wa_final-dispo TO wa_marc-mrp_ctrler,
             wa_final-beskz TO wa_marc-proc_type,
             wa_final-sobsl TO wa_marc-spproctype,
             wa_final-mtvfp TO wa_marc-availcheck,
             wa_final-minbe  TO wa_marc-reorder_pt,
             wa_final-fxhor  TO wa_marc-pl_ti_fnce,
             wa_final-disls  TO wa_marc-lotsizekey,
             wa_final-bstmi  TO wa_marc-minlotsize,
             wa_final-bstma  TO wa_marc-maxlotsize,
             wa_final-bstfe  TO wa_marc-fixed_lot,
             wa_final-mabst  TO wa_marc-max_stock,
             wa_final-ausss  TO wa_marc-assy_scrap,
             wa_final-dzeit  TO wa_marc-inhseprodt,
             wa_final-plifz  TO wa_marc-plnd_delry,
             wa_final-webaz  TO wa_marc-gr_pr_time,
             wa_final-fhori  TO wa_marc-sm_key,
             wa_final-eisbe  TO wa_marc-safety_stk,
             wa_final-strgr  TO wa_marc-plan_strgp,
             wa_final-wzeit  TO wa_marc-replentime,
             wa_final-lgfsb  TO wa_marc-sloc_exprc,
             wa_final-sbdkz  TO wa_marc-dep_req_id,
             wa_final-kzbed  TO wa_marc-grp_reqmts,
             wa_final-miskz  TO wa_marc-mixed_mrp,
             wa_final-stlal  TO wa_marc-alternative_bom,
             wa_final-stlan  TO wa_marc-bom_usage.
      MOVE : wa_final-werks TO wa_marcx-plant,
             c_x            TO wa_marcx-mrp_type,
             c_x            TO wa_marcx-mrp_ctrler,
             c_x            TO wa_marcx-proc_type,
             c_x            TO wa_marcx-spproctype,
             c_x            TO wa_marcx-availcheck,
             c_x            TO wa_marcx-reorder_pt,
             c_x            TO wa_marcx-pl_ti_fnce,
             c_x            TO wa_marcx-lotsizekey,
             c_x            TO wa_marcx-minlotsize,
             c_x            TO wa_marcx-maxlotsize,
             c_x            TO wa_marcx-fixed_lot,
             c_x            TO wa_marcx-max_stock,
             c_x            TO wa_marcx-assy_scrap,
             c_x            TO wa_marcx-inhseprodt,
             c_x            TO wa_marcx-plnd_delry,
             c_x            TO wa_marcx-gr_pr_time,
             c_x            TO wa_marcx-sm_key,
             c_x            TO wa_marcx-safety_stk,
             c_x            TO wa_marcx-plan_strgp,
             c_x            TO wa_marcx-replentime,
             c_x            TO wa_marcx-sloc_exprc,
             c_x            TO wa_marcx-dep_req_id,
             c_x            TO wa_marcx-grp_reqmts,
             c_x            TO wa_marcx-mixed_mrp,
             c_x            TO wa_marcx-alternative_bom,
             c_x            TO wa_marcx-bom_usage.
    ENDFORM.                    " mrp_data
    *&      Form  accounting_data
    FORM accounting_data .
    Move Plant Data
      MOVE: wa_final-werks TO wa_marc-plant,
            wa_final-werks TO wa_marcx-plant.
    Move Account Data
      MOVE :  wa_final-werks TO wa_mbew-val_area,
              wa_final-bklas TO wa_mbew-val_class,
              wa_final-vprsv TO wa_mbew-price_ctrl,
              wa_final-verpr TO wa_mbew-moving_pr,
              wa_final-peinh TO wa_mbew-price_unit,
              wa_final-stprs TO wa_mbew-std_price.
      MOVE :  wa_final-werks TO wa_mbewx-val_area,
              c_x TO wa_mbewx-val_class,
              c_x TO wa_mbewx-price_ctrl,
              c_x TO wa_mbewx-moving_pr,
              c_x TO wa_mbewx-price_unit,
              c_x TO wa_mbewx-std_price.
    ENDFORM.                    " accounting_data
    *&      Form  cost_data
    FORM cost_data .
    Move Plant Data
      MOVE: wa_final-werks TO wa_marc-plant,
            wa_final-awsls TO wa_marc-variance_key,
            wa_final-verid  TO wa_marc-prodverscs,   " Production Version
            wa_final-werks TO wa_marcx-plant,
            c_x            TO wa_marcx-variance_key,
            c_x            TO wa_marcx-prodverscs.
    Move Cost Data
      MOVE :  wa_final-werks TO wa_mbew-val_area,
              wa_final-bklas TO wa_mbew-val_class,
              wa_final-vprsv TO wa_mbew-price_ctrl,
              wa_final-ekalr TO wa_mbew-qty_struct.
      MOVE :  wa_final-werks TO wa_mbewx-val_area,
              c_x            TO wa_mbewx-val_class,
              c_x            TO wa_mbewx-price_ctrl,
              c_x            TO wa_mbewx-qty_struct.
    ENDFORM.                    " cost_data
    Call All Structures in to BAPI
      CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
        EXPORTING
          headdata             = wa_mathead
          clientdata           = wa_mara
          clientdatax          = wa_marax
          plantdata            = wa_marc
          plantdatax           = wa_marcx
          storagelocationdata  = wa_mard
          storagelocationdatax = wa_mardx
          valuationdata        = wa_mbew
          valuationdatax       = wa_mbewx
          salesdata            = wa_mvke
          salesdatax           = wa_mvkex
        IMPORTING
          return               = i_return
        TABLES
          materialdescription  = i_makt
          unitsofmeasure       = i_marm
          unitsofmeasurex      = i_marmx
          taxclassifications   = i_mlan.
      IF i_return-type = 'A' OR i_return-type = 'E' .
        DATA : l_v_string TYPE string,
               l_v_msg1   TYPE string,
               l_v_msg2   TYPE string.
        MOVE i_return-message TO l_v_string.
        CONDENSE l_v_string.
        PERFORM fill_error_table USING 'E'
                                       'ZMSG_MM'
                                       '098'
                                       v_reccon
                                       l_v_string
        v_error = v_error + 1.
        CLEAR: l_v_string.
      ELSEIF i_return-type = 'S'.
        PERFORM fill_error_table USING 'S'
                                             i_return-id
                                             i_return-number
                                            i_return-message_v1
                                           i_return-message_v2
                                           i_return-message_v3
                                           i_return-message_v4.
        v_success = v_success + 1.
      ENDIF .
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = 'X'.
      IF sy-subrc = 0.
        COMMIT WORK AND WAIT.      "for the update to table Transcation
      ENDIF.
    Regards,
    Siva.

  • Partner Function Upload using BAPI function BAPIBUSISM007_CREATEFROMDATA

    Hi Guys,
    I can able to create Business Partner in SAP using BAPI function module BAPIBUSISM007_CREATEFROMDATA but i don't able to upload partner function (i.e. It will come under Sales Area)  using this BAPI. I don't want to go for BDC method.Is there any function modules. Is there any function modules or BAPI to upload partner function. Please suggest me.
    Thanks in Advance.
    Regards,
    Anil.

    Dear Anil,
    Few days back even i faced similar problem to upload partner function through BAPI.
    Later i created LSMW for XD02 and uploaded partner functions for those BPs.
    You can try the same.
    Regards,
    Rajesh

  • Material Master Upload using Bapi getting error "****** not a valid unit of

    Hi Gurus,
    i am uploading material master using BAPI Material_master_save_data , where the volume and Unit of Volume is Blank, Still i am getting error as "****** not a valid unit of volume ".kindly help me to resolve the issue.Many Thanks In advance.

    Jurgen,
    I could able to solve the issue for invalid unit Error ....Now i am getting **** unit of measure is not defined , pls check your entry or else i am getting alternate unit of mesure is same as base unit of measure .
    I have used below logic for Purchase Order Unit and Base Unit of measure .
          if wa_upload-unmsr EQ wa_upload-ord_uom .
            bapi_mara1-base_uom = wa_upload-unmsr.
            bapi_mara1-po_unit = wa_upload-ord_uom .
          elseif wa_upload-unmsr NE wa_upload-ord_uom.
            wa_upload-ord_uom = wa_upload-alt_uom.
            bapi_mara1-po_unit = wa_upload-ord_uom.
          endif.
    Many Thanks for your help.

  • Find the KOSTL(cost center) value using coing group and coding code

    Hi,
        Can we get the value cost center Kostl by using coding code and coding group. As per the requirement the coding group is specified in the table qmel-qmgrp and the coding code is qmel-qmcod.. So by using this values only can we get the KOSTL value..Please do help me in this regard.

    so the thing is for the particular coding group QMGRP we have the coding codes QMCOD assigned to it and for the transaction QM01 we cannot have the notification number (as this number is generated only after the transaction is completed)only the notification type is specified in first screen after we press enter a subscreen with Production order number is specified press enter,
    later in the first tab strip specify any material number and also plant number later the defect location and defect type, later in the subject tab strip in the coding group we get the F4 help for the coding code and group,there by picking any of the elements we also get the KOSTL value in text so i was just worried where can we get this value i have checked for the options that u have specified but this doesn't work for me...
    Thanx and reply me back(very Urgent)

  • ISU Business Partner Master data Upload using BAPI?

    Hi Experts,
    I used BAPI "BAPI_ISUPARTNER_CREATEFROMDATA" to upload ISU Business Partner master data.
    This BPAI is not uploading the following topics:
    1. Communication Address like Telephone,extension, email and etc., are not uploading.
    2. Middle name, nick name etc, the field which are under the Expand symbol not uploading.
    3. Reference customer also not uploading.
    strctures what I used are:
    for communication : TELEFONDATANONADDRESS, E_MAILDATANONADDRESS
    general data : BAPIISUBPD
    Reference customer: BAPIBPPARA-MUSTER_KUN
    I am passing all the data but not uploading some of the field values (above) using that BAPI.
    Could you please let me know the solution?
    Please help me out!
    Thanks in advance.
    sekhar

    Sekhar:
    Try with below details:
    for communication : BAPIISUBPA & BAPIISUBPAX.
    general data : BAPIISUBPD & BAPIISUBPDX
    Reference customer: BAPIISUBPA-BP_EXT & BAPIISUBPDX-BP_EXT
    Thanks,
    Murali.

  • Customer -master upload using bapi

    hai ..
      can any body send me some example for customer master  creation using bapi ..
      in this account -group is mandatary..
    but i did.nt find  acc-group in bapi structures ..
    plz do helpful ..
    Tanx in advance ..

    Hi,
    Check the below links.
    [http://abaplovers.blogspot.com/2008/03/customer-master-bapis-function-modules.html|http://abaplovers.blogspot.com/2008/03/customer-master-bapis-function-modules.html]
    [http://abap.wikiprog.com/wiki/BAPI_CUSTOMER_CREATEFROMDATA1|http://abap.wikiprog.com/wiki/BAPI_CUSTOMER_CREATEFROMDATA1]
    Reward if found helpful.
    Regards,
    Boobalan Suburaj

  • Sales order upload using bapi

    Hi,
    Thanks in advance
    I need step by step procedure to create sales orders using BAPI from a text file

    create report prorgam in se38
    create selection screen with below fileds
    header file name
    itme file name
    radio button 1 : Local PC
    radio button 2 : application server
    if local PC = X
      CALL FUNCTION 'GUI_UPLOAD'
          EXPORTING
            filename                = gv_file
            filetype                = gc_filetype
          TABLES
            data_tab                = gt_text_file
          EXCEPTIONS
    LOOP AT gt_text_file INTO wa_text_file.
        SPLIT wa_text_file-line AT gc_comma  INTO  list of your fileds
      append internal table
    endloop.
    else.
       OPEN DATASET gv_file FOR INPUT IN TEXT MODE ENCODING DEFAULT
                                WITH SMART LINEFEED.
    LOOP AT gt_text_file INTO wa_text_file.
        SPLIT wa_text_file-line AT gc_comma  INTO  list of your fileds
      append internal table
    endloop.
    after that your ready with internal tbale
    loop your internal table
    call the  sales order cretae BAPI
    endif.

  • Cost center upload LSMW, missing company code field

    I am planning on doing an LMSW with a custom recording to load cost centers.
    The input file has a field for company code.
    I do not see company code anywhere in the screens of KS01.
    Now what?
    Thanks,
    Jeff

    Hi Jeff,
    The company code is linked to the contolling area in table TKA02.
    So in your porgram query this table to get the corresponding controlling area for the company code.
    Kind regards,
    Robert

Maybe you are looking for