Net value of sales order before saving in VA01

Hi there,
I'm currently working with the transaction VOFM whereby i need to get the <b>net value</b> of the current sales order in order to compare with a deposit value which the customer has made.
a condition type is activated whenever the net value is < the deposit which the customer makes,i.e when sy-subrc EQ 0.
My problem is that the routine in VOFM(where i have added my code),is triggered before i save the order, hence all i get as net value is always 0.00. That routine is again triggered after i save as well, but it doesnt work as i expected even if i get the net value then.
I have in fact used the routine USEREXIT_PRICING_PREPARE_TKOMP of include MV45AFZZ, where i could get the net value from the field XVBAK-NETWR <b>after saving the order</b>.
i thought that now it gets the right value, it'l work as expected but the fact that the VOFM routine is triggered before saving(hence net value 0.00), the condition type doesn't change after i save.
Hence, my condition type is not being applied properly because the condition type is being activated already when it get the net value 0.00.
Can anyone please tell me if there is a way to get the net value before saving?
Thanks for your help.
Regards,
Meenakshi

Hi,
I have in fact used export flag to memory in FORM USEREXIT_PRICING_PREPARE_TKOMP from which i get the net value after saving.
In fact, i have figured out the problem but still cannot solve it.
What happens i that the VOFM routine is triggered more than once, hoewever, the first time it is triggered, i still havent got that net value. In this pass, when the routine ends, sy-subrc eq 0. Upon the next pass to the VOFM routine, i set sy-subrc to 4(condition type not activated), however the result is wrong. The condition type is activated still.
if i do the contrary, i.e set sy-subrc to 4 on the first pass to VOFM routine and then set sy-subrc to 0 second time(condition type needs be activated), the condition type is not activated.
what i dont understand is why the VOFM routine is only keeping the initial value of sy-subrc?Any ideas?
Also, am doing my validations and setting sy-subrc in the form kobev_900.
Am not using the form kobed_900 at all. Does this make a difference?
Also, how can i do the validation only when repricing was called form SAVE process?How do i put the condition?
Thanks for the help.
Meenakshi

