Import wrong prices in Sales.Order

I try to import Sales Orders from a table.
The code is
            rs.DoQuery("SELECT .........  FROM ZAM_imp_orders2
            'Lines
            rs.MoveFirst()
            Dim strProdSku As String
            While rs.EoF = False
                oSalesOrders.Lines.ItemCode = rs.Fields.Item(5).Value
                oSalesOrders.Lines.Quantity =     CDbl(rs.Fields.Item(17).Value)
                Dim Pri As Double = Math.Round(CDbl(rs.Fields.Item(16).Value), 4)
                oSalesOrders.Lines.UnitPrice = Pri  'product_price_total
                oSalesOrders.Lines.Add()
                rs.MoveNext()
The problem is that in MSSQL the price (in  ZAM_imp_orders2 ) is eg 100.00000 and in SAP B1 imports 10,000,000.00
I assume that it has to do with Decimal Settings (they are Seperator '.'  & Thousands ",") which is seems correct o me.
Any Idea?
Best Regards,
Vangelis

Hi,
What is you try this:
DIm strQuantity as string
While rs.EoF = False
oSalesOrders.Lines.ItemCode = rs.Fields.Item(5).Value
strQuantity = rs.Fields.Item(17)
strQuantity =  strQuantity .Replace(",", ".")
oSalesOrders.Lines.Quantity = CDbl(strQuantity)
Dim Pri As Double = Math.Round(CDbl(rs.Fields.Item(16).Value), 4)
oSalesOrders.Lines.UnitPrice = Pri 'product_price_total
oSalesOrders.Lines.Add()
rs.MoveNext()
Kind regards,
Winfried Tiemessen

Similar Messages

  • Need to pull INITIAL(vbap)net price of  Sales Order, after changing viaVA02

    Hi Experts,
    Mine is differetnt requirement..........
    I created a my_Sales_order_12345678 with 2 items, as follows,(all following values/entries r for my_Sales_order_12345678)
    line item_10---->net_value_netpr = $100
    line item_20---->net_value_netpr = $200
    Then the VBAP entries as r as follows,
    POSNR -
    >NETPR
    10----
    > $100
    20----
    > $200
    I changed first time as via VA02 tx, as
    line item_10---->net_value_netpr = $300
    line item_20---->net_value_netpr = $400
    Then the VBAP entries as r as follows,
    POSNR -
    >NETPR
    10----
    > $300
    20----
    > $400
    I changed second time as via VA02 tx, as
    line item_10---->net_value_netpr = $500
    line item_20---->net_value_netpr = $600
    Then the VBAP entries as r as follows,
    POSNR -
    >NETPR
    10----
    > $500
    20----
    > $600
    My requirement: for some reason, I need the initial values, I mean
    the VBAP entries of,
    POSNR -
    >NETPR
    10----
    > $100
    20----
    > $200
    I tried with CDHDR & CDPOS tbls, but no use? So, from Where Can I get/pull them??
    thanq
    Edited by: Srinivas on Jan 24, 2008 12:22 AM

    hi sirnivas..
    Thanq you for the points..these are the first i ever recieved..
    if you are working on peice of code which can get the price history do me a favour if you have finished the code just explain it to me who did u  do that...
    i have been working on an object from last two weeks to get the latest price...
    the thing is even though the price for condition items has been changed it wont get updated in the Sales orders unless new pricing fot the document is done...
    so i have to get all the sales orders who condition items price has been changed and display them in an ALV...so if you can get the exact old values...for the conditions i guess the opposite also can be done.....
    Here i have suggestion for you...in condition items there is a process called SCHEMA ( pricing Schema) which you can see using Condition Analysis button at the bottom of the condition item window...
    you can see all the price changes to the condition when you parse the tree structure of the procedure..EXAMPLE :- R0000 etc...
    so some Sales orders if the Schema has been changed all the existing condition are replaced by New ones from the changed Schema...so i guess that would play an important role in deciding the Price of Sales order...
    I know this is bit long but .....if you did finsish your program do let me know how you did it...
    Thankyou very much and good luck.

  • Material cost / Price on sales order ?

    Do we get the material Cost / Price (Vendor Material price ) on sales Order ?
    I means can we see the material Cost and Material Sales price in Sales order ?
    Hope my question clear .

    Hi -
          Please follow above answer and ignore my reply. 
    Thanks!
    Anesh B
    Edited by: Anesh B on Oct 7, 2009 4:28 PM

  • BASIC PRICE OF SALE ORDER

    Hi All,
    I have a requirement , i have a report which shows all pending sale order,
    i want to display basic price of sale ordrer ,from which table would i get the basic price against sale order.
    Thanks & Regards
    Lalith

    Hi,
    Pick up knumv fron VBAK. Then access KONV with KNUMV = vbak-kunmv and kschl = 'PR00' ( This could be different, since this is SAP standard ).
    I hope this helps,
    Regards
    Raju Chitale

  • How to update the condition price in sales order while creating the invoice

    Hi,
    How to update the condition price in the sales order to carry out the new price while creating the invoice?
    While creating the invoice it should update the condition price in sales order.
    Thanks,
    Balaram

    No, pricing is not there in delivery.
    I found an exit for VF01transaction where we can update the price in order.
    Can you please tell me how to update the price if I have the order, material numbers and conditions number?
    Thanks,
    Balaram

  • Change price in Sales Order created with reference with Quote

    Hi Experts,
    Need to change price (eg..1000USD to 1100USD) in sales order (va02). Here Sales Order is created (va01)with reference with Quote(va21) where price in maintained (as 1000USD). so price in Sales Order is copied from Quote. Now, If I want to do the change in Sales Order (from 1000USD to 1100USD) kindly suggest me what are all the possible ways. Can I do the changes within the existing documents rather than creating new docs. due to the change.
    Note: User is creating new Quote with 1100USD and creating subsequent new Sales Order with new Quote.
    Thanks
    Viswanathan

    Hi,
    In va02 you double-click on the material that has been entered, then in the new screen goto the condition tab, here u will find the $1000 that you have entered, and then change it to $1100.
    Swapnil

  • Importance of EK01 in Sales order costing

    Hi all,
    What is the importance of EK01 in sales order costing and what is the diff between Ek01 and EK02.
    Thanks

    Check this link http://help.sap.com/saphelp_pserv472/helpdata/EN/90/ba6e67446711d189420000e829fbbd/frameset.htm
    Regards / KOTA

  • Capture the purchase price during sales order creation

    Hi,
    User wanted to capture the item purchase price when a sales order is raised.
    Currently, the sales order capture the VPRS whcih is coming from the material valuation (MAP) price.
    Is there a standard condition type that will captured the purchase price in the PIR record or the PP condition?
    Thanks

    Hi
    As far as i know it is not possible to fetch the purchase price in sales order.
    May be you can define an another condition type asa statistical and maintain the condition records for that. But it will be a tedious job for maintaining all the things.
    regards
    Prashanth

  • Update price on sales order

    Hi All,
    we have this requirement as below:
    Update price master data every half year, once the price is updated, all price on the sales order should be refreshed. Does SAP have standard function to update price on sales order?  We don't want to refresh sales order one by one, after the price master is updated.
    Thank you!

    Hi,
    You can try with t-code MASS but you'll not have an option of Pricing Update over there, but I can suggest you one wayout in this situation as below:
    - Go to MASS
    - Select object type BUS2032
    - Select Sales Order Header data
    - Click on fields
    - You will see Pricing Date field
    - Select and execute
    Logic behind this option is as below
    - your old sales orders would have old pricing date on which old pricing records were existing.
    - once you prices are updated half yearly and if you change the pricing date system will again look for the condition records and then it will update the prices as per new pricing date
    I have not done this actually, but this may work because logic seems to be right.
    Hrishi

  • Hide Unit price from sales order for sales user without change authorization of document setting

    Hi all expert
    Hide Unit price from sales user without change authorization of document setting.
    I have also refer this note
    SAP B1 2005 Purchas Order,Good Reciept PO'S, and Unit Price Block
    but sill I had not getting my proper solution.
    I want to restrict sales person to see & access unit price. Here I know option of block authorization of document setting but its not good option because , In future ,if sales user wants to changes forms setting in future so Its become problematic for user. so I want do this without restrict user for form setting & only hide unit price table from him/her. also He/her able to access form setting with out unit price.
    Please reply
    Amol Nikam

    Hi Experts,
    Please Tell me Is there any option "Hide Unit price from sales order for sales user without change authorization of document setting"
    Regards/Thanks
    Amol

  • How to mark up the price for sales order entry?

    Hi Gurus,
    How to Mark up the price for sales order entry?
    Example: Item Price: $10, Adding 20% Margin
    Selliing price of the item is $12
    we are giving many typs discounts like festival Discount, customerwise, Order value wise etc..
    After giving above discounts, if discount falls below $10 system should not allow to book the order, Trigger should go to respective person or sales person saying that item price falling below cost, system should not allow to book the sales order.
    How to configure this scenarios in Order management Module, appreciate your inputs, advise.
    Regards
    AK

    Thanks for your response,
    can you please guide me step to achieve this requirement.
    Regards
    AK

  • WebUI : Entry Price in Sales Order - not user friendly

    Dear all,
    Have any of you use Sales Order entry on SAP CRM2007 WebUI ?
    I would like to hear comment from you regarding on how you enter the item price in Sales Order module.
    This is what I found, to enter single price for a product you need to go through at least 3 steps after you
    open Sales Order Document.
    1. Select/Enter the Product and Click on Edit for that particular product
    2. System will open next page showing more detail info of that Product
        here you need to click on Price section again
    3. Finally the system will show the page where you can enter the price
    For each of page transition the system may takes 3-7 seconds, so up to around 9-20 seconds user needs
    to spend just to entry a single price in one Item.
    Even worst, if there is more that one product, user have to click on back button couple times to go back
    to main document to click another product to edit. Means another waste of time!
    I like to hear comment from you and if you have better idea on how to simplify this, it will be great!
    Some development effort on WebUI components need to be done I think, appreciate if you can lead
    to more simple way to accommodate this. 
    Thanks,
    Gun.

    Hi Michael,
    Is the configuration of easy condition entry only for IC WebClient?
    Because that is what I found in SPRO for Set Up Easy Condition Enty documentation (at Condition 1
    field).
    Now, my initial question is refer to entry price at Sales Order transaction in Web UI (not IC WebClient).
    I tried to setup Easy Condition Entry,  put my pricing procedure and maintain condition 1.
    and set visible for field Condition 1 Value and Rate in the items table.
    I can see the fields, but I can only see fields can be modified/enter if I have maintained manually the price
    at normal way (click Edit on item line, then click Edit again on Price, then click again to maintain the
    price).
    I applied Notes 1292789, but this even worst, Condition 1, Value 1, Rate 1 cannot be edited.
    Is there any missing prerequisite setting here?
    Have you tried this works on Sales Order entry on Web UI (not IC Webclient) ?
    Appreciate your further information,
    Gun.

  • Net price in sales order

    Hi,
    The Net price which displays in my sales order conditions on top is wrong . Where is the calculation done for this in pricing procedure.Kindly let me know how to calculate the net price.

    Hello
    You control this in your pricing through Condition formula for Alternative calculation type (on of the 16 fields in Pricing).
    For this if you refer Std pricng procedure RVAA01.
    The net price is net price & taxes in sales order b'coz of [alternative calculation type as 4|https://docs.google.com/leaf?id=0B-5wCmYJ-6dlOTc3OTk1MjctZmIzOC00NmExLTk0N2MtNTcyMzBiYzFjOTc4&sort=name&layout=list&num=50] (check the link).
    So if you want only net price to be there then use alternative calculation type as 2.
    I hope this clarifies your requirement.
    Thanks & Regards
    JP

  • Change of Net Price in Sales Order

    Hello Experts!
    I wanted to know how the "Net Price" of a sales order can be "changed" by the system or "indirectly" by the user.  I have an issue with the net price that changed in the sales order, and wanted to know how this could have happened; <b>besides</b> changing the pricing conditions, price adjustments, and order surcharge.  Is there someway the system could have changed it or user "indirectly"?  Please advise.  Thank you in advance!
    WC

    Net price is not changed directly.
    It's chanegd via changes to pricing only unless you have some code which updates this field AFTER SAP calculated it based on pricing conditions.
    NOTE: if you reject line items it's vlaue is substracted form order net value, the same is true if any of your pricing conditions is made inactive due to various reasons.
    Changes to pricing condiitons are not shown in order change history, you can see changes per condition record, but if any of your conditions in sales order was made inactive - you won't see it in change log. One of the options may be - if you generate any outputs (IDOCs) which send pricing info - you can check those IDOCs to determine when & what was changed in the pricing of your order.

  • Mass updation of price in sales order

    Hi All
    we have created new condition type and replaced with existing condition type in pricing procedure
    it is working fine when we created new sales order but it is strongly effected for old open sale orders which are already created. when we are creating Invoice new it is not picking price bcz  SO have old condition type so Invoice is showing negative valu.
    it there any solution for this issue?
    If SO updation is only the soltuion can we do it in MASS.( we have more than one lak SOs)
    Regards
    Sudha

    hello, friend.
    in VA05, you can edit many sales orders for one customer at a time.  in the main screen, select the sales orders and go to Edit > Mass changes > New pricing.
    you could explore tcode VFRB (retro-billing) but you do need to consider your business requirement trade-offs.
    please post feedback if this helped.
    regards.

Maybe you are looking for