Currency field validation

Hi All,
For SRM-MDM catalog workflow, I want to write a currency field validation to find out the catalog item data records where difference between the original price and the new price for the same catalog item data is greater than 1%.
So as a precursor to the final validation expression, I wrote a very primitive validation expression like:
IF((Contract Price.Amount - [Original].Contract Price.Amount)>1,FALSE,TRUE)
And I was expecting that this should return a FALSE boolean value whenever difference is greater than 1. But surprisingly, irrespective of the difference in the amount, it always returns a TRUE value.
I am wondering whether it is a problem with the validation expression or is it a bug? I am working on SAP MDM 5.5 SP04 Patch 02 (5.5.63.71).
Any suggestions would be appreciated.
Thanks,
Satyen

Hi Nisha,
Thank you for your reply.
As I had mentioned in my previous post, irrespective of whether, amount value is incremented or decremented, it always returns FALSE.
Syntactically and logically, your validation expression is correct but still it always return an error message (a FALSE value).
What do you reckon, is it a bug in the MDM software?
Regards,
Satyen

Similar Messages

  • Validated the currency field in WEB

    Dear all,
    I have a develop a new WEB SRM screen, but I'm not managing to validate the Currency field when the user puts letters.
    The field is of type CURR and when the user hits "enter" it puts all letters in CAP but doesn't sends any error message.
    Anyone had this problem?
    Thank you in advanced,
    Vasco Pires

    Hi Masa,
    The screen works corretly when we run it on SAP Gui, the field has the type CURR, but when we executed on web, with a its web interface:
    <input type="text" name="ZDADOS_FACT-PRC_NOVO[`j`]"  value="`ZDADOS_FACT-PRC_NOVO[j].value`"
              maxlength="17" size="10">
    But when the users inputs the price, the system doesn't send the error box with the error message.
    Thank you for your support,
    Vasco

  • Field Validation on Custom Obj. 4:  Value of one field making other Req.

    Hello All,
    I have been working on a field validation problem for a while. I have a custom Picklist on CO4. This picklist has two values YES and NO (a checkbox does not meet requirements). What I need to do is If Picklist='YES' then FieldA, FieldB, and FieldC are Required else they are not required. FieldA = Text (short), FieldB = Date, and FieldC = Currency. I've tried numerous ways to validate on Fields A, B, and C with statements like IIf(Picklist=LookupValue(Picklist,"YES"),FieldA<>NULL,FieldA) or IIf(FieldValue(Picklist)="YES",FieldA<>NULL,FieldA) etc... these were just my latest attempts at this point I'm jsut trying random things to try to get it working. I am probably using incorrect syntax (even though it passes the sytax checker). If anyone has any suggestion let me know. Also if I haven't made clear what it is I'm attempting to do let me know and I'll try to clarify.
    Thanks,
    Z

    Hi,
    if I understand correctly, you want this functionality:
    If Picklist = NO => it doesn't matter what values are contained in Field A, B and C.
    If Picklist = YES => Field A is not null and Field B is not null and Field C is not null
    To trigger the validation when the picklist value changes then you have to configure the Field Validation for the Picklist:
    [<Picklist>]=LookupValue("Picklist","NO") OR ( Len([<Field_A>])>0 AND Len([<Field_B>])>0 AND Len([<Field_C>])>0 )
    You have to put the validation also on Field_A and Field_B and Field_C, because in case of an update of , let's say, Field_B, you should prevent that Field_B is blanked.
    If someone updates only Field_B and he doesn't change the value of the Picklist, the validation expression put on the Picklist is not evaluated.
    Simona

  • Currency fields on Adobe Interactive Form

    Hello,
    I have placed a currency field on the Adobe Interactive Form.
    Local has been set to 'Viewer's System Locale'.
    But if I try to put any amount in this field, the following error message is displayed:
    "Distance Between Separators for Thousands Must Be 3."
    I tried with following amounts:
    10000
    10000.54
    10
    1
    Note that my default decimal point is '.'.
    Regards
    Sagar

    Sagar,
    Goto Object Palette --> Value Tab --> Check if you set any Validation Pattern for the currency field.
    If you don't want, remove the validation.
    Chintan

  • Currency Field?

    Hi there,
    Does LiveCycle Designer not have a currency field as a field type?  It has numeric and it has text, but no currency?  Do I really have to manually tell this expensive program how to accept currency values such as the oh so uncommon US dollar sign? 
    I set my field type as "Numeric" and in "Validation Pattern" I listed the following for the "Validation" and "Edit" patterns:
    zero{0}|num{zzzzzzzzzzzz9}|num{z,zzz,zzz,zz9}|num{zzzz9.zzz}|num{z,zzz,zz9.zzz}|num{zzzz9. 999}|num{z,zzz,zz9.999}|num{$z,zz9.99}
    I listed the following for the "Display" pattern:
    zero{0}|num{$z,zz9.99}|num{$zz,zz9.99}|num{$zzz,zz9.99}
    When I test the field, it does not allow me to enter the dollar sign ($) in the field.  For example, if I enter "$123" into the field then exit the field the data then disappears. I can enter "123" and it converts it to $123.00 when I exit the field, which is what I want.  However, our users need to also be able to enter the US dollar sign and not have their data disappear if they do. 
    Please help.
    Thank you.

    You can allow characters other than numbers in numeric fields when you use quotes.
    Here an example for an edit pattern:
    null{}|zero{9.88}|num{'$'zz9.88}|num{zz9.88'$'}|num{'$ 'zz9.88}|num{zz9.88}|num{}
    It allows $123, $ 123, 123.45, 123.45$ and 123.45 $
    The decimal places are optional if you use the 8 pattern after the dot.
    And here is the display pattern.
    null{9.99 $}|zero{9.99 $}|num{zz9.99 $}

  • Opportunity field validation

    Hello i used the opportunity field validation by using the guided example of IIF syntax, the syntax given in the R17 help is IIf([<PrimaryBillToState>]='OK' OR [<PrimaryBillToState>]='TX', 'Central', IIf([<PrimaryBillToState>]='CA', 'West', 'East')) , as per this i made a role on my approval page with the below syntax :
    IIf([<plCompetetive_Process_YN_ITAG>]='Yes' OR [<plNew_Geography_for_Existing_CustomersYN_ITAG>]='Yes', 'Pending Approval', IIf([<plCompetetive_Process_YN_ITAG>]='No'AND [<plNew_Geography_for_Existing_CustomersYN_ITAG>]='No', 'Change the Status to AD', 'Pending Approval')) but it is not workine fine. Could you please update on this ASAP.
    Thanks
    Subbu

    Suresh,
    Try these:
    On the SalesStage ID field:
    IIf(="AAAA-AAAAA", Currency>=1, '')
    where 'AAAA-AAAAA' is the RowID of the Closed/Won salesstage, which you can find by opening the detail page of the Closed/Won salesstage and looking at the html source.
    If that doesn't, this might?
    On the currency field:
    IIf(=0 OR Null, SalesStage<>'Closed/Won','')

  • Calculations with Currency fields

    Hi Experts,
    Could you kindly throw some light on how Currency fields are processed in the Dictionary? How does the system calculate the local currency?
    For example, let us consider table BSAK,  I see the fields WAERS(Curr key), DMBRT (Amount in local currency) and WRBTR (Amount in document currency).
    How do I calculate the total Amount for a given values of
    LIFNR, BUKRS,GJAHR, MONAT and SHKZG = 'S' ?
    Do I just add all the DMBTR values?
    What would be the local currency be?
    Kindly advice.

    Hi Vimal,
    The fields DMBRT and WRBTR hold the amount whereas the field WAERS specifies the currency key of these fields . That is whether they are in Indian Currency ( IND ) or is it US Dollars ( USD ) etc... The Table to hold the currency keys is TCURC. You can find this table as a value table in the domain of the field WAERS.
    So if you have to calculate the currencies you have to check with their currency keys if the currency key is same then you Add the prices.
    Try to write this code in ABAP Editor :
    *"Table Declarations...................................................
    TABLES :
      sflight.                             " Flight
    *"Select Screen Elements...............................................
    SELECT-OPTIONS :
      s_carrid FOR sflight-carrid.         " Carrier ID
    *"Data Declarations....................................................
    * Work Variables                                                      *
    DATA :
      w_gross    TYPE p DECIMALS 2,        " Holds Gross Value
      w_net      TYPE p DECIMALS 2,        " Holds Net Value
      w_curr     LIKE sflight-currency.    " Holds Currency
    * Internal table to hold Flight data                                  *
    DATA :
      t_sflight LIKE
       STANDARD TABLE
             OF sflight.
    *                       TOP-OF-PAGE EVENT                             *
    TOP-OF-PAGE.
      PERFORM top_of_page.
    *                    AT SELECTION-SCREEN EVENT                        *
    AT SELECTION-SCREEN.
      PERFORM at_selection_screen.
    *                    START-OF-SELECTION EVENT                         *
    START-OF-SELECTION.
      PERFORM fetch_sflight_data.
      PERFORM display_sflight_data.
    *&      Form  top_of_page
    * This Subroutine Performs the Event Top-Of-Page
    *  There are no interface parameters to be passed to this subroutine.  *
    FORM top_of_page .
      WRITE :/45 text-001.
      ULINE.
    ENDFORM.                               " FORM TOP_OF_PAGE
    *&      Form  AT_SELECTION_SCREEN                                      *
    * This Subroutine Performs the Required Input Validations              *
    *  There are no interface parameters to be passed to this subroutine.  *
    FORM at_selection_screen .
      SELECT carrid                        " Carrier ID
        FROM sflight
        INTO TABLE t_sflight
       WHERE carrid = s_carrid-low.
      IF sy-subrc NE 0
      AND s_carrid-low NE space.
        MESSAGE e184(bc_global) WITH text-007.
      ENDIF.                               " IF SY-SUBRC NE 0
      SELECT carrid                        " Carrier ID
        FROM sflight
        INTO TABLE t_sflight
       WHERE carrid = s_carrid-high.
      IF sy-subrc NE 0
      AND s_carrid-high NE space.
        MESSAGE e184(bc_global) WITH text-008.
      ENDIF.                               " IF SY-SUBRC NE 0
    ENDFORM.                               " AT_SELECTION_SCREEN
    *&      Form  FETCH_SFLIGHT_DATA                                       *
    * This Subroutine Fetches Data from the Database table Sflight         *
    *  There are no interface parameters to be passed to this subroutine.  *
    FORM fetch_sflight_data .
      SELECT carrid                        " Carrier ID
             connid                        " Connection ID
             fldate                        " Flight Date
             price                         " Price
             currency                      " Currency
             seatsmax                      " Seats Maximum
             seatsocc                      " Seats Occupied
        FROM sflight
        INTO CORRESPONDING FIELDS OF
       TABLE t_sflight
       WHERE carrid IN s_carrid.
    ENDFORM.                               " FORM FETCH_SFLIGHT_DATA
    *&      Form  display_sflight_data
    * This Subroutine Displays Data from the Database table Sflight        *
    *  There are no interface parameters to be passed to this subroutine.  *
    FORM display_sflight_data .
      LOOP AT t_sflight INTO sflight.
        AT FIRST.
          FORMAT COLOR 1.
          WRITE :  /5  'Carrier ID'(002),
                  140  space,
                  /25  'Flight Date'(003),
                  140  space,
                  /44  'Seats'(004),
                   65  'Seats'(004),
                  140  space,
                  /44 '(Maximum)'(005),
                   65 '(Occupied)'(006),
                  140   space.
          ULINE.
        ENDAT.
    *" AT NEW CONNID
        AT NEW connid.
          FORMAT COLOR 6 INTENSIFIED OFF.
          WRITE :/  sflight-carrid   UNDER text-002,
                 10   sflight-connid.
        ENDAT.                             " AT NEW CONNID
        FORMAT COLOR 5 INTENSIFIED OFF.
        WRITE :/  sflight-fldate   UNDER text-003,
                  sflight-seatsmax UNDER text-005,
                  sflight-seatsocc UNDER text-006,
               90 sflight-currency,
              110 space.
        w_gross = w_gross + sflight-price * sflight-seatsocc.
        w_curr = sflight-currency.
    *" AT END OF CONNID
        AT END OF connid.
          FORMAT COLOR 3 INTENSIFIED OFF.
          WRITE :/ 'Total Bookings so far '(009),
                 40 w_gross,
                 60 w_curr.
          w_net = w_net + w_gross.
        ENDAT.                             " AT END OF CONNID
    *" AT END OF CARRID
        AT END OF carrid.
          SKIP 2.
          FORMAT COLOR 3 INTENSIFIED ON.
          WRITE :/ 'Total Bookings so far for '(013),
                   sflight-carrid,
                   w_net,
                   w_curr.
          ULINE.
          CLEAR w_gross.
          CLEAR w_net.
        ENDAT.                             " AT END OF CARRID
      ENDLOOP.                             " LOOP AT T_SFLIGHT...
    ENDFORM.                               " FORM DISPLAY_SFLIGHT_DATA
    This is to sum the prices of a flight according to currency key
    Regards,
    Swapna.

  • Currency field in alv report

    hi
    i have to display the currency field o/p with diff. currencies according to countries.how can i do that.

    Hi,
    see example program ERGP2070. It is doing something similar to your requirement.
    It is declaring currency as a separate field 'WRG'. and for amount field, setting CFIELDNAME field as 'WRG' and DO_SUM = 'X'.
    try this.
    Regards,
    Satish

  • Trying to create a Field Validation Expression and need help

    I have a picklist field and another field that are in question. I want to set some sort of rule that forces the second field to be populated only If specific values are selected from the picklist field.
    I was going the route of a field validation Rule, but everything i've tried so far does not produce the results i am trying to achieve.
    The first type of expression i tried was:
    ([<plProduction_Print_Account_Category_ITAG>] <> LookupValue("OCC_CUST_LOV_ACCOUNT_1", "No Production Print") AND ([<stSIC_Code_ITAG>] IS NULL))
    This is generating the field validation error message when i select any of the correct values from the picklist. the problem is still the second field, which will generate the error if a value is entered into the second field, regardless of the picklist value selected. Switching the "IS NULL" to "IS NOT NULL" only reverses the problem on the second field, causing the error to generate when the second field is updated to a NULL or blank value.
    I also tried :
    = 'No Production Print' AND [<stSIC_Code_ITAG>] IS NOT NULL
    and got similar results.
    ([<plProduction_Print_Account_Category_ITAG>] = LookupValue("OCC_CUST_LOV_ACCOUNT_1", "No Production Print"))
    Similar results as well.
    Does this need to be an IIF statement? Do I need to make this a workflow expression instead? i could really use some help as I have tried everything i can think of and admit, i'm not the expression guru!!!. Any assistance would be appreciated.
    TeknoMan

    Yes we have the same request and we used the following expression. Example we have a field "Método de pago" ( [<plMtodo_de_pago_ITAG<]), it's values are "CHEQUE and DEPOSITO" if we select DEPOSITO three more fields were requiered Route, Sucursal de banco and Clabe so we have to put this validation in the four fields including Metodo de pago.
    [<plMtodo_de_pago_ITAG>] <> "DEPOSITO" OR ([<Route>] IS NOT NULL AND [<nSucursal_de_banco_ITAG>] IS NOT NULL AND [<stCLABE_ITAG>] IS NOT NULL)
    well in the field CLABE we put the following [<plMtodo_de_pago_ITAG>] <> "DEPOSITO" OR ([<Route>] IS NOT NULL AND [<nSucursal_de_banco_ITAG>] IS NOT NULL AND [<stCLABE_ITAG>] IS NOT NULL AND Len([<stCLABE_ITAG>])=18) this was because the len of the value must be 18 characters.
    I hope this works for you
    Regards Catalina Valadez
    Edited by: CatalinaV on 12/03/2009 10:54 AM
    Edited by: CatalinaV on 12/03/2009 10:55 AM

  • Summary report treats a currency fields as text

    In the summary report I have three charts with the currency field. The two charts show 'average' and 'total' but the other chart shows 'percentage' of responses - in other words the report treats that field not as a number but as text. The filed is designated as a currency in the desing view. Why is it treated as text?

    Hi,
    The percentage of responses is a reference for the responses of that field.  If you don't want it to show, you can disable it.
    Hope this help,
    Perry

  • ROUND OFF IN CURRENCY FIELD

    Hi,
    In my report I am displaying the currency field NETWR in ALV Report.
    Now, the requirement is as such-
    For eg- If the value of NETWR field is 57,441.50 then I want to round it off to display only 57(assuming that all values in thousands) i.e 57,441.50 would be considered as 57,000 only.
    I think there is some functional module to solve this problem.
    Can somebody help me regarding the same,points will be rewarded.

    Hi friend
    Try this.
    Check this sample:
    DATA: WA_INPUT TYPE P DECIMALS 8,
    WA_OUTPUT TYPE P DECIMALS 2.
    WA_INPUT = '5678.65800341'.
    CALL FUNCTION 'ROUND'
    EXPORTING
    INPUT = WA_INPUT
    IMPORTING
    OUTPUT = WA_OUTPUT
    EXCEPTIONS
    INPUT_INVALID = 1
    OVERFLOW = 2
    TYPE_INVALID = 3
    OTHERS = 4.
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    WRITE: WA_OUTPUT.
    OR this,
    DATA: I TYPE I,
    P TYPE P DECIMALS 2 Value '3.5'.
    I = P.
    Reward if helpfull.

  • Currency Field in Smart Form

    Hi,
    How to Display Currency Field in SmartForm  and how to declare

    You can display a field in GLOBAL data of TYPE I (v_menge).
    then in the related window of that Quantity field create PROGRAM LINES and in that write a small code such that
    MOVE ITAB-MENGE to v_menge.
    Now display this field v_menge in the smartform
    Regards
    Anbu B

  • Currency field in service PR

    hi
    currency field in service PR for item category D and B is greyed out, it cant be changed according  to sap note
    do u have any workaround or any other alternative how this can be chnaged?

    Hi,
    I hope I have understood your question correctly!!
    You can maintain Service or Limit in item details there you have the option of maintaining price.
    Please for your reference go thru this document: http://www.sap123.com/a/52/
    Hope you find these useful.
    Reetesh

  • Stock account currency field in MB5L report

    Hi!
    can any one tell me in MB5L report for field materials currency and stock account currency, from system will pick up the values?
    I think materials currency field will pick up from GL accounts?
    But stock account currency, from where it will pick up value?
    regs,
    ramesh b

    Hi!
    both are not GL account balances.
    I have studied the report and understood.
    the material currency field: just it will take total stock avialable * std price/MAV price ( it will be equal to value in material master, MB5B, MB51 )
    the stock account currency field: it will take GL account balance via valuation class ( OBYC setting BSX)
    Here for example if you select only one material in MB5L report , it won't show the GL balance pertaining to that material, it will simply show the total GL balances that means system won't check material number existed in line items ( BSEG table).
    any way thanks for your inputs.
    regs,
    ramesh b

  • Dynamic displaying of decimal points for currency field in ALV

    Hi,
            In ALV output there is a currency field and displaying data of different countries. It should display decimal point according to the country's currency. But at a time it can display data of different countries.

    Hi Dilip,
    I think your question is about currencies with different number of digits after decimal point. If you have the currency field in the ALV row, you have to give it's name as currency reference for the value field in the field catalog.
    After creating the field catalog, call a form and do something like this (change fielnames accordingly).
    <pre>
    *&      Form  alv_fieldcat_enhance
          Individual Enrichment of field catalog
    FORM alv_fieldcat_enhance
      CHANGING pt_alv_fieldcat TYPE slis_t_fieldcat_alv.
      FIELD-SYMBOLS:
        <alv_fieldcat> TYPE slis_fieldcat_alv.
      LOOP AT pt_alv_fieldcat ASSIGNING <alv_fieldcat>.
        IF <alv_fieldcat>-fieldname(5) = 'KBETR' OR
           <alv_fieldcat>-fieldname(5) = 'SKBTR' OR
           <alv_fieldcat>-fieldname(5) = 'DMBTR'.
    Company code currency
          <alv_fieldcat>-cfieldname = 'BWAER'.
    Document Currency for conditions, net value and taxes
        ELSEIF  <alv_fieldcat>-fieldname(5) = 'KWERT' OR
                <alv_fieldcat>-fieldname    = 'NETWR' OR
                <alv_fieldcat>-fieldname    = 'NPAX_MWST_AMNT'.
    Document Currency
          <alv_fieldcat>-cfieldname = 'WAERK'.
        ENDIF." <alv_fieldcat>-fieldname(5) = 'KBETR' or
      ENDLOOP." at pt_alv_fieldcat assigning <fieldcat_alv>.
    ENDFORM.                    " alv_fieldcat_enhance
    </pre>
    Regards,
    Clemens

Maybe you are looking for