Similar Messages

  • Net Value in sales order item

    Hi All,
    Any one know how the system set net value in sales order item? (VBAP-NETWR)
    I mean, what kind of condition type will be considered in net value calculation.
    Thank you

    Hi,
    In Sales Order net value (NETWR) is always value before tax, it means the condition type determined before tax condition will be considered in sales order Net Value.
    In other words if conditon type have a category defined as D-Tax and Cond. class as D- Taxes, the value of this condition type will not be considered in Net value.
    regards
    Vivek.
    Edited by: Vievk Vardhan on Jan 7, 2010 2:00 PM

  • Net Value in Sales order item and header URGENT

    Hi experts
    In some sales orders the net value is not shown but it is available in PR00 condition.
    Where should i check pricing proceedure or copy control,
    In the same sales order type i.e ZRP other sales orders are having net value,
    this sales order is created with reference to sales order type RE.
    Pls guide where to check and what correction needs to be done.
    Thank u in advance.
    regards
    SM

    Hi,
    Pricing procedure in tcode V/08, check the field 'SubTo'.
    Copy control in tcodes VTFA (between SO and invoices).Check the field 'pricing type' for conditions.
    I hope this help you,
    Regards,
    Eduardo

  • How can i take Basic price value as Net value in sales order

    Hello SD experts,
    I have constructed a pricing procedure, and in that have taken condition type for basic price as rate (cond. type= Price) and have another 3 condition types as surcharges for some internal calculation (but i have to show them in pricing procedure).
    Net value in order is showing a total of all condition types (basic price condition type+ all 3 surcharges condition type's value)
    for ex;
    ZRAT ---Basic Price
    ZMRP-- Mrp/pcs rs.
    ZDOZ--- Mrp/Doz Rs.
    ZTAV--- Total Value Rs.
    in this case, when order creates in pricing net value amount shows total of all condition types above and as..
    Now in this case i have to show only Basic price condition value as Net value in the order.... 
    i am just confused with the subtotal, requirement and calculation form for condition base....(do i need to go for a new routine creation?)
    Could you please help me out and please guide me, what should i do for above situation....
    Any help would be a great....
    Thank you

    Dear  G. Mallikarjun ,
    Put A in the subtotal field against the Price condition type and check.
    If the other condition types (discounts) are for internal calculations, please do as advised by Lakshmipathi.
    check and revert back.
    Thanks & Regards,
    Hegal Charles

  • Net Price/Net Value on Sales Order Overview Incorrect

    Hi Experts!
    We are on SAP 4.7
    I have a sales order that has already been delivered, billed, etc.  However, when I look in the Sales Order Overview screen, for 1 item, the Net Price is different than the Item Pricing Condition screen.  I looked in document changes and did see when the Net Price was changed, but cannot tell why it was changed.  Can you anyone explain why this happened?  This is causing a minimum order surcharge in the order.  Awaiting a quick response.  Thank you in advance!
    WC

    Thank you for the response!
    I have tried to replicate the scenario, that was causing the net price/net value displaying incorrectly, and thus causing a minimum order surcharge fee; which was really the issue. 
    When I re-created the scenario, I found that a change in quantity in the sales order of an item or items, after the delivery has already been created (before posting GI); it caused the net price/net value to change, thus causing the minimum order surcharge. 
    The person changed the quantity in sales order, and it indirectly changed the net price, causing the minimum order surcharge.  I still do not know why this happened?
    Do you know of any reasons why this may have occured?
    Thank you in advance!
    WC

  • FM SPE_CALCULATE_PRICE - Java Call does not return Net Value of Sales Order

    Dear Experts,
    we want to make a call of FM SPE_CALCULATE_PRICE from the SAP NetWeaver Developer Studio to achieve that we receive the Net Value of a Sales Order. When we try to test the Scenario in SAP CRM (Creation of a Sales Order) Itself all is working fine. But if we try to make the call from Developer Studio it does not work for some reason. We have applied SAP Note 1936255.
    I am attaching:
    - the Pricing Trace we receive as a result from SAP.
    The Java Code we use is the following:
    Code JAVA
    import com.sap.mw.jco.*;
    import com.sap.mw.jco.JCO.ParameterList;
    import com.sap.mw.jco.JCO.Structure;
    import com.sap.mw.jco.JCO.Table;
    public class callIPCDemo {
    public static void main(String[] args) {
      System.out.println("--- START ---");
      // connect to SAP system
      JCO.Client client = null;
      try {
      client = JCO.createClient(
        "400", // SAP client
        "XXXX", // User ID
        "XXXXXXXX", // Password
        "EN", // Language
        "XXX.XXX.XX.XXX", // IP des hosts
        //"QPMR-CR20", // Hostname
              "00"); // System number
      client.connect();
      System.out.println("Connection OK\n");
      catch (Exception ex) {
      System.out.println(ex);
      return;
      // print RFC attributes
      System.out.println(client.getAttributes());
      // create JCo repository
      JCO.Repository repository = new JCO.Repository("testIPCcall", client);
      // Function Module SPE_CALCULATE_PRICE
      IFunctionTemplate ft = repository.getFunctionTemplate("SPE_CALCULATE_PRICE");
      JCO.Function function = null;
      try {
      function = ft.getFunction();
      } catch (Exception ex) {
      System.out.println(ex);
      return;
      // IS_HEADER_INPUT
      ParameterList importParameterList = function.getImportParameterList();
      Structure HeaderInput = importParameterList.getStructure("IS_HEADER_INPUT");
      HeaderInput.setValue("005056A7005E1ED3A7AD22549B279B91", "DOCUMENT_ID");
      HeaderInput.setValue("CRM", "APPLICATION");
      HeaderInput.setValue("ZCRM02", "PRC_PROCEDURE_NAME");
      HeaderInput.setValue("EUR", "DOCUMENT_CURRENCY_UNIT");
      HeaderInput.setValue("EUR", "LOCAL_CURRENCY_UNIT");
      HeaderInput.setValue("X", "PERFORM_TRACE");
      // IS_HEADER_INPUT-ATTRIBUTES (substructure/table)
      Table HeaderInputAttributes = HeaderInput.getTable("ATTRIBUTES");
      HeaderInputAttributes.appendRows(3);
      Table valuesTable = null;
      HeaderInputAttributes.setRow(0);
      HeaderInputAttributes.setValue("DIS_CHANNEL", "FIELDNAME");
      valuesTable = HeaderInputAttributes.getTable("VALUES");
      valuesTable.appendRows(1);
      valuesTable.setValue("01", 0);
      HeaderInputAttributes.setRow(1);
      HeaderInputAttributes.setValue("SALES_ORG", "FIELDNAME");
      valuesTable = HeaderInputAttributes.getTable("VALUES");
      valuesTable.appendRows(1);
      valuesTable.setValue("O 50000151", 0);
      HeaderInputAttributes.setRow(2);
      HeaderInputAttributes.setValue("SOLD_TO_PARTY", "FIELDNAME");
      valuesTable = HeaderInputAttributes.getTable("VALUES");
      valuesTable.appendRows(1);
      valuesTable.setValue("005056A7005E1ED3A7ACEFCAD95FBB91", 0);
      importParameterList.setValue(HeaderInput, "IS_HEADER_INPUT");
      // IT_ITEM_MAIN_INPUT
      String itemGuid = "005056A7005E1ED3A7AD3F004CD85B91";
      ParameterList tableParameterList = function.getTableParameterList();
      Table tableItems = tableParameterList.getTable("IT_ITEM_MAIN_INPUT");
      tableItems.appendRows(1);
      tableItems.setValue(itemGuid, "ITEM_ID");
      tableItems.setValue("005056A7005E1EE39289A0FB457C9D8A", "PRODUCT_ID");
      tableItems.setValue("M", "EXCH_RATE_TYPE");
      tableItems.setValue("10", "QUANTITY");
      tableItems.setValue("PC", "QUANTITY_UNIT");
      // IT_ITEM_ATTRIB_INPUT
      Table tableItemAttributes = tableParameterList.getTable("IT_ITEM_ATTRIB_INPUT");
      tableItemAttributes.appendRows(2);
      tableItemAttributes.setValue(itemGuid, "ITEM_ID");
      tableItemAttributes.setValue("PRODUCT", "FIELDNAME");
      tableItemAttributes.setValue("005056A7005E1EE39289A0FB457C9D8A", "FIELDVALUE");
      tableItemAttributes.nextRow();
      tableItemAttributes.setValue(itemGuid, "ITEM_ID");
      tableItemAttributes.setValue("PRC_INDICATOR", "FIELDNAME");
      tableItemAttributes.setValue("X", "FIELDVALUE"); 
      // IT_ITEM_TIMESTMP_INPUT
      Table tableTimestamps = tableParameterList.getTable("IT_ITEM_TIMESTMP_INPUT");
      tableTimestamps.appendRows(3);
      tableTimestamps.setValue(itemGuid, "ITEM_ID");
      tableTimestamps.setValue("PRICE_DATE", "FIELDNAME");
      tableTimestamps.setValue("20140225000000", "TIMESTAMP");
      tableTimestamps.nextRow();
      tableTimestamps.setValue(itemGuid, "ITEM_ID");
      tableTimestamps.setValue("PRT_DELIVERYDATE", "FIELDNAME");
      tableTimestamps.setValue("20140225000000", "TIMESTAMP");
      tableTimestamps.nextRow();
      tableTimestamps.setValue(itemGuid, "ITEM_ID");
      tableTimestamps.setValue("PRT_ORDERDATE", "FIELDNAME");
      tableTimestamps.setValue("20140225000000", "TIMESTAMP");
      // execute function module
      try {
      client.execute(function);
      } catch (Exception ex) {
      System.out.println(ex);
      return;
      // check result
      JCO.Structure structureHeaderResult = function.getExportParameterList().getStructure("ES_HEADER_RESULT");
      System.out.println("Net Value: " +
        structureHeaderResult.getValue("NET_VALUE"));
      JCO.Table tableHeaderResult = function.getExportParameterList().getTable("ET_TRACE");
      System.out.println(tableHeaderResult.getNumRows());
      for(int x = tableHeaderResult.getNumRows(); x <= tableHeaderResult.getNumRows(); x = x + 1) {
      tableHeaderResult.setRow(x);
      System.out.println("Trace: " + x + tableHeaderResult.getValue("ACCESS_TRACE_XML"));
      // disconnect from SAP system
      client.disconnect();
      System.out.println("--- END ---");

    Thanks.
    I'll have to discuss VTAA pricing types with the Business Analyst, since there are many records and I'm not sure what I'm looking at.
    In regards to your second point, it's not in calculation. It'll stay at that number until you save, check the conditions tab in the header or reprice the document.
    What's interesting is that it doesn't do this for all materials.
    For example:
    Material 1 - priced $25
    Material 2 - priced $25
    Net price would be $50, which is correct.
    But say we use Material 3 - priced $25 as well. For this one, the total net price could show up as $30.
    Can pricing types be specific to materials or material groups? What is the pricing type exactly and why 'A'?

  • Net Value in sales order becomes zero after changing the employ responsible in Web UI

    Hi All,
    We are in CRM 7.0 with EHP1, when we change employ responsible in the sales order and save, Net value is becoming zeroes.
    This is effecting most of the transactions. There is no custom development, every thing is standard.
    Could any one suggest me this.
    Thanks.
    Best regards,
    Hari

    Hi Raj,
    Thanks you for your reply.
    Could you please let me know where I can see this combinations in configuration. Actually this is happening for standard transactions also.
    I checked customer pricing proc for that BP and Document Pricing proc for that T type. They are maintained for the specific salea area.
    Regards,
    Hari

  • Net Value in Sales order is not picking up for manual conditions.

    Dear Gurus,
    I created a new pricing procedure for a sales document, where 2 manual conditions will given in sales order.
    But after giving manual conditions, the system is only taking one condition value as net value.
    I given Base value description and the step numbers of two manual conditions for Addition.
    Please help me I want total of two manual conditions into Net value.

    Hi Mahendar ,
    Could you please share the solution if your issue has been resolved . Even we are facing the same issue . It would be of a great help
    thanks and regards
    Kish

  • Condition type change quantity and net value at sales order

    Hi Experts,
    I wanted to only ALLOW sales order for RK type (invoice correction) condition ENABLED to change (qty + net values). However i wanted to DISABLED condition changes (qty+net values) in any others type of  sales order.
    i have maintained SD->Basic function->Pricing->Pricing control->define condition type->maintain condition type-(changes which can be made) in my current setting is
    1) manual entry = C (manual entry is priority)
    2)hdr condition = no check
    3) item condition = check
    4) delete = check
    5) amount/percent = check
    6) value = check
    7) qty relation = check
    8) Calc type = check
    Thank you.
    Regards,
    Yong Kok Wah
    material              qty                cat            value
    1234                    2                 G2N           18.40
    1234                    2                 L2N            18.40-
    1) System will auto create with 2 item category, is it true?
    2) How can i change the net value? Because the actual value suppose is 17.00
    Thanks & Regards,
    Yong Kok Wah

    yes , that is standard functionality only.
    One is for Credit and second is for Debit note.
    If you want to change the price you can change it manually.
    http://help.sap.com/saphelp_erp60_sp/helpdata/en/dd/55fede545a11d1a7020000e829fd11/content.htm

  • Net value of Sales order Zero - delete line item

    Hi,
    Sales Order is raised for 3 materials.
    Line item 10 --> 1 Qty --> Quantity delivered -->1
    Line item 20 --> 1 Qty --> Quantity delivered -->1
    Line item 30 --> 1 Qty --> Quantity delivered -->0
    Line item 10 and 20 have some price but as a result of R100(100% discount) their net value is zero.
    Line item 30 has some price, lets say Rs. 100
    The requirement: Line item 30 needs to be deleted.
    When I delete line item 30  and attempt to save the order, it takes me to incompletion log.
    Where it displays line item 10 Missing Data Net Value
    Where it displays line item 20 Missing Data Net Value
    What are the possible solutions?
    Happy Diwali in advance.
    thanks,

    I think I need divine intervention on this.
    1.I applied OSS NOTE 106567 and ran the report SDVBUV00 but it didnot solve my problem. Raised this issue in OSS also, but no solution.
    2.I changed the incompletion log for my sales doc at item level... I changed VBAP-NETWR as warning but still I could not solve it.
    3. Assigning "reason for rejection" at item level, does not solve the purpose and it invokes the incompletion log
    Any other options.
    Just a quick recap on the nature of problem.
    "+ Sales Order is raised for 3 materials.
    Line item 10 --> 1 Qty --> Quantity delivered -->1
    Line item 20 --> 1 Qty --> Quantity delivered -->1
    Line item 30 --> 1 Qty --> Quantity delivered -->0
    Line item 10 and 20 have some price but as a result of R100(100% discount) their net value is zero.
    Line item 30 has some price, lets say Rs. 100
    The requirement: Line item 30 needs to be deleted.
    When I delete line item 30 and attempt to save the order, it takes me to incompletion log.
    Where it displays line item 10 Missing Data Net Value
    Where it displays line item 20 Missing Data Net Value" +

  • Net Value in Sales Order line item

    Dear Experts,
    Need a small favour.
    I need to know, how net value & tax is populated in SO line item.
    I have condition where
    Net Sales-Fix = 5.00 AUD
    Net Sales-Trading = 8.00 AUD
    Net Sales = 5.00 AUD (calculated as per routine for alternative cal type, which is taking lesser value of Fix & Trading).
    Sub-to - 3 (Carry over value to KOMP-KZWI3) is maintained for Net sales.
    But "Net value" in line item is wrong. I want value for  "Net sales" should be the net value.
    Please suggest, what should I do??
    Regards,
    Praveen

    Dear Customer,
    the netvalue is the sum of all condtions which are non statistical and active.
    (excluded taxes).
    If the netvalue shoud be value for "Net sales" then 'Net sales' should be the only active
    non statiscal condtion.
    Otherwise also other conditions have an influence to the net value.
    Please check all conditions in your document.
    I hope that the information are helpful.
    regards
    Claudia

  • NET VALUE IN SALES ORDER

    Hi SD Guru's
    I have a problem, my net value at the item level and the header level doesnt match up. Can you please advise what could be the problem?
    Thanks
    Ravi

    hello, friend.
    please clarify... the total amounts of all line items (net value) do not match up to the header amount?

  • To change/update/delete partner function in Sales order before saving it...

    Hi! All,
    I am having a unique requirement to change the partner function( BIll to party and Ship to party) for standard sales order in the  order save badi implemtation.
    Please sugest a FM that will be appropriate for this functionality.
    One more thing that i am able to do is that i am able to add one more BIll to party and Ship to party in the order but I am not able to delete the exsisting Bill to and ship to partner function from that order, SO if there is any Fm that will delete the exsisting ship to and bill to party my purpose would be solved.
    Please provide your suggetionas how can I proceed further.
    Thanks and regards,
    Mayank

    Hi,
    use the CRM_ORDER_MAINTAIN FM for changing the partners. Fill in the IT_PARNTER and the CT_INPUT_FIELDS parameters.
    For how to fill in I advise you set a breakpoint in this FM and do a partner change in the Sales Order Document.
    You can also find a lot of threads in the forums regarding the ORDER_MAINTAIN FM.
    BR,
    Erika

  • Creation of delivery when sales order is saved in VA01

    Hi All
    We got the requirement in such a way that
    we are creating sales order of type (ZOR -standard order ) . Configrration is donde in such a way that when the order is saved one dilvery will be created for that order of deilvery type ZLF .as this is assginned as default delivery type in VOV8 .
    Hre we have two delivery types ZLF and  ZF and we have diffrent different item categories for that sales order like ZZTC , ZPU ,
    ZTDP .
    our requirement is  as follows
    when we create sales order through va01 (order type - ZOR standard order ) having onlu one item category ZPU  then delivery should be created of type ZLF it is happing correctly .
    when we create a sales order through va01 having  non ZPU item categroies like ZZTC and ZTDP dlivey should not be created automatically for that sales oder on saving that order . this is also happeing correctly
    but the problem is
    when we create a sales order having diffrene item categories ( one condiotn here one item should be ZPU) and other item is  ZZTC while saving the sales order delivery is getting created partially for one item only not for two items i mean delivery is getting created only for item categroy zpu the item with type ZZTC is not gettting added to that delivey .
    for exmaple
    sales order 1234
    item category ZPU
    item category ZZTC
    delivery created with only one item ZPU
    May i know any requirments (routines ) are thre to solve this in VOFM .
    let me know how to hanlde this issue .
    Regards
    Sunil
    Moderator Message: It looks like you are using the forums to get your work done for free. This is not a help-desk to get your Consulting work done. Also you have closed only 1 out of total 68 questions till date. Since you are such a lazy and irresponsible forum member, Im giving you the final warning against breaking the rules of this forum. One more violation and you userid will be deleted.
    Edited by: kishan P on Oct 14, 2010 4:36 PM

    Hi Mohanty,
    I think the Immediate Delivery under Shipping for that order type may have value A or X, Clear that value.
    1) Goto VOV8 tansaction.
    2) Select the Sales order type (For eg: OR for standard order) and double click on that
    3) Under Shipping tab, Set Immediate Delivery with Blank value
    Plz reward points if it is helpful
    Thanks,
    Vinay

  • Creation of delivery when sales order is saved through VA01

    Hi All
    We got the requirement in such a way that
    we are creating sales order of type (ZOR -standard order ) . Configrration is donde in such a way that when the order is saved one dilvery will be created for that order of deilvery type ZLF .as this is assginned as default delivery type in VOV8 .
    Hre we have two delivery types ZLF and  ZF and we have diffrent different item categories for that sales order like ZZTC , ZPU ,
    and ZTDP .
    our requirement is  as follows
    case1:
    when we create sales order through va01 (order type - ZOR standard order ) having onlu one item category ZPU  then delivery should be created of type ZLF it is happing correctly .
    case 2:
    when we create a sales order through va01 having  non ZPU item categroies like ZZTC and ZTDP dlivey should not be created  for that sales oder on saving that order .one success message is thwoing as salers order has been created but delivry cannot be created for this order .this is  is also happeing correctly . for this we have copied a rottine no 102 from VOFM  and we have added some logic
    but the problem is
    when we create a sales order having diffrene item categories ( one condiotn here one item should be ZPU) and other item is  ZZTC while saving the sales order delivery is getting created partially for one item only not for two items i mean delivery is getting created only for item categroy zpu the item with type ZZTC is not gettting added to that delivey .
    for exmaple
    sales order 1234
    item category ZPU
    item category ZZTC
    delivery created with only one item ZPU
    May i know any requirments (routines ) are thre to solve this in VOFM .
    let me know how to hanlde this issue .
    Moderator Message: Spec-dumping is not allowed
    Edited by: kishan P on Oct 14, 2010 4:31 PM

    Hi Mohanty,
    I think the Immediate Delivery under Shipping for that order type may have value A or X, Clear that value.
    1) Goto VOV8 tansaction.
    2) Select the Sales order type (For eg: OR for standard order) and double click on that
    3) Under Shipping tab, Set Immediate Delivery with Blank value
    Plz reward points if it is helpful
    Thanks,
    Vinay

Maybe you are looking for

  • How to overclock my x2 3800+ with K9N Ultra

    My current rig as below:- AMD X2 3800+ AM2 stock fan MSI K9N Ultra (MS-7250 v2.0 but on board stated v2.1) bios upgraded from 3.2 to 3.5 1G DDR2 667 Kingston Value Ram x 2 MSI 8600GT-Overclock edition Lite-on 20X Sata DVD-Ram Seagate Sata2 320GB WD P

  • Typewriter tool has disappeared

    Under the tools menu I have drop down box with 7.0 shows nine choices, one of witch is typewriter too. On another computer,using 8.0,  this tool, amongst others, has disappeared.  Now only has three choices of tools. Have removed and reinstalled 8.0

  • Problem mapping the iFS drive.

    when i work in the iFS server and click network neighborhood i can see home,root and public directories. when i go to another machine in the same network and go to the iFS server i cannot see these directories. On the second machine i've only install

  • How to read content between xml tags?

    is there any way to read the content between xml tag

  • Organizing in the iPhone 3G

    How do you create new folders and organize photos on an iPhone 3G? I would like to put Artwork in one plce and family in another. I see only camera roll. Last night's party should not be next to my sweet little niece. Thanks.