Condition value routine getting value zero at header level.

Hi Gurus,
I am trying to create one condition value routine in which I am passing xkwert = ( wa_vbap-cmpre * komp-mglme ) / 1000.
The condition works fine at item level where I get condition value as desired but at the header level, where it should show sum for all line items, it is showing 0. When I debugged, I found that somewhere in standard program, where it sums for line item, it is changing to negative and that is why it is getting zero but I was not able to correct it.
I am writing the code as follows.
DATA: wa_tab TYPE c LENGTH 1000,
      I_VBAP TYPE STANDARD TABLE OF VBAP,
      lv_komv like xkomv,
      WA_VBAP TYPE VBAP.
FIELD-SYMBOLS <f1> TYPE ANY TABLE.
  UNASSIGN <f1>.
wa_tab = '(SAPMV50A)XVBAP[]'.
ASSIGN (wa_tab) TO <f1>.
IF sy-subrc = 0.
   i_vbap[] = <f1>.
ENDIF.
READ TABLE i_vbap INTO wa_vbap WITH KEY posnr = komp-kposn.
IF sy-subrc = 0.
   xkwert = ( wa_vbap-cmpre * komp-mglme ) / 1000.
   CLEAR wa_vbap.
ENDIF.
CLEAR: I_VBAP,
        lv_komv.
What should I do? please help.
Regards,
Manish

I found the solution.
If xkwert is initial.
xkwert = gkomv-xkwert.
endif.
Regards,
Manish

