Wrong pricing condition values when using GN_INVOICE_CREATE

Hi all,
I am currently handling a program where I have to display all the materials in a given sales area and some corresponding values that depend on pricing conditions. I am using FM GN_INVOICE_CREATE to extract table komv. However, I am experiencing a problem because the values I am getting are different from those in table konv. I am getting the price conditions without the value of field KNUMV.
I would like to ask if anybody has any idea on how to go about this or maybe another function module that I can use to get the data I need.
Thanks a lot..
Regards,
jac

Hi,
Thanks for your reply. I only have the field AUART for checking on the pricing conditions.
Here is a the part of my code
  CALL FUNCTION 'GN_INVOICE_CREATE'
       EXPORTING
            vbsk_i           = i_vbsk
            id_kvorg        = ''
            id_no_dialog  = c_exis
            invoice_date  = p_datum
            pricing_date  = p_datum
       IMPORTING
            vbsk_e          = i_vbsk
       TABLES
            xkomfk         = i_komfk
            xkomfkgn      = i_komfkgn
            xkomfkko      = i_komfkko
            xkomv          = i_komv
            xthead         = i_thead
            xvbfs           = i_vbfs
            xvbpa          = i_vbpa
            xvbrk           = i_vbrk
            xvbrp           = i_vbrp
            xvbss          = i_vbss
       EXCEPTIONS
            OTHERS       = 1.
The only parameters in those that have values are c_exis = X, p_datum = given date, and xkomfkgn. The other parameters are all initial when passed to the function module. I get a resulting komv table however, values are incorrect.
Thanks again for the help..
Regards,
jac

