Pricing Updation Using LSMW

I would like to do Pricing updation using VK11 Tocde.for this can I use LSMW ..?
otherwise which one will be better for pricing updation data load?

Hi
You can use BDC or LSMW or BAPI deopending on your convenience
it is the programmer choice
Final aim is right data has to be uploaded to SAP for the transactions to happen.
So depending on your easiness you use any one of the above
see the sample bdc for the VK11.
report ZSDBDCP_PRICING no standard page heading
       line-size 255.
include zbdcrecx1.
*--Internal Table To hold condition records data from flat file.
Data: begin of it_pricing occurs 0,
       key(4),
       f1(4),
       f2(4),
       f3(2),
       f4(18),
       f5(16),
      end of it_pricing.
*--Internal Table To hold condition records header  .
data : begin of it_header occurs 0,
         key(4),
         f1(4),
         f2(4),
         f3(2),
       end of it_header.
*--Internal Table To hold condition records details .
data : begin of it_details occurs 0,
        key(4),
        f4(18),
        f5(16),
       end of it_details.
data : v_sno(2),
       v_rows type i,
       v_fname(40).
start-of-selection.
refresh : it_pricing,it_header,it_details.
clear  : it_pricing,it_header,it_details.
CALL FUNCTION 'UPLOAD'
      EXPORTING
           FILENAME                = 'C:\WINDOWS\Desktop\pricing.txt'
           FILETYPE                = 'DAT'
      TABLES
           DATA_TAB                = it_pricing
      EXCEPTIONS
           CONVERSION_ERROR        = 1
           INVALID_TABLE_WIDTH     = 2
           INVALID_TYPE            = 3
           NO_BATCH                = 4
           UNKNOWN_ERROR           = 5
           GUI_REFUSE_FILETRANSFER = 6
           OTHERS                  = 7.
  WRITE : / 'Condition Records ', P_FNAME, ' on ', SY-DATUM.
  OPEN DATASET P_FNAME FOR INPUT IN TEXT MODE.
  if sy-subrc ne 0.
    write : / 'File could not be uploaded.. Check file name.'.
    stop.
  endif.
  CLEAR : it_pricing[], it_pricing.
  DO.
    READ DATASET P_FNAME INTO V_STR.
    IF SY-SUBRC NE 0.
      EXIT.
    ENDIF.
write v_str.
translate v_str using '#/'.
    SPLIT V_STR AT ',' INTO it_pricing-key
                            it_pricing-F1 it_pricing-F2 it_pricing-F3
                            it_pricing-F4 it_pricing-F5 .
    APPEND it_pricing.
    CLEAR it_pricing.
  ENDDO.
  IF it_pricing[] IS INITIAL.
    WRITE : / 'No data found to upload'.
    STOP.
  ENDIF.
  loop at it_pricing.
    At new key.
      read table it_pricing index sy-tabix.
      move-corresponding it_pricing to it_header.
      append it_header.
      clear it_header.
    endat.
    move-corresponding it_pricing to it_details.
    append it_details.
    clear it_details.
  endloop.
  perform open_group.
  v_rows = sy-srows - 8.
  loop at it_header.
    perform bdc_dynpro      using 'SAPMV13A' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RV13A-KSCHL'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RV13A-KSCHL'
                                  it_header-f1.
    perform bdc_dynpro      using 'SAPMV13A' '1004'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'KONP-KBETR(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'KOMG-VKORG'
                                  it_header-f2.
    perform bdc_field       using 'KOMG-VTWEG'
                                   it_header-f3.
**Table Control
    v_sno = 0.
    loop at it_details where key eq it_header-key.
      v_sno = v_sno + 1.
      clear v_fname.
      CONCATENATE 'KOMG-MATNR(' V_SNO ')' INTO V_FNAME.
      perform bdc_field       using v_fname
                                    it_details-f4.
      clear v_fname.
      CONCATENATE 'KONP-KBETR(' V_SNO ')' INTO V_FNAME.
      perform bdc_field       using v_fname
                                    it_details-f5.
      if v_sno eq v_rows.
        v_sno = 0.
        perform bdc_dynpro      using 'SAPMV13A' '1004'.
        perform bdc_field       using 'BDC_OKCODE'
                                 '=P+'.
        perform bdc_dynpro      using 'SAPMV13A' '1004'.
        perform bdc_field       using 'BDC_OKCODE'
                                 '/00'.
      endif.
    endloop.