Similar Messages

  • Printing of Condition value at both header and Item level

    Dear Sap Gurus,
    Please any body tell me how to print the condition value at both header and at item level in PO print out. ie.  I am using RA00 at both item and header level and i want to print this value at both header and item level.
    Thanks and Regards,
    Patil

    Hi,
    Please check with abaper is he calling the function like mention below or not
    CALL FUNCTION 'PRICING'
        EXPORTING
          calculation_type = 'B'   
    or  (calculation types = as in condition type)
          comm_head_i      = komk
          comm_item_i      = komp
          preliminary      = ' '
          no_calculation   = ' '
        IMPORTING
          comm_head_e      = komk
          comm_item_e      = komp
        TABLES
          tkomv            = i_komv.
    regards
    Edited by: bvdv on Jul 8, 2009 7:35 PM

  • Net price is zero in Header Level

    Hello Experts,
    I am a newbie in SAP and I have a problem wherein on item level there the net price can be seen however when you view the net price in Header, cumulative net price is = 0. any help will be greatly appreciated. Thanks in advance.

    hi..
    check your condition types...in M/06...and then see whether u have ticked the item condition or header condition..
    if u have ticked on header condtion then,,,this condition type will be used at header level in pricing,,,and at the level of document it will ask for price...
    try this out..
    thanks

  • Validation Condition: value zero

    Dear Experts,
    we try to find a way to set up a validation wich checks:
    if the value at item 123 is greater than zero ==> than the value at item 456 should be greater than zero as well.
    We thought about a condition but we cannot set up a condition, that contains a certain value. We tested the following formula:
    CONDITION (LC_YTD(item123)>0) ==> LC_YTD(item 456) >0
    With this formula we receive the error message that "Formula element does not match type BOOLEAN".
    Do you have any idea, how we can do this validation?
    Thank you!
    Regards
    Katharina

    Hi Katharina,
    You may try the following:
    LC_YTD(item123)>0 AND  LC_YTD(item 456) >0
    or
    LC_YTD(item123)>0 ==> LC_YTD(item 456) >0
    Edited by: Eugene Khusainov on Jun 1, 2010 10:06 AM

  • ALV WebDynpro Hierarchy -Setting non-numeric values in the header level row

    Hi Experts,
    When setting up an ALV table as a table hierarchy the standard ALV settings only seem to allow for numeric values to be displayed in the higher hierarchy levels. Is there a way to also set the values for some non-numeric columns into these higher-level rows - programmatically or through the ALV Settings?
    Example: I have delivery item level data in my context and the delivery number as a hierarchy column. Some columns in my context however actually come from the delivery header e.g. delivery block, delivery priority, ship-to etc and I would like to display these in the collapsed header rows of the delivery number.
    It seems obvious to me that this should be doable otherwise if you are looking at at a list of hundreds of deliveries and all you see besides the delivery number is numeric data such as sums & totals, it's kind of hard to know which delivery you might want to expand the sub-level for.
    Please help,
    Peter

    Hi,
    Even we have faced the same issue.
    In ALV hierarchy, we cannot display data at header items/levels. this is a constraint in ALV. You can achieve the same usign TABLE UI element.

  • Condition Value(KONV-KWERT) for Sales Order

    Hi Experts,
    I have to print the condition value for ZTDC Condition Type from Header Value, currently it is getting the data from line item level. I am getting condition no document (KNUMV) from VBAK table and checking that condition no document in KONV table to retrieve the Condition Value(KWERT) but it is picking item level data.
    We need to get the condition value for the header level.
    Please help me.
    Points will be rewarded for useful answer.
    Thanks,
    Vinay.

    Hi!
    Try using table KONP (condition at position level) and KONH (condition at header level).
    Regards
    Tamá

  • Header Level Cash Discount For VBRK-VBELN, Where Can I get?

    Hi Experts,
    I know the # of VBELN of VF03 (VBRK), now, I need to pull the data of,
    <b>1- Header Level Cash Discount - Condition Value and
    2 - Header Level Cash Discount - Amount i.e.
    % Value.</b>
    Normally, I know the procedure is,
    (The relationship is )
    KONV-KNUMV = VBRK-KNUMV
    For all the columns the field KONV-KWERT can be used
    But, its ITEM level, where as I am looking for Header Level?
    So, Where Can I get the VBRK-KNUMV Header level,
    1-  Cash Discount Condition Value data? and
    2-  Cash Discount Amount data i.e. %
    Thank you,
    Message was edited by:
            Srikhar

    ThanQ Sheshu,
    No, there is no entry in KONV-KNUMH for KSHCL type of Discounts i.e. SKTV. THere r entries i.e. record #s for Pricing matters! I dont know Y?
    So, It seems to b, I hv to use the follwoing code,
    at new knumv
    SUM (of types KONV-KSHCL = SKTV)
    endat.
    Or Do u hv any other clue? like, other tables searching?
    anyways, thanq

  • Conditions on RFQ Header are not changeable at PO Header level

    Dear Gurus,
    I have maintained a Quotation and enter the conditions on Header level in Quotation. Once i adopt the Quotation in Purchase Order, these conditions are displayed both at Item and Header level and i cannot edit the condition value at PO Header level, they are editable at Item level but not at header level.
    I want to edit them at PO Header level too.
    Please advise.
    Johi Kapoor

    Hi,
    If that is  item condition then you can not change it at header level
    check in M/06 make it at header level  in change which can be made tab
    Regards
    Kailas Ugale

  • Condition Type value -Zero

    Dear all,
    One of my Requirment will fullfill...by entering the Condition value ZERO(0)
    But if i try to enter the value Zero..the value is disapperring.
    Thanks in advance
    regards
    raj.

    Dear Lakshmipathi,
    with  the ref of this thread Milestone Billing(100% ED)..
    i maintained the Header condition type and iam maintaining the value in Billing level.first invoice i'll maintain in header level Full  amount so that system will caluculate full taxes..in 2nd milestone  i need to maintain the doc value as Zero...so that taxes will not come againg.
    Thanks in advance
    Regards
    raj.

  • Discount value not updating at contract header level

    Dear Friends
    I am facing problem of updating discount value at contract header level. The scenario is u2026. my client used to provide certain service to their customer. For that they maintain quantity contract & bill them as per billing plan. When customer avail three or more  services they get 10% extra discount. Now the problem is after continue for some days if some customer wants to drop  one item we are cancelling the line item by assigning proper cancellation procedure but the  system is not reversing the 10% discount.
    Example u2013
    Contract valid for 1st Jan 2009 to 31st Dec 2010(Value for each service = 10)
    (Total no of item-3)
    (Discount-10%)
    Here bill value for each month is  10x3-(30x0.10) =27
    At the month of march 2009  customer decided to drop for one item so hence forth the bill value should be 10x2=20
    But the system is calculating 10x2-(20x0.10)=18
    We need to update the value at contract header level only to satisfy some CRM functionality.
    Please suggest how to solve this issue

    Hi,
    If that is  item condition then you can not change it at header level
    check in M/06 make it at header level  in change which can be made tab
    Regards
    Kailas Ugale

  • How to update condition value using e1edp05 segment during order creation

    Hi,
    I have a requirement where I need to update the item level condition value (komv-kbeter)  to the condition type (komv-kschl) from the incoming idocs (orders05).
    But  the same is configured  in such a way to populate automatically with the default condition value zero during the order creation level using VA01 at condition tab.
    I am able to populate condition values from incoming idoc using segment E1EDP05 which is good, but it was getting created as new entry with the same condition type  instead of updating the condition value to the existing condition type(which got populated from automatically from configuration) .
    So I want to restrict to one entry instead of two with same condition type. Is there any userexit/gap to restrict automatic population of condition type thru programming or to update with idoc (orders05) value rather than inserting as new row?
    My client doesn’t want to restrict the pricing automation from configuration. So I have to handle through programming level.
    Your  inputs are appreciated

    It doesn't really matter if it's a credit/debit memo, it's the same transaction anyway and pretty much the same functionality. What is your requirement exactly? Do you always have to override the price from Siebel or, let's say, some price is automatically proposed and you might or might not need to override it?
    We use a custom (Z..) condition for price override. When a material is entered in VA01, some price (condition PR00, for example) is assigned automatically. Then, let's say, a special price has been negotiated with this customer just for this purchase. So the user goes into Conditions, types in condition code Z... and types in the new price. This basically annuls the previous PR00 condition. I'm not a functional consultant and can't give you all the config details, but your SD person should be able to help.
    I'm still positive that conditions cannot be removed or changed by IDoc. One thing I would suggest for your situation: do not create ZCD2 condition initially and then just add ZCD2 condition when you receive the data from Siebel. Otherwise it seems that you would have to write a user exit or a requirement to deal with the duplicate conditions.

  • Condition value in SD is multiplied every time

    Hello,
    I have one pricing condition (ZH03) which is manualy entered at header level. If I press Activate, this condition is copied to each item (I have 2 items in my test invoice) with the same value. But after every reload of pricing scren, condition value is doubled, so final price is going higher and higher, which is good for as but not so convenient for customer
    Does anybody have similar experience or some advice to me?
    Thanks&regards

    Hello,
    thanks for answer, but I already have this tick in customizing and it doesn't help. Here is the maintenance of the condition:
    Cond. class A
    Calculat.type B
    Cond. category F
    GroupCond X
    RoundDiffCond X
    Header condit. X
    Item condition X
    Delete X
    Amount/percent X
    Scale basis C

  • Standard Condition type used for Manual freight at item level

    Hello Gurus
    Can you please tell me the standard condition type used for entering freight manually at header as well as item level.
    Warm Regards
    Prashant Joshi.

    Prashanth,
    The freight Conditions that we use in Sales are two types
    HD00 - Header Level, wherein we have no access sequence
    KF00 - Item level, Wherein we have access sequence  KF00 - Freight
    But you want the condition types to be maintained manually, then you need item details screen of the respective condition type HD00/KF00 using Tcode V/06.
    Inside that Manual entry as "C". Similarly you need to maintain or activate "Manual" Indicator in pricing procedure. Then you can enter the freight Manually.
    Note:
    The difference In applying at the header level and item level is if you enter freight value at the header level it is applicable to all items in the item level. But if you want to apply freight  we can give freight to each item or selective item.
    Regards
    Sathya

  • Delivery address at Item Level and not at the Header Level

    Hello Experts,
    We are facing an issue as described below:-
    We are in SRM 7.0 using classic scenario.
    After approval of multi line Shopping Cart in SRM ,PR's are getting
    automatically created in backend R/3 system.After converting PR's into
    POs in backend R/3,we are observing that the delivery address for these
    PO'are getting printed at Item level and not at the Header Level
    inspite of the delivery address being same for all the Item level.
    As desired,the delivery address in the PO's should have the delivery
    address at the header level if the the delivery address is identical
    for all the Item Levels.
    However,if we create a PR directly in R/3 system and then convert these
    PR's into PO's in the backend R/3 system,we find that the deliver
    address are getting printed at the Header Level if the delivery address
    is same for all the item level(which is as desired)
    Any pointers will be highly appreciated.
    Thanks & Regards,
    RKS

    It is standard process only.
    In Po delivery address is maintained at item level because to which address perticular material to be delivered,
    this may change from material to material or may not change

  • Delivery address appearing at Item level and not at Header level in PO

    Hello Experts,
    We are facing an issue as described below:-
    We are in SRM 7.0 using classic scenario.
    After approval of multi line Shopping Cart in SRM ,PR's are getting
    automatically created in backend R/3 system.After converting PR's into
    POs in backend R/3,we are observing that the delivery address for these
    PO'are getting printed at Item level and not at the Header Level
    inspite of the delivery address being same for all the Item level.
    As desired,the delivery address in the PO's should have the delivery
    address at the header level if the the delivery address is identical
    for all the Item Levels.
    However,if we create a PR directly in R/3 system and then convert these
    PR's into PO's in the backend R/3 system,we find that the deliver
    address are getting printed at the Header Level if the delivery address
    is same for all the item level(which is as desired)
    Any pointers will be highly appreciated.
    Thanks & Regards,
    RKS

    HI Paul,
    Thank you for your response.In our case even if all the Line/items level have same Plant and storage location still the delivery address is getting printed at Item level and not at Header Level and this is happening only for PO's created from PR's orginating from SRM7.0.
    However if we create PR's directly in R/3 and then convert them into PO's,the delivery address is getting printed at the Header level if the delivery address is same for all the Item level.
    Can you plz some insite into this?
    Your help will be highly appreciated.
    Regards,
    RKS

Maybe you are looking for

  • PAP2t - web page never loads

    Hello! I am trying to update the configuration of a remote PAP2T via the management web pages. The user is on the other end of a private link (a WAN user). I can ping her router's IP, her PAP's IP, and her PC's IP just fine. Calls are (mostly) workin

  • How to get username from Form-based login

    I am using form-based login in my web.xml file. When I attempt to access a protected .jsp page, I get sent to my login page as expected. When I enter my username/password successfully it forwards me to the .jsp page I was trying to go to, as expected

  • I cannot save any document without changing the name

    No matter how slight a change I make, I cannot save a pdf file without giving it a new name

  • Data record with time interval error

    Hi, I have come across the following error. Data record with Time interval error and data is getting loaded into data target and no PSA in between. thanks kris

  • SSAS Cube Measures will not display for all associated dimensions in Excel client

    Dear All, Can you please clarify the below query to me? I have one Calculated Member CM1 and the expression used to calculate is: ([Dimension1].[HierarchyName1].CURRENTMEMBER.Prevmember,[Measures].[Amount]) associated to a Measure Group MG1. Dimensio