Similar Messages

  • Crm_order_maintain ,changing pricing condition value at item level

    Hi,
    I am trying to change the pricing condition value at item level while creating sales order through CRM_ORDER_MAINTAIN.
    I am not able to change the condition value.
    Code is below.
          wa_inputfields-ref_guid   = wa_orderi-guid.
          wa_inputfields-ref_kind   = 'B'.
          wa_inputfields-objectname = 'PRIDOC'.
          wa_fieldname-fieldname    = 'KBETR'.
          append wa_fieldname to wa_inputfields-FIELD_NAMES.
          wa_fieldname-fieldname    = 'KMEIN'.
          append wa_fieldname to wa_inputfields-FIELD_NAMES.
          wa_fieldname-fieldname    = 'KPEIN'.
          append wa_fieldname to wa_inputfields-FIELD_NAMES.
          wa_fieldname-fieldname    = 'KSCHL'.
          append wa_fieldname to wa_inputfields-FIELD_NAMES.
          wa_fieldname-fieldname    = 'WAERS'.
          append wa_fieldname to wa_inputfields-FIELD_NAMES.
          INSERT wa_inputfields INTO TABLE it_inputfields.
    wa_pricing_add-KSCHL  = 'ZP06'.
    wa_pricing_add-WAERS  = 'USD'.
    wa_pricing_add-KBETR = '10'.
    wa_pricing_add-KPEIN = '1'.
    wa_pricing_add-KMEIN = 'ST'.
    INSERT wa_pricing_add INTO table it_pricing_add .
    wa_pricing-REF_GUID     = wa_orderi-guid.
    wa_pricing-REF_KIND      = 'B'.
    wa_pricing-PRICING_TYPE  = 'A'.
    wa_pricing-COND_ADD = it_pricing_add.
    wa_pricing-PRICING_PROCEDURE = 'ZVDSP'.
    append wa_pricing to it_pricing.
    Can you tell me how to overwrite the condition value while creating sales order using crm_order_maintain.?
    Regards,
    Indhra.E

    Hello Indhra,
    Check the CT_INPUT_FIELDS table, in the OBJECTNAME field you will find all the tables that are filled during the function call. Check those tables mentioned in the OBJECTNAME to look for any pricing related data.
    When your order is in change mode and you activate debug <b>just before you make the change</b>, the CRM_ORDER_MAINTAIN FM call contains <b>data only relevant for the change you just made</b>. In other words, you need to fill exactly the same tables as CRMD_ORDER does.
    E.g. You just change the pricing procedure and you see in debug that 5 tables are filled, you must do exactly the same in your code! It's quite anoying but you're using a low-level API FM that can handle ANY transaction type in CRM!
    Check it, it works!!
    <b>Reward points if useful!</b>
    Regards,
    Joost

  • Billing header pricing condition value

    Hi,
    I have requirment to display billing header pricing condition value. I have check using  first go to Vbrk then find Knumv field,go to KONV and find all condition record value.
    But in KONV there are only Items condition record SO how to find header. please reply

    Hi ,
    Instead of KONV, get the header condition value from KONH
    regards,
    santosh

  • What is the Procedure to Create "Condition Value" Routine Using VOFM

    Dear Guru,
    I want to know Step-By-Step Procedure to Create "Condition Value" Routine Using VOFM.
    Give me guideline how it will link to program RV64ANNN.
    and if it doesnot link to RV64ANNN
    what might be the possible reason and how to make it link with RV64ANNN.

    Dear Guru.
    I have encountered a technical issue related to Creation of User Routine for pricing procedure
    (Routine :: RV64A978).
    Before coming to issue I want to give you slight glance on my requirement.
    I have got two requirements to write two routines for a new condition type -->> packing type .
    >>Routine Number  One First  I Have wrote  Requirement Routine         RV61A943
    Routine Number two  Other I Have wrote  calculate condition value  RV64A978
    So as usual normal procedure of writing a routine I followed VOFM for writing routine for pricing procedure and routine for calculation (condition value).
    I performed above respective process for both routines in VOFM.
    And I have activated both routine from going VOFMMenu bar edit  Activate.
    After activation automatic include is generated in both case .
    INCLUDE RV61A943 .  "FAMD PAckage Wt        
    Is generated in RV61ANNN
    INCLUDE RV64A978 .  "FAMD Package-Rate     
    Is generated in RV64ANNN
    In case of Routine  RV61A943
    I can able to find the main include routine RV61ANNN from where used function in SE38 and able to trace it.        
    And I am able to find it in the lists of Includes of RV61ANNN.
    But In case of Routine  RV64A978
    I can not able to find the main include routine RV64ANNN from where used function and able to trace it. Pls refer below picture.
    But in RV64ANNN it is showing that routine RV64A978 is there 
    So Guru I want to know following things >
    1.     What might be the main reason in case of RV64A978 ??
    2.     How I should approach to solve this issue??
    Because what I understood unless routine RV64A978 is traceable  from u201Cwhere usedu201D to find out its main routine RV64ANNN , the routine RV64A978 wont work in pricing procedure (I believe).

  • Pricing Condition Values in Sales order

    Hi Guru's
    Where the Header level Pricing condition Values stored in Sales Document?
    Thanks and Regards
    Srinivas Kapuganti

    Hi srinivas
    Generally the values are stored at the following tables :
    KOMK - header  data is stored
    KOMP - Item  data is stored
    You can check these tables through SE11 or SE16
    Regards
    Srinath

  • Referencing condition values when creating return order is wrong...

    Hello Experts,
    Lets say I have a billing document that has 3 line items namely material A, B and C.
    Now, I created a return order for material A with 2 separate line items because of different
    storage locations. Now, is there a user-exit that lets my 2nd line item copy the condition values of the
    1st line item of the reference billing document? because they are of the same material(A).
    Currently, we are having problems when creating a return order having multiple line items of the same material
    because the succeeding line items copies the wrong condition values of the referenced billing doc.
    For example:
    Original billing document:
    Material      Discount
    A          100
    B          200
    C          300
    Return Order:
    Material     Discount
    A          100
    A          200
    A          300
    The succeeding line items of my return order must point to the first line item since they are of the
    same material. Hope you can help me guys. Thank you and take care!

    You may need to explore in the copy control definition, especially the pricing type defined. Check if any customized requirements exists for condition which checks w.r.t to the document number instead of reference document number item.

  • Incorrect Condition Values when billing multiple deliveries

    Hi all.
    Ok this is a new one on me, when i bill using VF01 and enter multiple deliveries in (2) then second billing document (2 are created) that is created has some condition values that differ from the first, i must add it the same material, condition values, qty and ship to on the deliveries, also the deliveries are NOT reference to a sales order.
    But when you create each delivery as a single billing document all is ok.
    Any initial ideas?
    Just better add this is a density calulation as we use the F&A pricing for these billing docs.
    Regards
    Steve
    Edited by: Steve Cane on Mar 31, 2009 10:16 AM

    Hello steve,
    some possibilities
    some of the conditions may be group conditions and hence the base is the cumulative of both the conditions
    copy control from delivery to invoice may be to redtermine the scales and hence it may be updating when together
    hope this helps
    Thanks
    akasha

  • How to access/display custom pricing condition values in the webshop (eg. o

    Hello,
    we are using B2B with IPC-pricing, using our own pricing conditions. Calculation of the prices works fine (can be verified when enabling the price analysis link).
    Now we need to show some of these own pricing condition's values (not the ones available in the salesdocument header/item like getNetValue, getTaxValue,..) in the shopping basket (order.jsp).
    How can we achieve this (eg. get the IPC to transfer these values back to the shop or read them somewhere)?
    Thanks for any hint
    Kind regards,
    Manuel

    Hi all,
    We've found the solution according to the post from Rajinikanth G and Sateesh Chandra (http://scn.sap.com/thread/2046477). That will work (return any pricing information/details like custom pricing conditions, subtotal1 - 6 etc. as in pricing analysis) for order.jsp (display shopping basket), order_change.jsp and orderstatusdetail.jsp (display order), but not for confirm.jsp (order confirmation / print order).
    <%@ page import="com.sap.isa.businessobject.header.HeaderSalesDocument" %>
    <%@ page import="com.sap.isa.businessobject.ipc.IPCBOManager" %>
    <%@ page import="com.sap.isa.core.UserSessionData" %>
    <%@ page import="com.sap.spc.remote.client.object.IPCClient" %>
    <%@ page import="com.sap.spc.remote.client.object.IPCDocument" %>
    <%@ page import="com.sap.spc.remote.client.object.IPCException" %>
    <%@ page import="com.sap.spc.remote.client.object.IPCItem" %>
    <%@ page import="com.sap.spc.remote.client.object.IPCPricingCondition" %>
    <%@ page import="com.sap.spc.remote.client.object.IPCPricingConditionSet" %>
    <%
       String priHdrCondTxt = "";
       String priItmCondTxt = ""; 
       HeaderSalesDocument hsDoc = ui.header;
       UserSessionData usd = UserSessionData.getUserSessionData(request.getSession());
       IPCBOManager ibom = (IPCBOManager) usd.getBOM(IPCBOManager.NAME);      
       IPCClient ipcClient= ibom.getIPCClient();
       if (ipcClient == null)
           ipcClient = ibom.createIPCClientUsingConnection(hsDoc.getIpcConnectionKey());
       ipcClient.getIPCSession().setCacheDirty(); // important to get the correct data
       ipcClient.getIPCSession().syncWithServer(); // important to get the correct data
       IPCDocument ipcDocument = ipcClient.getIPCDocument(hsDoc.getIpcDocumentId().getIdAsString()); //getIpcDocumentId: null without setCacheDirty and syncWithServer
       try{
           // Header
           priHdrCondTxt += "<br>------HEADER--------";
           IPCPricingConditionSet hPriCondSet = ipcDocument.getPricingConditions();
           IPCPricingCondition[] hPriCond = hPriCondSet.getPricingConditions();
           for(int i=0; i<hPriCond.length; i++)
               priHdrCondTxt += hPriCond[i].getConditionTypeName() + "(" + hPriCond[i].getDescription() + ")" + hPriCond[i].getConditionValue() + " //<br>";
           //Item
           IPCItem[] ipcItems = ipcDocument.getItems();
           for(int i=0; i<ipcItems.length; i++)
               priItmCondTxt += "<br>------ITEM--------";
               IPCPricingConditionSet iPriCondSet = ipcItems[i].getPricingConditions();
               IPCPricingCondition[] iPriCond = iPriCondSet.getPricingConditions();
               for(int x=0; x<iPriCond.length; x++)
                   priItmCondTxt += iPriCond[x].getConditionTypeName() + "(" + iPriCond[x].getDescription() + ")" + iPriCond[x].getConditionValue() + " //<br>";
       }catch(IPCException e) {
       %>
       <%=priHdrCondTxt%><br>
       <%=priItmCondTxt%>
    In confirm.jsp there is no IPC-document available (<HeaderSalesDoc>.getIpcDocumentId()/getIpcConnectionKey() are null). Also BOM -> getBasket()/getOrder()/getCustomerOrder()/getQuotation() are empty. Here we've transferred the necessary pricing informations from basket to confirmation through the UserSessionData.
    Set data in order.jsp:
    <%
       String itemId = "Item-" + item.getProductId() + "SomeValue";
       HashMap pricesForConfirm = new HashMap();
       pricesForConfirm.put("Header-SomeValue", "Val1");
       pricesForConfirm.put(itemId, "Val2");
       UserSessionData usd = UserSessionData.getUserSessionData(request.getSession());
       usd.setAttribute("pricesForConfirm", pricesForConfirm);
    %>
    Show data in confirm.jsp:
    <%
    String itemId = "Item-" + item.getProductId() + "SomeValue";
    UserSessionData usd = UserSessionData.getUserSessionData(request.getSession());
    HashMap pricesForConfirm = (HashMap) usd.getAttribute("pricesForConfirm");
    s2 += pricesForConfirm.get("Header-SomeValue");
    s2 += pricesForConfirm.get(itemId);
    %>
    That whole solution does work fine also when pricing analysis is disabled in XCM. (Note that we've enabled "doItemCalls" in backendobject-config.xml according to note https://service.sap.com/sap/support/notes/1004533, but we did not use the ExtensionData-mechanism to transfer data from/to ABAP, because that would need changes on ABAP- (to fetch and fill) and Java-side (to read and display) and because we could not find/access relevant pricing information from IPC at the time the BAdI is called. Also the BAdI CRM_ISA_HDR_PRICING mentioned in the note does apply for the web catalog. We've used that to give IPC more information to calculate the netValue using additional pricing conditions for the catalog.)
    We've also implemented note https://service.sap.com/sap/support/notes/892761 to show a different price (eg. grossValue) in the mini basket (total items and price in basket).
    If there's a need to display a different price in the catalog, there note https://service.sap.com/sap/support/notes/1022962 could be implemented.

  • Pricing Condition Value

    Hi All,
    I have a strange issue, where in when we eneter a material into sales order(VA01/Va02), there is a customized pricing condition type which is triggered. But the problem is, the condition base value appears zero and net value is calculated accordingly.  When we save the sales order, the COndition value  appears and net value changes because of this. Initially Condition value appears zero. It is an Item condition. Whet could be the reasons for this discrepancy.
    Thanks ,
    Swathi

    HI,
    Kindly Check your Pricing procedure in V/08 , and also check in Sale order level how system is calculating what is the value is picking based on that you can do the necessary changes in pricing procedure
    Regards,
    Prasanna

  • How to populate column titles for y values when using Write to Measurement File Express VI with a tab delimited text-based .lvm file?

    The .lvm file generated by the Write to Measurement File Express VI includes column heading titles for the y values, but they are a default value of "untitled".  See attached example of a sample file when opened in Excel, the values in question are highlighted.  Is there a way to specify the column titles when the file is written?
    This is a similar question to this posting, which received a work around response to use the Write to Spreadsheet File.vi, rather than a solution when using this VI.
    Message Edited by Hightop Raven on 05-02-2007 03:37 PM
    Attachments:
    column_titles.gif ‏13 KB

    Sorry for the late reply.  I was out of the office Friday.
    You can do it, but the code can get rather ugly.  Under the hood, the dynamic data type (the dark blue wire) is an array of waveforms.  In your case, the scalar values you convert to a dynamic data type are being converted to an array of waveforms, each waveform having one element.  You have two options.
    Explicitly convert your scalars to one-element waveforms (t0=0, dt=1) and add the title before conversion to a dynamic data type.
    Convert your dynamic data type to an array of waveforms and loop through them to add the column labels.  The conversion blocks are in the Signal Manipulation Express palette.
    I would recommend 2, since it is the easiest to add.  It is also the easiest to run only on the first iteration.  Just put a case selector around the loop, wire the selection to the While loop iterator, and set the case containing the label code to 0.  The default case simply passes through the dynamic data.
    My apologies for not including a screen shot.  I am in the process of upgrading my machine and can't run LabVIEW.  If you need one, let me know and I can post one tomorrow.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • Wrong classes output directory when use of dependant projects

    Hi,
    JDev 10.1.2.1 but also in previous versions.
    Windows XP Prof, AMD Athlon, 1 Go Mem
    I have following setup:
    Projects:
    DTO (data transfer objects and utility classes used in other projects)
    -> dependies: none
    Directory tree:
    MyWorkspace\DTO\classes
    MyWorkspace\DTO\src
    Model (model classes)
    -> dependies: DTO
    Directory tree:
    MyWorkspace\Model\classes
    MyWorkspace\Model\src
    View (JClient app)
    -> dependies: DTO, Model
    Directory tree:
    MyWorkspace\View\classes
    MyWorkspace\View\src
    WebView (Struts app)
    -> dependies: DTO, Model
    Directory tree:
    MyWorkspace\WebView\deploy
    MyWorkspace\WebView\model
    MyWorkspace\WebView\public_html
    For some unexplained reasons sometimes (difficult to reproduce)
    JDev get confused and DTO classes, sometimes Model classes are copied to the View project classes directory.
    Example utility class of the DTO project:
    source:
    MyWorkspace\DTO\src\com\photoswing\dto\util\TextUtils.java
    instead of being generated in:
    MyWorkspace\DTO\classes\com\photoswing\dto\util\TextUtils.class
    is found in the View claases output directory (directory tree created by JDev):
    MyWorkspace\View\classes\com\photoswing\dto\util\TextUtils.class
    I noticed that regularly the JDev navigator has synchronization problems and can't find the class when activating the right-click Select in Navigator action in an open source file.
    This generally happens when switching from source files of different projects.
    Now if you compile a source file and the navigator has a synchronization problem following warning is displayed:
    Warning: The file is not part of the active project DTO.jpr, compiled class will be written to DTO.jpr output directory
    When only one file gets compiled this can be repaired easely by deleting the class written in the wrong directory.
    But when several files are changed and are compiled the warning is only displayed for the current source file and all classes output trees must be scanned manually.
    When testing the app if I'm not wrong JDev reads from the classes directories and doesn't produce a jar file, so deleting manually the wrong classes is a valid workaround.
    But what if the app gets deployed and jars are generated?
    I can't imagine myself changing manually the produced jars by removing the wrong classes and what about the manifest?
    Your help is requested.
    Regards
    Fred
    PS Can't provide a TestCase => happens in complex environment only.

    Glad to know I'm not the only one having that serious problem.
    JDev by default create at least 2 different projects (model and view) so it seems to be a standard.
    Working simultaneously on source files of different projects seems to the cause the trouble.
    Is there somekind of patch available?
    Could somebody of Oracle answer the question of the first message of this thread?
    Thanks
    Fred

  • Pricing condition value mismatch:

    I have an issue on, how pricing value is getting determined.
    Our client wants to dictate the price at each level. For example,
    if 100 EA = 234.77 EUR and if customer orders 125 EA system should calcuate the value in the following way.
    First it will convert the value to one unit price which is 2.3477 and round the value to two decimal. Now value would be 2.35
    Now this one multiplied by the quantity will be the price for the customer. So price = 2.35*125 = EUR 293.75.
    In order, under condition tab we have four Columns
    1. Conditino type 2. Name 3. Amount, 6.Condition value.
    Under komv-kbetr we are pulling EUR 2.35. but under KBETR, value is not 2.35Qty = 293.75, but instead it's 125234.77/100 = 293.46
    Because in Kbetr the value is rounded, where as in Kwetr the final amount (293.46) is being calculated before rounding the condition value. ( No rounding of 234.77/100 to 2.35).
    Any clue what to do on Kwert so that it will match with Kbetr.
    Thanks,

    Hi,
    In my opinion, logically what SAP is calculating is correct.
    If you round-off, before doing the calculation as 2.35, then for 100 EA it would be 235.00 EUR which is incorrect pricing.
    Per SAP calculation, 293.46/125 = 2.3476, which almost equals to 234.77/100 = 2.3477.
    So it looks at one hand, you are trying to charg more if the customer buys more quantity. (by applying 2.35 EUR per 1 EACH).
    So inform your customer that the pricing is correct.
    If you want to round to 2.35, then in transaction VK12 itself, you can change the pricing record as 2.35 EUR per 1 EA.
    Regards,

  • Sales Pricing- Condition value

    Hi
    In sales pricing ,Manual condition type is coming, i dont know why..
    and also for other condition record there is some condition value
    from where it is decided / configured
    pls help
    Thanks

    Hi,
    If you have maintained VK11 for your material then while doing sales pricing system will fetch the base price ,if it is not maintained then you enter the base price while doing sales pricing.
    Muzamil

  • Keeping variable values when using an LMS

    I have a program that uses variables for a branching, allowing me to mark what branch the student has completed.  It works when you preview the course.  When I publish to the LMS and take the course it works if I go straight through.  But if I leave the course and then pick it up were I left off the variables that were set showing completion of the course no longer show the completion information.  How can I maintain the variable values when the student exits the course?

    Hi dmv@Morgan and welcome to the forums!
    Here's what I've found to be true for my LMS:
    If you set a default value for the variable in the variables panel, then the variable will be reset to that default value when the course resumes. 
    If you don't set a default value, then the LMS suspend data (aka resume data) will populate the variable with the previous value from the previous attempt.
    Let us know how it goes,
    Jim Leichliter

  • Update sequence wrong in Materialized view when using refresh group

    Hi,
    I made a trigger (for each row) on a materialized view(replication data from a master table in in a different database), which is refreshed by a refresh group (exec dbms_refresh.refresh('"...). However, the update order/sequence is important and must be handled (by the trigger) in the same order how the updates where done in the master table. Unfortunately the updates in the materialized view are NOT in the same order. The trigger is fired in a wrong order.
    I am using database version 10.2.0
    Does anybody reconize this problem, Is there a solution for this problem ( with keeping the refresh group mechanisme)?
    Thanks
    Regards
    Jurn

    rownum is determined as the row is output, so "order by rownum" does literally nothing.
    http://docs.oracle.com/cd/B19306_01/server.102/b14200/pseudocolumns009.htm

Maybe you are looking for

  • How do I avoid synching my family's apps, from a shared account?

    My family has a shared account on my windows desktop computer.  I was told that I can elect not to automatically synch all the Apps on the desktop  with my iPhone when I connect it to the desktop, but I cannot see how.

  • Network and multiple screens - please help

    As a designer I've always used two screens running from one mac to spread around my open information boxes. Just received a new g5 with Snow Leopard but only have one monitor socket. The mac is networked vie ethernet cable to the internet and other m

  • Printing photos from your Android device

    Have you tried printing photos from your Android device (Samsung, Nexus, HTC, Sony etc) ?   http://www.hp.com/united-states/campaigns/mobility/#android-tab-new Some people have reported issues with skewed borders when trying to print 4x6 & 5x7 photos

  • Urgent: Table for Payment for Bill

    Hi, I am working on report in which i want to have that table which shows the payment of a bill (FICO realted). PLZZ PROVIDE ME THE TABLE which shows the payment of a bill.

  • Mail in 10.4.7 very unstable.

    Is it just me, or is Mail after 10.4.7 much more unstable? I have had several crashes of Mail since updating. My mail is on an IMAP server. Three times now, since 10.4.7, Mail has crashed when I get a new mail. Starting it up again simply causes it t