Indicator in table KONV specifies condition in bill

In table KONV which field specify that this condition is maintained in billing.
From KONV i wish to select only those details which are in my bill how to do this please suggest.
Regards

Hi ,
based on the condition no , u can link ur Billing header/Item data.
regards
Prabhu

Similar Messages

  • Inequality condition prevents the optimizer from selecting indices on tabl

    Dear all,
    I have the below query which takes 4 minutes to give the output:
    original query
    select t_sub.contrno "contNo" from tsk_subno t_sub ,arm_subs_balance bal where order_no = '5360' and
    order_type='NET' and t_sub.subno = bal.subno (+);sql tuning advisor is giving the below advise.. Restructure SQL
    Predicate NVL("IVM_BILLING"."BILLED",'N')<>'Y' used at line ID 14 of the execution plan is an inequality condition on indexed column "SYS_NC00071$". This inequality condition prevents the optimizer from selecting indices on table "TABS"."IVM_BILLING".How I can restructure the sql..
    FYI. arm_subs_balance is a view which takes data from IVM_BILLING.
    view script :
    CREATE OR REPLACE VIEW ARM_SUBS_BALANCE
    (CONTRNO, SUBNO, PAST_DUE, DEPOSIT, UNBILLED,
    TOTAL)
    AS
    SELECT contrno,subno,sum(past_due) past_due,sum(deposit) deposit,
           sum(unbilled) unbilled,
           sum(past_due+deposit+unbilled) total
    from
    select subno,0 past_due,0 deposit,0 unbilled,contrno
      from CRM_USER_INFO
    union all
    select nvl(H.subno,'0000000') subno, sum(nvl(R.ar_am_loc,0)) past_due,
           0 deposit,0 unbilled, R.contrno
      from     IVM_INVOICE_DETAIL R, IVM_INVOICE_RECORD H
      WHERE R.AR_REF=H.AR_REF
       and R.contrno = H.contrno
    group by nvl(H.subno,'0000000'),R.contrno
    having sum(nvl(R.ar_am_loc,0)) != 0
    union all
    select subno,0 past_due,nvl(add_deposit,0) depoist,
           0 unbilled, contrno
      from CRM_USER_EQUIPMENTS
    union all
    select subno,0 past_due,0 deposit, nvl(billamount,0) unbilled,
           contrno
      from IVM_BILLING
    where nvl(billed,'N') != 'Y'
    group by subno,contrnoThanks
    Kai
    Edited by: KaiS on Sep 30, 2009 10:10 AM

    Justin,
    I always thought that nvl(billed,'N') != 'Y' meant that the query should include all rows with a null-value or a value other than Y. :p
    But I agree that the index would moste likely not be that helpfull, but we need more information for that: [When your query takes too long|http://forums.oracle.com/forums/thread.jspa?messageID=1812597] and [HOW TO: Post a SQL statement tuning request |http://forums.oracle.com/forums/thread.jspa?threadID=863295]
    I expect that the conditions on tsk_subno will result in a small number of rows and that there's an index on tsk_subno.order_no which will be used to retrieve those rows.
    In that case view arm_subs_balance will be accessed on subno. This means that if the tables crm_user_info, crm_user_equipments and ivm_billing have indexes on subno, those indexes will be used, but an index on ivm_invoice_record.subno will not be used because of select nvl(H.subno,'0000000') subnoWithout more information I would guess that this part of the union takes longest and should be tuned by rethinking/redesigning the view or a function based index: create index i on IVM_INVOICE_RECORD ( nvl(H.subno,'0000000') );

  • How to make repricing for specific conditions at the time of billing?

    Hello
    I'm SD Pricing person. Let me ask here experts below my concern.
    In EU countries, there is recycling fee in sales of electronics or Note PC with batteries....to keep our earth clean.
    So when customers buy such products, they have to pay more as recycling fee including invoice amount.
    My question is... we want to make repricing for recycling conditions when the billing is created.
    Based on our configuration, recycling condition is not defined as a kind of tax condition.
    So this value is just copied from sales order.
    (pricing type in copy control is 'G' which means repricing for tax condition.)
    In this situation, we want to make repricing for those conditions during operating system.
    Is there any easy way to cover this?
    As I think, this is not easy because the system is already operated.
    To change condition attribution is really risky. If we dare do, we have to migrate all open orders.
    So I want to put this way to the end of my choice.
    For this requirement,
    1. We have to change condition class or category or calculation type in order to be repriced based on pricing type 'G'.
        (ex. Set the condition category as 'I' inter-billing or 'L' always repricing.)
        But transaction data are created now and all open orders will be affected.
    2. To create new conditions are not easy because these conditions are mapped to the CO-PA value field and the values are posted in FI doc.
    3. To change pricing type in copy control is almost impossible because of the impact.
    What can I do this in this situation?
    What I want to do is just to make repricing for specific conditions at the time of billing in case that pricing type of copy control is 'G'.
    Thank you in advance.

    Let me ask agagin to all experts.
    I want to make A condition to be repriced at the time of billing.
    For this, I have to set condition category as 'L' (Generally new when copying).
    But I do not want to do in that way becauuse I am maintaining big operated system now.
    In addition, though I migrate open orders after changing config. as 'L', it is almost impossible for use to migrate because we have more than a thound open orders per a DAY as Globalized system.
    That is why I am asking.
    Simply I can create new condition but as I mentioned, there are various recycling fee so we already created about 10 conditions. And this recycling conditions are linked to REA package of SAP. So creating another 10 more conditions can not be a way for us.
    At last, what I want is not to be shown this condition only in billing doc.
    'A' condition should be displayed in both Sales order and Billing doc.
    And simultaneously, when the billing is created and if user changed 'A' condition master, then new value which is different from sales order have to be reflected in billing doc.
    Thank you in advance.

  • Condition rate in table KONV

    I have made a PO for an item with rate of a particular condition set to 89733 JPY per unit. However, when I check the condition rate in the table KONV for this particular item, it is showing a condition rate of 893.77 JPY per unit. Can somebody please explain what is going wrong here?

    I guess since JPY (Japanese Yen has no sub currency i.e. like we have paise below a rupee or pence below a pound) ,
    SAP stores JPY 1000 as 10.00 so in order to get the correct value for any currency use function module
    CURRENCY_AMOUNT_SAP_TO_DISPLAY
    Pass your currency and amount returned by KONV to get the actual value
    Regards
    Dheeraj..

  • Purchasing Document of specific Condition Type & Order Type

    Dear Friends,
    Can someone adivse me quickly from which table i can locate the Purchase Order's with document type and specific ITEM level condition type for given period.
    Thanks for your quick inputs.
    Ravi

    First use EKKO table where you can get doc type for listing POs. then copy field value of field EKKO-KNUMV and enter this value in KONV table in Doc. condition. Here you will get PO conditions item wise.
    Hope this solve the issue.
    Parag

  • Function module to get Pricing conditions of billing document

    Hi All,
    Please help me getting the pricing condition values for a billing document.  I got values from KONV table against perticular Condition type. but i need to get the values against step number maintained in Conditions for my billing item. is there any function module to get all condition data maintained in document with totals and discounts aswell.
    Please help me.  if required i will give tou full details what i required.
    Kumar.

    Hi Kumar,
    Please check below mentioned Function Module for details:
    RV_PRICE_PRINT_GET_BUFFER
    RV_PRICE_PRINT_GET_MODE
    RV_PRICE_PRINT_HEAD    (Header)
    RV_PRICE_PRINT_HEAD_BUFFER
    RV_PRICE_PRINT_ITEM       (Item)
    RV_PRICE_PRINT_ITEM_BUFFER
    RV_PRICE_PRINT_REFRESH
    Regards,
    Tutun

  • Copying STO PO pricing condition to Billing During Billing creation

    Hi,
    MM and SD pricing conditions are not similar.
    And I cant use Copy PO Basic price in billing Document
    I was advised to try USEREXIT_PRICING_PREPARE_TKOMP or USEREXIT_PRICING_PREPARE_TKOMK.
    How do I copy the Pricing condition from the STO PO to Billing during billing creation?
    Is there an FM i can use to extract the pricing condition given the STO PO?
    thanks,
    NC

    Hi
    If the option of Raghavendra doesn't work for you (parameters in copy rule for invoice), try with VOFM subroutines (Condition formula for alternative calculation type) in the pricing procedure. Surely it will be slower, but it must work. How? You have in KOMP the values for VGBEL and VGPOS with the delivery number and item. So, seach the PO number in the same way. When you have the PO number, with the value of field KNUMV search the value of condition in table KONV.
    I hope this helps you
    Regards
    Eduardo
    PD: I forgot. The userexits that you mention is to populate KOMP/KOMK for customer fields. See SAP Note 531835 - Using field PSTYV in the condition access for futher information.
    Edited by: E_Hinojosa on May 16, 2011 9:21 AM

  • Problem in Sales Order with specific condition type.

    Hello Experts,
    I'm facing a problem in sales order creation for a specific condition type.
    the actual scenario is as below,
    We have created a new condition type for special discount.This condtion type is applicable only for specific sales channels.Also the discount percentage has to fetched from a custom table.
    To achieve this I've written a user exit "RV64A999"
    In the FM, i've calculated the subtotal and fetched the discount percentage and calculated the discount amount. After implementing this, the SO were been created properly. for all the line items the discount amount was getting calculated properly.
    But then I added a condition at the top of code in exit that the calculation for the new condition type should happen only for selected sales channels.
    But after adding this condition in code, i'm facing problem. Now when I create/ change any SO, the discount amounts are getting calculated incorrectly. I'm getting discount amount even if the line item subtotal amount is zero (0).
    Any help or pointers reagrding this issue will be very helpful and highly appreciated.

    Hi ..
    Check your config. again or debug the routine code with your ABAPer and find the problem area.
    -Maharshi

  • Which table stores the condition values of a purchase order line item?

    Hi,
    Please let me know the table that stores the condition values of purchase order line items(when we click on conditions tab after selecting an item then we can see the condition types and there is a corresponding condition value for that condition type.
    My requirement is to get the actual price for a purchase order line item(it can be seen in the last line and it is calculated after considering all the condition types) and display this value in a custom report.
    Thanks,
    Ravindra

    Hi Ravindra
    You can find the conditions data for PO in TAble KONV.
    KONV-KSCH is the condition type
    KONV-KWERT is  the cond value
    KONV-KNUMH is the condition doc no. which is there in EKKO field KNUMH.
    So u have to make a link between KONV-KNUMH and EKKO-KNUMH.
    Thanks
    Vijeta

  • How to activate or deactivate a user-exit based a specific condition

    hi all,
    i want to activate or deactivate(make it trigger) a particular user-exit based in a condition.
    can i do that. if yes please tell me how.
    can we use COMMIT in user-exits or BADI's.
    Thanks & Regards,
    Saroja.

    Hello Saroja
    The solution provided by Rich should be used for testing purposes only in the the reverted sense:
    IF ( syst-uname ne '<specific user>' ).
      RETURN.
    ENDIF.
    " Execute user-exit for specific user
    However, for serious programming you should use a a better strategy. In principle, user-exits are either ON or OFF and, if they are ON, they are ON for <b>all </b>user which is usually not intended.
    The following example shows a (possible) strategy how to execute user-exits based on specific conditions.
    The SAP extension CATS0001 contains the component EXIT_SAPLCATS_001 with the following interface:
    FUNCTION EXIT_SAPLCATS_001.
    *"*"Lokale Schnittstelle:
    *"  IMPORTING
    *"     VALUE(SAP_TCATS) LIKE  TCATS STRUCTURE  TCATS
    *"     VALUE(SAP_PERNR) LIKE  CATSFIELDS-PERNR
    *"     VALUE(SAP_DATELEFT) LIKE  CATSFIELDS-DATELEFT
    *"     VALUE(SAP_DATERIGHT) LIKE  CATSFIELDS-DATERIGHT
    *"     VALUE(SAP_DATEFROM) LIKE  CATSFIELDS-DATEFROM OPTIONAL
    *"     VALUE(SAP_DATETO) LIKE  CATSFIELDS-DATETO OPTIONAL
    *"  TABLES
    *"      SAP_ICATSW STRUCTURE  CATSW
    *"      SAP_ICATSW_FIX STRUCTURE  CATSW OPTIONAL
      INCLUDE ZXCATU01.
    ENDFUNCTION.
    The include ZXCATU01 contains only the following coding:
      CALL FUNCTION 'Z_EXIT_SAPLCATS_001'
        EXPORTING
          sap_tcats            = sap_tcats
          sap_pernr            = sap_pernr
          sap_dateleft         = sap_dateleft
          sap_dateright        = sap_dateright
          SAP_DATEFROM         = SAP_DATEFROM
          SAP_DATETO           = SAP_DATETO
        tables
          sap_icatsw           = sap_icatsw
          SAP_ICATSW_FIX       = SAP_ICATSW_FIX.
    This function module is just a copy of the exit function module in the customer namespace.
    Let us assume that your condition at which the user-exit should be executed is that the employee (SAP_PERNR) belongs to a specific controlling area. Thus, we make another copy of the original exit function module and call this fm within the "general" customer-specific exit function module:
    FUNCTION z_exit_saplcats_001.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(SAP_TCATS) LIKE  TCATS STRUCTURE  TCATS
    *"     VALUE(SAP_PERNR) LIKE  CATSFIELDS-PERNR
    *"     VALUE(SAP_DATELEFT) LIKE  CATSFIELDS-DATELEFT
    *"     VALUE(SAP_DATERIGHT) LIKE  CATSFIELDS-DATERIGHT
    *"     VALUE(SAP_DATEFROM) LIKE  CATSFIELDS-DATEFROM OPTIONAL
    *"     VALUE(SAP_DATETO) LIKE  CATSFIELDS-DATETO OPTIONAL
    *"  TABLES
    *"      SAP_ICATSW STRUCTURE  CATSW
    *"      SAP_ICATSW_FIX STRUCTURE  CATSW OPTIONAL
    " User-Exit specific for employees (SAP_PERNR)
    " belonging to controlling area 1000
      CALL FUNCTION 'Z_EXIT_SAPLCATS_001_1000'
        EXPORTING
          sap_tcats      = sap_tcats
          sap_pernr      = sap_pernr
          sap_dateleft   = sap_dateleft
          sap_dateright  = sap_dateright
          sap_datefrom   = sap_datefrom
          sap_dateto     = sap_dateto
        TABLES
          sap_icatsw     = sap_icatsw
          sap_icatsw_fix = sap_icatsw_fix.
    " User-Exit specific for employees (SAP_PERNR)
    " belonging to controlling area 2000
      CALL FUNCTION 'Z_EXIT_SAPLCATS_001_2000'
        EXPORTING
          sap_tcats      = sap_tcats
          sap_pernr      = sap_pernr
          sap_dateleft   = sap_dateleft
          sap_dateright  = sap_dateright
          sap_datefrom   = sap_datefrom
          sap_dateto     = sap_dateto
        TABLES
          sap_icatsw     = sap_icatsw
          sap_icatsw_fix = sap_icatsw_fix.
    ENDFUNCTION.
    Finally, within the specific exit function module we define the condition when the exit should be executed:
    FUNCTION z_exit_saplcats_001_1000.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(SAP_TCATS) LIKE  TCATS STRUCTURE  TCATS
    *"     VALUE(SAP_PERNR) LIKE  CATSFIELDS-PERNR
    *"     VALUE(SAP_DATELEFT) LIKE  CATSFIELDS-DATELEFT
    *"     VALUE(SAP_DATERIGHT) LIKE  CATSFIELDS-DATERIGHT
    *"     VALUE(SAP_DATEFROM) LIKE  CATSFIELDS-DATEFROM OPTIONAL
    *"     VALUE(SAP_DATETO) LIKE  CATSFIELDS-DATETO OPTIONAL
    *"  TABLES
    *"      SAP_ICATSW STRUCTURE  CATSW
    *"      SAP_ICATSW_FIX STRUCTURE  CATSW OPTIONAL
      IF ( <user BELONGS to CONTROLLING area 1000> ).
        "   execute user-exit
      ELSE.
        RETURN.
      ENDIF.
    ENDFUNCTION.
    The alternative would be to place the entire coding including the conditions in the include ZXCATU01. However, in this case you can test the user exit <b>only in the context of the transaction</b> in which the user-exit is passed.
    Using the strategy I have devised you are able to test the user-exit in general and the specific user-exits <b>independent </b>of the transaction. For example, if you are already working on 6.40 or higher then you could use ABAP Unit Testing for this purpose.
    The same logic can be applied for BAdI where we can have only a single active implementation.
    Finally, I hope to convince that it makes sense to spend some time into a reasonable strategy for implementing user-exits.
    Regards
      Uwe

  • Entry in field KPOSN (item) in table KONV

    Hi All
    I observed that sometimes for the field KPOSN in the table KONV against a PO :-
    1. There is blank entry,
    2. Sometimes line item no is updated (i.e. 10, 20 etc)
    3. Sometime both blank entry and line item is updated.
    I want to know under what conditions or circumstances the the field KPSON is updated with the above 3 mentioned values.
    Please help.
    Regards
    Satish Kumar

    Hello
    Accordingly:
    1. Header condition only
    2. Line condition only
    3. Both header and line conditions

  • KINAK field in Table KONV not getting updated with value W

    Hi,
    I have a PO where I am deleting a line item.
    After I delet line item the field KINAK in table KONV gets updated with value W.
    But I am getting instance where in some cases the field KINAK is not getting updated.
    The result is deleted line item is getting populated in PO output also.
    Regards
    Nandiini

    KINAK is updated only when a Condition is inactive ! So when a item is deleted the condition becomes inactive and gets updated with 'W' which means statistical(not to be counted)
    A     Condition exclusion item
    K     Inactive due to calculation basis/shipping material type
    L     Condition exclusion header or inactive at header level
    M     Inactive due to manual entry
    T     Inactive at header level
    W     The document item is statistical
    X     Inactive via formulae of incorrect
    X     Inactive via formulae of incorrect
    Y     Inactive because of subsequent price

  • In query SQVI unable to join the table konv

    Hi Guru's
    I have a requirement from the user, extract the Open PO's with INCO TERMS and CONDITION TYPES.
    1. what is the process to extract the OPEN PO's from table EKKO.
    In normal process I can extract Open PO's from ME2L and for a perticular Open PO number i can get the INCO TERMS and DOC CONDITION number from table EKKO and by taking the DOC CONDITION number I can get the condition type from table KONV.
    But I want to do this process in SQ01 how is it possible?
    please help
    Regards
    ISM

    ISM,
    No.  Such instructions are beyond the scope of these forums, or at least beyond the scope that I would be willing to cover.  FYI SAP provides a class  [BC407 Reporting|http://www.sap.com/usa/services/education/tabbedcourse.epx?context=%5b%5b%7cBC407%7c%7c%7c063%7cUS%7c%5d%5d%7c] to cover such topics.  The class lasts for 2 days. 
    I can say that I have created a query that meets requirements that are similar to yours.  It took me a couple of hours to rough out the original version for user testing, and a couple more hours to finalize for production.  It is do-able.
    Following is a link to the Query Help doc.  This was the doc from which I learned SAP Query (I did have previous experience with other report writers)   http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVQUE/BCSRVQUE.pdf  
    I have already given you the general methodology to obtain your data within SAP Query.  If these guidelines are not adequate, then you would probably be better off engaging the services of a programmer to write a custom report.
    Best Regards,
    DB49

  • REG : link between Komv table - Konv Table

    hai,
    I have one problem in CIN.
    In Purchase Order for
    ED - JM01 or JEXC
    CESS -ZECS or JEC1
    CSTLST - JIP1 or JIP2
    stored in KOMV Structure,
    other than KOMV where this values are stored..
    (In KONV no values found for that one)
    how can i move it internal table.
    thanks,
    SN

    Hi
    The link is the field EKKO-KNUMV:
    SELECT * FROM EKKO .....
      SELECT * FROM KONV WHERE KNUMV = EKKO-KNUMV
    but you should consider not all conditions are stored in table KONV, because some conditions (generally subtotals) are calculated at runtime.
    Max

  • How to find table / field where condition records are saved?

    Hi,
    We want Sales Order Rate ( Condition type ZR00 calculated with backward pricing ), as a column in a Z report.
    I am not able to find out the table / field where system saves condition records for this condition type. I can only see structure.
    Please help to trace down the field where this data is stored.
    Regards
    Trupti

    Hi Vishal,
    KNUM is the internal number under which system saves the conditions that apply to a Sales Order.
    So first to derive this KNUM from sales order we use Table VBAK
    AFter this we use this KNUM and the condition type in table KONV to get the value for that perticular condition type.
    Please check following.
    SE16> VBAK> enter any sales order in field VBELN and note down number in field KNUM.
    SE16 --> KONV --> enter this KNUM and the condition type --> you would receive condition record value for this condition type, for that sales order.
    KNUMH is a similar field in the table A503( in our case), but we also wanted link of the sales order to this record.
    Thanks for your help anyways!!
    points provided.

Maybe you are looking for