*--Save
    perform bdc_dynpro      using 'SAPMV13A' '1004'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SICH'.
    perform bdc_transaction using 'VK11'.
  endloop.
  perform close_group.
<b>Reward points for useful Answers</b>
Regards
Anji

Similar Messages

  • Problem in conditions pricing updation using BAPI_PO_CREATE1

    hi,
        I am creating PO using BAPI_PO_CREATE1 however when i am passing the data to the bapi for conditions at item level the price value is not changing and throwing error as ( NET PRICE FOR ITEM 00010 adopted from last document ) so for all the items its throwing the same information and when i am chekin the PO the value is not the changing. and while creating the PO manually also the net price is coming automatically and we need to backspace the value and re enter the new value. So wht should i do in order to input the data into the PO.
    Thanks in advance

    Thanks

  • USING LSMW TO UPDATE VENDOR BANK DETAILS

    Hi SAP gurus
    I have used LSMW for mass updates of vendor bank details by recording the Tcode FK02
    But the problem is .. after I load the data, its replacing the old bank details with the new one which Im updating with.
    I want to keep the old bank details and add the new bank details as another entry.
    How do I do that..
    How Do I retain the old one and also the add a new entry to the bank details section of the vendor master record.
    Is there any other way for mass updating the vendor master records
    I have tried using MASS or XK99...but i cant add a whole entry with that transaction. All I can do is updating one of fields (Like Reference Details) in the bank details.
    Thank you in advance for all your replies. Points will be awarded as a token of appreciation

    Hi
    when you record the transaction for bank details in LSMW in , try to create record in last line. Automatically it will go to top line.
    I hope it will solve your problem.
    regards
    Srinivas

  • How to migrate pricing condition data using lsmw

    Hello All,
                 can any one explain how to migrate pricing condition data using lsmw.
    the scenario is we are trying to extend the pricing conditions from one sales area to other sales area on a combination of sales organization, distribution channel and division.

    Hi Sreedhar Kodali
    Pricing conditions can be extended with the following options:-
    1)  Customer / material with release status
    2)  Sales Org / Dist. Channel / Cust group / Material
    3)  Price List category / Currency / material with release status
    4)  Material with release status
    Assuming that your pricing condition in one sales area is different to another, first you have to create LSMW recording to extend the sales area and then pricing conditions can be uploaded accordingly.
    Thanks
    G. Lakshmipathi

  • Updating FK01 using LSMW

    Hi Experts,
    I need to do an upload for  vendor master in transaction FK01.
    I cant use the batch recording method since i come across problems while trying to upload the "wtihhold tax information table". So when I use the direct input method , using program RFBIKR00, I see that it is probably for transaction xk01. Do correct and direct me further on that if I am wrong.
    My question is, that is there any way of updating FK01 using LSMW? I am unable to find an existing thread on this.
    Thanks in advance.
    Regards,
    Trishna

    Hi
    Probably RFBIKR00 supports XK01 because it's the global transaction, FKO1 loads accounting master data only, that means the same operations you need to do by FK01 can be done by XK01: there's the problem?
    Max

  • Update the material quantity in the sales order using LSMW...

    Hi Guru's,
    I created one sales order using BAPI..now i wanted update the material quantity in the sales order using LSMW...
    could you please provide the step by step process....
    if anyone of you provide the program logic similar to requirement that would be helpfull to me...
    thanks in advance
    Srinivas....

    Hi Sri,
    Hope it may help you.
    First do the recording for VA02 transaction, in that give the existing sales order number
    and update the Quantity and save it. Remaining steps are same what we used(LSMW) to upload data to applications.
    Regards,
    Vishvesh
    if helpful, rewards it.

  • Using lsmw to update FI text

    does anyone have any idea how should i update my FI text that is 'we' or 're' document type using LSMW for posting date 01.02.2009 to 10.05.2009?

    Hi,
    Use LSMW and the following object for Long texts
    Object               0001   Long texts
    Method               0001   (No selection)
    Program Name         /SAPDMC/SAP_LSMW_IMPORT_TEXTS
    Program Type         D   Direct Input:
    The above DI program would load the texts...
    Example: if the Documnet number is 5000057140, Doc Type: WE, Fiscal year 2009, with company code 1234
    Text Name is a contatenated string of Company code, document number & Fiscal year - example: 123450000571402009
    Language: EN (the language with which Long text is to be created...)
    Text ID: 0001(Correspondence),0002 (Note), 0003 (Payment advice information)
    Text Object: BELEG (Document text)
    Hope this helps.
    Best Regards, Murugesh

  • Using LSMW to update customer address data via RFBIDE00

    Hi, I wonder if anybody has dealed with same issue for using LSMW with program RFBIDE00 to update customer address data.
    We need to update the customer address data in the central address management data. Since those fields do not exist in basic structure of BKNA1, for example, C/O name, street 2 to Street 5, I am putting the mapping of the source fields to map to BIADDR2. However, all the data I mapped to BIADDR2 is not updating in the customer records. When looking into the code of RFBIDE00, the codes will only transfer the data from BIADDR2 if the customer account group is marked as consumer which our case is just a sold to, ship to, not consumer.
    Does anybody have faced this issue before? Where should the exact central address data be mapped to in RFBIDE00?
    We are using ECC6.0. Any advise is appreciated.

    Found the answer from SDN - not possible unless using some BUS.
    RFBIDE00 - Address data issue
    Thread closed.

  • Netprice Picked up from last document-Open PO load using LSMW BAPI method.

    Hi Experts,
    I m doing Open PO load using LSMW BAPI method...(BAPI_PO_CREAT1).
    Inside the LSMW BAPI picks up the NETPR value from the last document and doesnt consider the value from load file...
    Please advice me how to handle this issue...
    I tried giving values to field CALCTYPE at item level or POCOND table with with carry out new pricing options....but nothig works for me...
    PLease give your valuable inputs to achieve the requirement....
    Bharathi.J

    read OSS Note 580225 - Purchasing BAPIs: Conditions and pricing

  • Business partner migration using lsmw direct load .

    Hi,
    We need to do business partner migration using the direct load method.
    We are thinking of using direct input method of lsmw for the data transfer.
    Could someone suggest a proper object/ subobject for the same.
    Alternatively has anyone done the same using LSMWbapi or LSMWidocs.
    Inputs will be highly appreciated <<text removed>>
    Dirk.
    Edited by: Matt on Dec 19, 2008 1:33 PM -  Do not offer rewards.  Please read the rules of engagement.

    Hi ,
    Does this solution give any way to update the customer fields too ?
    We have few customer fields added to BUT tables ... How can we update these fields using LSMW and IDOC ?
    Could you please give your opinion on thesame.

  • How to change pricing formula using bapi_salesorder_change

    Hi,
    I have a customer  portal web application developed in .Net from which I will be getting different values which are changes related to a particular sales order item in SAP. One among these values is the pricing formula used with the sales order item. I am using bapi_salesorder_change to update all the values other than the pricing formula. My input to the bapi is the formula id. I am not sure about the field which I have to use in the bapi structures to update the same. Also I don't even know whether I can use the same bapi to do the required task.
    Requesting help ....
    Thanks,
    Siva

    Sir,
    Thank you for your immediate response.
    Actually we are integrating SAP with the customer portal web application. The requirement is in such a way that the customer portal provides the option to change the sale order details both at the header level as well as item level. The fields include Order qty,Delivery date,Partner details,Payment terms,Terms of sale, Pricing formula etc. The front end consists of a Pricing formula drop down which consists of  the formula descriptions (for eg: ZFA1015-LAST LME W/DAY OF CONT. MOTH) with its corresponding ID(ID is nothing but ZFA1015). At the SAP side my RFC should pick it up and update it for the given item. The process is like if we go to VA02 we have an option called MAINTAIN FORMULA from where we can change the formula used with an item. There the formula id is obtained from the formula repository. In here the we already have the Formula ID given by the front end.
    Hope you are clear wtith the requirement..
    Requesting help..
    Thanks,
    Siva

  • PO upload using LSMW

    I am working on PO Upload. Initially I thought of going for LSMW but I come across various hurdles like different number of line items, updating different header texts and updating item header texts.
    Please advice is it possible to do that in LSMW using recording or am I supposed to use LSMW using FM.
    If you have an alternative please furnish with details.
    -Mohan
    Useful answer deserves POINT!!!!!

    >
    Mohankumar Rajendran wrote:
    > Useful answer deserves POINT!!!!!
    Don't violate forum rules with such statements
    SEARCH in SCN for this bapi BAPI_PO_CREATE1, you will get lot of posts.

  • IBAN upload using LSMW

    Hi All,
    We have a requirement to upload IBAN details of vendors using FK02 using LSMW. Also the vendors which does not have bank details we need to add them.
    Can you let me know how to achieve this?
    -- Syed Abid Hussain

    Dude,
    Remember if IBAN is entered with out bank account number then where ever bank account is blank with the same bank key system will update same IBAN every where...
    Do the following steps;
    First; Maintain Bank accout number for all those vendor where it is missing once it is done then do the step two..
    Two; Update IBAN using t.code FIBAN (Table TIBAN) instead of loading thru FK02 as IBAN has no reletion with vendor number instead with Bank account number (Although you can update IBAN from FK02 its up to you) but FIBAN is easy and it is a matter of copy / paste only with the right bank account number and bank keys etc etc.....
    I would strongly recommend you to make the Bank account field mandatory in vendor master data to avoid any Discrepancy in future as stated above......
    Cheers,
    Guest

  • Infotype mass upload using LSMW

    Hi Experts,
    I want to update HR  info types using LSMW in mass.
    Infotypes needs to be selected dynamically depending upon action type and action reason.
    Can any one pls guide me which method to use in LSMW.
    With regards,
    Chandrasekhar.C

    Although you wish LSMW works thats way..it doesnt. As you know LSMW is nothing but a mere a recording, you will have to have 1 recording each for each action type.
    you practically have to perform that each action once, record it and then use it to upload data for that action type.
    so record separately every action for which you want. and coming to infotypes, dynamically picking is nothing but configuring you Infogroup (V_T588D) for that specific action. This anyway you have to configure to run actions from pa40.
    so when you are performing LSMW recording of PA40 , and select you action, the infogroup will run you through all the infotypes configured in that infogroup of that action.
    i hope it answers ur query..else revert back.

  • Problem for uplaoding sales text using LSMW

    Hi,
    I have use LSMW for uplaoding material masters sales and purchase order text ,  first I have done for purchase order text  with object : MATERIAL  and ID : BEST  it works fine for this  after that when I am trying same for uploading sales text    OBJECT : MVKE  and ID : 0001  it is picking file proerly  and till final BDC step it is not giving any error  but  in material master  sales text is not getting updated for that material.
      what canb be the problemm
    also for pO text for matnr i have given only material code  18 Chr.
    and for sales text  i hva egiven MATNR + SALES ORG. + DISTRIBUTION CHANNEL  as it required for sales text.
    regards,
      zafar

    Dear Zafar,
    I found a similar problem while uploading Porduction order long text. May be this information is useful for you.
    The common task of changing the long text of a production orderu2019s operation can bring some surprises.
    The first problem that is usually encountered is that after updating the long text with the function SAVE_TEXT, the new text is not visible in standard SAP transactions like CO03. The new text can be read with the function READ_TEXT though. The trick is that SAP uses the u201Clong text existsu201D indicator, the field TXTSP in the table AFVC. To make the text u201Cvisibleu201D to standard transactions, we have to set the TXTSP value to the current language (or the textu2019s language). Unfortunately, this has to be done with the direct UPDATE on the AFVC u2013 there are no known workarounds.
    Another problem can be seen when the same order is processed by users that use different languages. While SAP allows to store the long text for the same operation in several languages, actually, only one text object will be active at the same time in regard to standard transactions u2013 the object in the last saved language. That means, when SAP writes the text back, the TXTSP will be overwritten with the current language (say, language A). If the next user is working in another language (language B), SAP will present the text in the u201Cfirstu201D language (A) in the CO03 (even if the text in language B exists!). But after saving, the text will be written in the new language and TXTSP will be set accordingly.
    So, when working with long texts directly, you have to read with READ_TEXT using the language stored in TXTSP, NOT with the current language. When saving, you save in the current language and set the TXTSP to the current language. This way you are consistent with what SAP does and this will prevent you from surprises in a multilingual environment.
    Regards,
    Kamal

Maybe you are looking for