Protect Condition Value Column in VA01

I have a security problem on my sales orders: If somebody adds a line and enters the discount Z condition and some number on the value column, SAP updates the Order without going thru the regular checks of discount limit which it does on the amount column.
What I want is to put an if to check if the Amount column its 0, to delete the number on the condition value column, I have tried with ' ' but the value turns to cero and it does not show an error.
Here its the code:
IF xkomv-kbetr = 0.
        MOVE '' TO xkomv-kwert .
        MODIFY xkomv INDEX sy-tabix.
    ENDIF.
Regards,
Carlos
Edit: or if somebody knows how to make screen input = 0 (gray) for the Value Column that would be great.
Edited by: Carlos Salazar on Jul 9, 2010 4:09 PM

turns out 0 its correct as it will not get saved.

Similar Messages

  • Why "condition value column" is there 2times in sales order under condition

    Hi Friends,
    Can any one say that why "condition value column" is there 2 times under condition tab  in sales order and in which scenario it will be useful.
    Thanks in advance
    JM.

    Hi JM,
    Suppose you r using conduction XYZ ok for that xyz conduction one access sequence is maintain for example AOO1 ok now just go in V/07 tcode for access sequence select your access sequence AOO1 from given option go inside one exclusion indicator is their make sure it is market tick for all access  
    If u r not clear.
    U r always welcome to ask question.
    Ahmed

  • Gray (only display) in base condition value column VF01

    We have Manual conditions for discount, the problem its that if in a new empty row you add the Condition Type (Cn Ty) and an amount in the condition value column, SAP will take it without doing any check (like in the Amount Column).
    So I require to gray out the condition value column (KOMV-KWERT) just like the column on the right (KOMV-KWERT_K) so no value can be entered this way for 2 discount conditions we use.
    I understand that some code in USEREXIT_FIELD_MODIFICATION  may do this, anyone has experience on this?
    Best Regards,
    Carlos

    I hope I understood your question properly.
    I assume you know how it works in the condition tab. When you enter condition type and enter the value. It will multiply the value with the number of material you entered in the sales order, and place the value in the condition value column.
    When you have manual condition discount condition it means you enter the value manually. If it is percentage basis it will calculate on the price (for instance PR00). If you do not want to enter it as manual the easy solution would be to uncheck the manual check box in the pricing procedure that you use V/08 and if you want to generate automatic values as you might know, create condition records for this condition type in VK11.
    For any particular you want to leave it as manual but to make it grayed out, as you already knew you can do it with user exit or another way with user exit would be, order can be blocked if there some changes done manually and later someone with proper authorization can approve the change and release it.

  • Pricing amount and condition value in sales order

    Hi all,
    I have noticed for a sales order we are not able to see condition type amount, condition value in sales order even though it shows net price finaly ofr a sales order. Not even able to select the condition lines.
    To be specific not able to find value in field KBETR  - amount column and KWERT - condition value column
    When we go to sales order line item and select condition tab, do see value displayed in Amount and Condition column. Is there are specific reason it is doing visa vis in our production we see both values.
    Advise what could be the reason value not getting displayed in Amount and Condition value column.
    thanks

    It is due to auth for specific columns we have solved the problem.

  • Restrict display of Condition Value in the Conditions tab in Purchase Order

    Dear All,
    We have a requirement that in the Conditions tab the condition value column should be displayed as blank to users other than those related to Purchasing and Costing.
    I have checked that there are no standard authorization objects to restrict these.
    Any inputs on how to achieve this?
    Thanks!
    Tejasav

    Hi,
    you can influence fields using BADI ME_PROCESS_PO_CUST. I don't think that you can disable just your field but you should be able to hide whole tab "Conditions". So you can perform your own authorization check in implementation of this BADI and then display or hide tab.
    Cheers

  • Changing KBETR value on condition table(XKONV) in VA01/VA02

    Hi Experts,
         I need your help, i am trying to change the KBETR value on condition table XKONV.
    user exit name : MV45AFZZ.
    FORM NAME  : USEREXIT_SAVE_DOCUMENT.
    it's allowing me to change the values but those changed values are not saving in the database. how can do this and is there any usexit or BADI to change the condition values(xkonv).
    i am waiting for ur answers.
    Thanks & Regards.
    Priya Papana.

    Hi!
    Try using this, this is working in modifications modus (VA02):
    LOOP AT xkonv.
    IF xkonv-updkz IS INITIAL.
    MOVE-CORRESPONDING xkonv TO ykonv.
    APPEND ykonv.   "old line
    xkonv-updkz = 'U'.   "if there was not manual modification
    do your modifications
    ENDIF.
    MODIFY
    ENDLOOP.
    In VA01 it is a bit other, because all of the items has the UPDKZ = 'I' code, so there is no need for this modification, only yours.
    Test it a lot!
    Regards
    Tamás
    Message was edited by:
            Tamás Nyisztor

  • How to get xkomv-kwert (condition value) from a pricing condition ZZP1

    Hi experts,
       I have a pricing condition zcust that I need to modify in the sales order.   The calculation of ZCUST is dependent on the condition value in another price condition ZZP1.   The price for ZZP1 is a fixed amount of $6 which is split among line items in the order.    In sapmv45A, when the code hits userexit_save_document_prepare, the value of xkomv-kwert (condition value) exist.   In other user-exits in sapm45A, I was unable to find xkomv-kwert.  My question is:  How can I find the value of xkomv-kwert  as i don't  know how ZZP1 is calculated ??  There is no routine attached to ZZP1.
        THE ZCUST has a routine 993 which is similar to 3.   Here in program saplv61A, i was trying to get xkomv-kwert for ZZP1 but unable to get any data.   Can anyone suggest where i can get the data (xkomv-kwert) for ZZP1 in saplv61a ?
    I looked at userexit_xkomv_bewerten_end in saplv61a but it does not help.
    XKomv-kbetr  always has data.    If i have ZZP1 data, then i can modify ZCUST.
    Many thanks.
    Joyce

    Hi Jelena,
      In VOFM, it is Formula/Condition Base Value for routine 993.   In Pricing Procedure, it falls in column "Base Type" for 993.
    Let's see if i can simplify this: In a sales order with 2 line items:
                   prices                    Amt                      Condition Value (USD)
    Line 10     ZS1   sell price     2.30                                 1150
                     ZPP1 charge        6.36                                 3.40  (note the distribution **)
                     ZL1                      3                                      3
                    ZR1 %                  1.000%                            11.50
                    ZR2                      0.01                                   5
                    Suggested price =  2.35                             1172.90
                      ZCUST               2.34                                1170
                      total price            2.34                               1170  
    Note:  The ZCUST price is wrong.  It is missing the ZPP1 charge which is 3.40.  Zcust should be 1170 + 3.40 = 1173.40
    Line 20     ZS1   sell price     25                                 1000
                     ZPP1 charge        6.36                                 2.96  (note the distribution **)
                     ZL1                      3                                      3
                    ZR1 %                  1.000%                            10
                    ZR2                      0.01                                   0.6
                    Suggested price =  25.41                              1016.56
                      ZCUST                   25.34                           1013.60 (should be 1013.60 + 2.96)
                   Total price                25.34                            1013.60
    You can see the ZCUST is calculated incorrectly.  The routine calculate zcust as $1170 and $1013.60 for each item which did not include the distribution amount of  ZPP1 ($3.40 and $2.96).  
    When i debug the routine, the xkomv-kwert is zero.   I  am trying to get $3.40 and $2.96 so i can add to to zcust in the routine.
    Am trying to determine in saplv61A at which include that i can see #3.40 and $2.96 for both line items in xkomv-kwert.
    Then maybe i can modify the routine or saplv61A so it shows the correct zcust price  after entering the 2 line items in the sales order  create (VA01) ?     Can you pls suggest  ?
    If i make the changes in USEREXIT_SAVE_DOCUMENT_PREPARE, then user cannot see the correct zcust until the order is saved.  This would be too late to know the zcust price ahead of time.
    Pls view in the Edit mode... i see my texts have been compressed.
    Many thanks
    Joyce
    Edited by: Joyce Chan on Jul 9, 2009 10:24 PM
    Edited by: Joyce Chan on Jul 9, 2009 10:25 PM

  • Condition value is not displaying in sales order

    Hi Friends,
    when i am creating sales order, condition type(JEXP,JECP,JA1X..) is displaying in cond.type column and percentage(14%,2%,1%) is displaying in amount column and
    the condition value is not displaying in cond. value column in conitions tab of  sales order.
    In analysis it is showing as condition record found...
    please help me...
    with regards

    Hi,
    can it be that you have a problem with units of measure? Often, if there is no value in Condition value, the problem is in the master data of material. Did you use standard schema? If you not, have you tried it with standard schema? What is your value under "per" and "UoM"?
    Regards Thomas

  • 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.

  • ABAP code in to JAVA for overwritting condition value for IPC pricing

    Dear experts i am an IPC JAVA developer and i am trying to translate an ABAP Routine in to JAVA code for overwriting condition value in the pricing user exit of IPC
    Here is the ABAPcode segment i am trying to transulate
      DATA: l_kdkg1  LIKE komk-kdkg1,
            l_work TYPE f,
            l_umren LIKE marm-umren,
            l_umrez LIKE marm-umrez.
      SELECT SINGLE peinh FROM mbew INTO mbew-peinh         
      WHERE matnr = komp-matnr
      AND bwkey = komp-werks.
      I need some  help in the following things
      1. I don't know how to transulate the following Line of ABAP code into JAVA
         " AND bwkey = komp-werks."
    Bwkey stands for plant details. I don't know how to get plant details from  Pricing Item.
      2. Someone please tell me weather the following JAVA transulation is correct
      Vector x = prItem.getUserExitConditions();
      db database = pricingEngine.getDatabase();
         // set table name
      String tableStart = "mbew";                                             
         // set query parameters
      sys_query_pair[] queryPair = null;
      //matnr = komp-matnr . Getting the material Number
      String materialNo= prItem.getProduct().toString();
      //bwkey = komp-werks.Getting plant.
      // TODO: werks stands for plant. Not sure how to get it from prItem
       String plant = "";
       queryPair = new sys_query_pair[2];                    
       queryPair[0] = new sys_query_pair("matnr", materialNo);
       queryPair[1] = new sys_query_pair("bwkey", plant);
      // set query columns
       String ZZFIELDStart = "peinh";
       String ZZFIELD_VALUEStart;                   
       String[] projectionStart;
       projectionStart = new String[];
       BigDecimal pricingUnit = null;
       try{     
          // execute query
          res resultSetStart = database.db_read_table(tableStart, queryPair,projectionStart) ;
          if (!res.db_empty_results_p(resultSetStart))
         ZZFIELD_VALUEStart = resultSetStart.db_get_row_element_string(0);
         pricingUnit = new BigDecimal(ZZFIELD_VALUEStart);
         resultSetStart.db_finish();
       else
         System.out.println("Coudn't find a value of field peinh in table mbew!");
       catch (exc_database_error e)
         e.printStackTrace();

    Please login to the server where IPC is installed. In the IPC folder u find libs folder  or search for docs in IPC folder. There it is dealt how ABAP routines are mapped to  user exits in java coding
    Thanks
    Surya

  • How to split a condition value across line items with varying percentages?

    Hello, can anyone suggest how this can be resolved.  This is the scenario. 
    My client wants to be able to determine pricing for a sales document with a wide range of conditions.  One particular condition contributes to the total price of each sales item by determining a percentage of the total amount.  The percentage used isn't a fixed percentage but it is determined as follows:  Lets say I have 3 sales items in the document  with prices 200, 300 and 500 respectively.  The total amount for the condition (which is known) then has to be shared amongst these 3 items according to the price of each item.  How can this be achieved?  Any ideas?

    You will have to define a Header Condition which will apply to all the Items.
    Then, You will have to develop a Z- Requirement in T-Code - VOFM with help your ABAPer.
    Then assign this Routine in Alternative formula for condition base value column in your Pricing Procedure.
    The ABAP code in the Requirement will read the Basic Price of all the Items & then proportionately divide the value of said Condition line-item wise.
    Hope this clarifies.
    Thanks,
    Jignesh Mehta

  • BAPI_SALESDATA_CREATEFROMDAT2 Changing Condition Value

    Hi,
      when I use  BAPI_SALESDATA_CREATEFROMDAT2  to changeing condition value
      wa_order_conditions_in-itm_number  = '000010'.
      wa_order_conditions_in-COND_ST_NO  = '010'.  
      wa_order_conditions_in-COND_COUNT  = '01'. 
      wa_order_conditions_in-cond_type   = 'PR01'.
      wa_order_conditions_in-applicatio  = 'V'. 
      wa_order_conditions_in-cond_value  = '1900'.
      wa_order_conditions_in-currency    = 'RMB'.
      wa_order_conditions_in-cond_p_unt  = '1'.
      wa_order_conditions_in-cond_unit   = 'PC'.
      wa_order_conditions_inx-itm_number = '000010'.
      wa_order_conditions_inx-COND_ST_NO = '010'.  
      wa_order_conditions_inx-COND_COUNT = '01'.    
      wa_order_conditions_inx-cond_type  = 'PR01'.
      wa_order_conditions_inx-updateflag = 'U'.
      wa_order_conditions_inx-cond_value = 'X'.
      wa_order_conditions_inx-currency   = 'X'.
      wa_order_conditions_inx-cond_p_unt = 'X'.
      wa_order_conditions_inx-cond_unit  = 'x'.
      APPEND wa_order_conditions_inx TO  
             i_order_conditions_inx.
      APPEND wa_order_conditions_in TO
             i_order_conditions_in.
      CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
           EXPORTING
                order_header_in      = wa_order_header_in
                order_header_inx     = wa_order_header_inx
           IMPORTING
                salesdocument        = salesdocument
           TABLES
                order_conditions_in  = i_order_conditions_in
                order_conditions_inx = i_order_conditions_inx.
    run it i get a Sales order when i look the item conditions
    i found it add a new condition line like :
      PR01 1800.00  RMB ... (automatic price which can
                             be deleted and modifide manual  
                            in 'VA02')
      PR01 1900.00  RMB ... (I expected)
    but I only want to get one line
      PR01 1900.00  RMB ...
      now i don't know the reason,
      my version is R/3 3.6C
      wa_order_conditions_in-itm_number = '000010'.
      wa_order_conditions_in-COND_ST_NO = '010'.  
      wa_order_conditions_in-COND_COUNT = '01'. 
    '000010','010', '01'
      is found in BAPISDORDER_GETDETAILEDLIST by creat in va01 and look it in BAPISDORDER_GETDETAILEDLIST.

    Hi Pan!
    The handling of the conditions is quite tricky. Have a look at OSS 593246 for some hints.
    Have also a look in some other linked topics:
    BAPI_SALESORDER_CHANGE conditions
    BAPI_SALESORDER_CHANGE- No Pricing Condition Change
    Regards,
    Christian

  • Query performance based on condition value

    Hi,
    I have a simple query which is actually on a view dwdb_dba.actl_partinfo_cust. Please see query bellow
    select * from dwdb_dba.actl_partinfo_cust WHERE insertdatetime=(select max(insertdatetime)
    from dwdb_dba.actl_partinfo_cust Where system_source='UTS') AND SUPPLIERID='CG1' and Custdevice in ('BT-M2789-C')This query is taking very very long time to return (around 30 records) but if i u
    Here if i change the condition "AND SUPPLIERID='CG1'" to "AND SUPPLIERID='DUMMY'", it returns within 3 seconds. Execution plan is same for both then why one query taking too much time and other returning so fast and how can i tune the query against the condition AND SUPPLIERID='CG1' so that it can also return within 3 seconds.
    I actualy dont understand the behaviour
    PLAN_TABLE_OUTPUT
    Plan hash value: 3622663398
    | Id  | Operation                       | Name                        | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                |                             |    10 | 42790 |   152K  (6)| 00:00:59 |
    |*  1 |  VIEW                           | ACTL_PARTINFO_CUST          |    10 | 42790 | 59972   (4)| 00:00:23 |
    |   2 |   UNION-ALL                     |                             |       |       |            |       |
    |*  3 |    TABLE ACCESS BY INDEX ROWID  | ACTL_PARTINFO_CUST_UTS      |     9 |  3429 | 59968   (4)| 00:00:23 |
    |*  4 |     INDEX RANGE SCAN            | ACTL_PART_CUST_UTS_IDX3     |   420K|       |  1462  (11)| 00:00:01 |
    |*  5 |    TABLE ACCESS BY INDEX ROWID  | ACTL_PARTINFO_CUST_PROMIS_4 |     1 |   311 |     4   (0)| 00:00:01 |
    |*  6 |     INDEX RANGE SCAN            | ACTL_PARTINFO_CUST_4_IDX1   |     1 |       |     3   (0)| 00:00:01 |
    |   7 |   SORT AGGREGATE                |                             |     1 |    14 |            |       |
    |   8 |    VIEW                         | ACTL_PARTINFO_CUST          |  1363K|    18M| 92040   (8)| 00:00:36 |
    |   9 |     UNION-ALL                   |                             |       |       |            |       |
    |* 10 |      TABLE ACCESS BY INDEX ROWID| ACTL_PARTINFO_CUST_UTS      |  1363K|    33M| 92036   (8)| 00:00:36 |
    |* 11 |       INDEX RANGE SCAN          | ACTL_PART_CUST_UTS_IDX1     |  1481K|       |  5528  (10)| 00:00:03 |
    |* 12 |      TABLE ACCESS BY INDEX ROWID| ACTL_PARTINFO_CUST_PROMIS_4 |     1 |    15 |     4   (0)| 00:00:01 |
    |* 13 |       INDEX RANGE SCAN          | ACTL_PARTINFO_CUST_4_IDX1   |     1 |       |     3   (0)| 00:00:01 |
    ---------------------------------------------------------------------------------------------------------------Thanks

    Salman Qureshi wrote:
    This query is taking very very long time to return (around 30 records) but if i u
    Here if i change the condition "AND SUPPLIERID='CG1'" to "AND SUPPLIERID='DUMMY'", it returns within 3 seconds.
    My developer has changed the code of the view which was involved and not it is working fine but still i m curious to know that what could be the reason of this. Same execution plan but only condition value is different. One value returns some rows but returns within few seconds and other condition also returns a few rows but may hours.Salman,
    A bit more details would help diagnose the root cause.
    If you are still interested in diagnosing the root cause, you may want to provide complete EXPLAIN PLAN output, along with predicate section. If you are on 10g, you may want to provide the output of DBMS_XPLAN.DISPLAY_CURSOR which will show the actual plan used along with actual number of records generated by each step in the execution plan.
    It is possible that SUPPLIERID column data is skewed so that there are less records in table for the value 'DUMMY' but much more number of records for the value 'CG1'. This predicate combined with the other predicate on CUSTDEVICE column may have been resulting in similar number of rows the final query returns.
    It is possible that the predicate on CUSTDEVICE is being applied at different stage in the plan than the predicate on SUPPLIERID column.
    Edited by: user503699 on Aug 3, 2010 3:11 PM

  • Condition value currency based on amount currency in sales order creation

    Hi all,
          I have a requirement where during creation of a sales order with line items in the conditions tab where if condition type is EDI2 the amount currency should be USDN and accordingly condition value currency should also be changed to USDN.
    I found the exit to acheive this and succeeded in changing the amount currency to USDN but condition value  currency is also changing but for all above condition types.
    I am using form userexit_field_modific_kzwi.
    loop at xkomv where kschl = 'EDI2'.
    XKOMV-WAERS  = 'USDN'.
    MODIFY XKOMV INDEX SY-TABIX TRANSPORTING WAERS .
    select single waers into komk-waerk from TCURC where waers = xkomv-waers.
    endloop.
    Thanks & Regards
    Jerry

    Hi Vindo,
    Thank you for your replay.
    There is no Net value column in pricing procedure. Am able to change the Net value in the condtion tab of  Item level but the problem is , the change is  not  reflected in condition tab of sales order header net value.This is creating a problem when we try to post the invoice document .
    Cheers,
    sravan.
    Edited by: Rob Burbank on May 7, 2010 4:30 PM

  • Condition Values not being copied when creating sales order with reference

    hi experts
    i am copy a sales order with reference in va01 , when i copy the order it status is shown as incomplete beacue the condition values in some condition type sis zero, whereas if i delete amount for some condition type and re-eneter it the condition values for all conditon types appears ...
    in all after copying order i go to condition at item level some codition values are zero but if erase amount for any condition type and then re enter it value comes for all condition types

    Hi Sunny,
    Maintain some value against that condition type in VK11.
    This must solve your question. Please set to resolved if it solves your doubt.
    Regards
    Abhii....

Maybe you are looking for

  • No longer able to delete photos

    To make it easier to access the iPhoto library from multiple users on our computer, I moved the iPhoto Library to /Users/Shared/Pictures and set up permissions so that only the owner has write permission and other users are read-only (we had to do th

  • Document on 1131 Access point

    Please provide the documentation to configure 1131 Access Point. We are getting documentation for 1130 and not for 1131. Help wouldl be highly apprecited.

  • Processing time in NWBC

    We are seeing real delays in the processing time in NWBC compared to regular SAP, is there anything we can do to improve this performance? Vickie

  • How to tweak hyperlinkExternalPageDestinations

    Hi there, I don't know if this is an InDesign or Acrobat problem: I am generating in INDD CS3 a table of contents with hundres of links to external PDF files for distribution on a CD. The text contains hidden markers which I convert via a script to h

  • Generic "course-group' label in search results

    When searching on our "What Great Bosses Know" podcast for the Poynter Institute - the results display the label "course - group" in the Collections column instead of the actual titles. This began to occur after the recent redesign of the admin tools