String substitutions in format fields

It's dawning on me that if the owner of the app I'm working on ever decides that all currency fields should display 2 decimal places instead of rounding to the nearest dollar, it's going to be a lot of work to go through all the currency fields in the reports and tack on the "D00" to the "Number / Date Format" column attributes. Is there a way to implement that attribute so that I can change a value in a central location and have it affect all my currency fields?
For example, I tried creating a substitution string #CURRENCY_FORMAT# with a value of "FML999G999G999G999G990" and then entering #CURRENCY_FORMAT# as the value for the column format attribute, hoping that it would substitute the format string, but it didn't work. Is there something like that I can do?

Ian,
I think you may be confusing the syntax.
To use an item substitution for the format mask of an item, you would specify &CURRENCY_FORMAT. (inclusive of the trailing period).
This way, you can then define CURRENCY_FORMAT as an application level substitution string or even an application item if you wish (I always use application level substitution string).
Joel

Similar Messages

  • Convert a String to Decimal Format in European format

    Hi Experts,
    I am having a string as a context type for a input field, where the user can enter the Price, I need to convert the same into European format "###.###,00", I am using this below code to convert the string to decimal format
    User will enter the input as 10 as it needs to be converted into 10,00. Also, 1000 which has to be converted as 1.000,00
    String Str1 = wdContext.currentvn_temptable.getVa_TempUnitPrice();
    Locale mylocale  = Locale.GERMAN;
    String pattern="###.###,00";                    
    NumberFormat nf = NumberFormat.getNumberInstance(mylocale);
    DecimalFormat df = (DecimalFormat)nf;
    df.applyPattern(pattern);
    String output = df.format(Str1);
    wdComponentAPI.getMessageManager().reportSuccess("Unit Price" + " " + pattern + " " + output);
    When I execute the above code, i am getting an error called "Malformed Pattern ###.###,00"
    Please let me know, how to convert a String to Quantity in European format
    Thanks & Regards,
    Palani

    Hello!
    Try to change your pattern to this one 
    Locale mylocale  = Locale.GERMAN;
    String pattern = "#,#00.00";                    
    NumberFormat nf = NumberFormat.getNumberInstance(mylocale);
    DecimalFormat df = (DecimalFormat)nf;
    df.applyPattern(pattern);
    String output = df.format(1111111.222);
    Pattern has an influence on number of digits between separators, but you have to use ',' for grouping and '.' for decimal. Character values for separators correspond to your Locale object.
    Thanks, Mikhail

  • EBS with MT940 format field 86 structure - the details of remitter

    Dear Sap guru,
    I am starting configuration for EBS with MT940 format field 86 structured. I have got the format from Deutsche bank.
    My problem is how to configure a search string to search within field 86 for Bank code of remitter (?30) and account number of remitter (?31). The search string appears to search the details of payment information (?20Bis?29) only.
    Could any of you provide your expertise on this so that EBS will pick up the remitter information ?
    Kind regards
    taro

    The field ?30 is stored in FEBEP-PABLZ.
    When the field ?31 contains an IBAN, it is stored in FEBEP-PIBAN (and the corresponding BBAN is stored in FEBEP-PAKTO); in the other cases it is stored in FEBEP-PAKTO.
    You should use these fields in a user exit.
    (Source: program RFEKA400:)
          WHEN '30'.
    *       BLZ   Auftraggeber/Zahlungsempfänger
            MOVE HEAD_2 TO XFEBEP-PABLZ.
          WHEN '31'.
    *       Konto Auftraggeber/Zahlungsempfänger
            CALL FUNCTION 'FUNCTION_EXISTS'                   "start n969358
              EXPORTING
                funcname = 'SEARCH_FOR_IBAN'
              EXCEPTIONS
                others   = 1.
            IF sy-subrc = 0.
              CALL FUNCTION 'SEARCH_FOR_IBAN'
                EXPORTING
                  i_string = head_2
                IMPORTING
    *              e_tiban  = l_tiban
                  e_subrc  = l_subrc.
              IF l_subrc = 1. "not an IBAN
                MOVE HEAD_2 TO XFEBEP-PAKTO.
              ELSE.
                MOVE HEAD_2 TO XFEBEP-PIBAN.
              ENDIF.
            ELSE.
              MOVE HEAD_2 TO XFEBEP-PAKTO.
            ENDIF.                                              "end n969358

  • Format Fields in Cross Tab and Calculated Members

    Hello:
    I have a cross Tab with a calculated member, I need to display one decimal or no decimal in some of the columns so I created a formula in the Display String option like this:
    if GridRowColumnValue ("@TestID_desc")= "ALK mg/L
    then
      Cstr(CurrentFieldValue, "0")
    else
      Cstr(CurrentFieldValue, "0.0")
    But, after I saved the formula the value in the calculated member colums disappears. Any ideas? Thank You in advance!

    right click on calculated field and go to format field and in number tab select customize button and write the condition for decimals.
    regards,
    Raghavendra

  • String Conversion into Quantity field ----------Sales Orders

    Hi Experts,
    Can any of you give an standard function module or conversion routine for String conversion to Quantity field.
    The problem is I pass on 5 value as a string and while the system creates any sales orders, now in the quantity filed
    it shows me as 0.005 and for value 7 it gives me as 0.007.
    So, Now I want a conversion in such a way that if I pass 5 then the system should 5.000 and if I pass 10 it should show
    as 10.00 likewise for 100 or above also.
    Thank you,
    KishoreJ.

    Hi,
    You have check , what is user format configure in each user then reply the forum.
    Thanks
    With Regards
    I.Muthukumar

  • Converting String to datetime format

    I have a String which is in 04-DEC-78 format, I want it to be inserted in to a field in sql database.If I map directly I am getting
    "Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException: The input data for the field/parameter "e_date" is invalid according to the expected SqlDbType DateTime. ---> System.FormatException: The string '04-DEC-65' is not a valid
    AllXsd value.
    Tried to convert the string to datetime format in Mapping but getting error
    public DateTime FormatCheck(string param1)
    IFormatProvider culture = new CultureInfo("en-US", true);
    return  DateTime.ParseExact(param1, "dd/MM/yyyy HH:mm:ss.fff", culture);
    Inline Script Error: The type or namespace name 'CultureInfo' could not be found (are you missing a using directive or an assembly reference?) 
    Help me out!!

    HOLD ON!
    Let's try to clear this up. If the input data is "04-DEC-78" then, sorry, none of the code posted so far will work.
    "04-DEC-78" is not directly parsable so the .ParseExact format must match the source.
    The format for xs:datetime is ISO 8601 which is like yyyy-MM-ddTHH:mm:ss-[offset].  Internally the sqlBinding will cast the XsdDateTime (the .Net xs:datetime implementation) to a SqlDateTime.
    One very, very important missing detail is the type of the SQL parameter.  Is it (SQL) datetime or string?
    If the SQL parameter is datetime, then you can use this:
    public string FormatCheck(string param1)
    return DateTime.ParseExact(param1, "dd-MMM-yy", System.Globalization.CultureInfo.InvariantCulture).ToString("s");

  • Need to convert  Date from calendar to String in the format dd-mom-yyyy

    Need to convert Date from calendar to String in the format dd-mom-yyyy+..
    This is absolutely necessary... any help plz..
    Rgds
    Arwinder

    Look up the SimpleDateFormat class: http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
    Arwinder wrote:
    This is absolutely necessary... any help plz..For you maybe, not others. Please refrain from trying to urge others to answer your queries. They'll do it at their own pace ( if at all ).
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
    (Yes I know it's on JavaRanch but I think it applies everywhere)
    ----------------------------------------------------------------

  • Converting String To XML Format and send as attachment

    Hi
    My requirement is to convert String into XML Format and that XML File i have to send as an attachment
    can any one one give solution for this Problem.
    Thank you
    Venkatesh.K

    hi,
    i m filling the itab first and converting to xml
    itab contaning these data
    GS_PERSON-CUST_ID   = '3'.
    GS_PERSON-FIRSTNAME = 'Bill'.
    GS_PERSON-LASTNAME  = 'Gates'.
    APPEND GS_PERSON TO GT_PERSON.
    GS_PERSON-CUST_ID   = '4'.
    GS_PERSON-FIRSTNAME = 'Frodo'.
    GS_PERSON-LASTNAME  = 'Baggins'.
    APPEND GS_PERSON TO GT_PERSON.
    after conversion data is coming like that
    #<?xml version="1.0" encoding="utf-16"?>
    <CUSTOMERS>
      <item>
        <customer_id>0003</customer_id>
        <first_name>Bill</first_name>
        <last_name>Gates</last_name>
      </item>
      <item>
        <customer_id>0004</customer_id>
        <first_name>Frodo</first_name>
        <last_name>Baggins</last_name>
      </item>
    </CUSTOMERS>
    but errors are  1) # is coming at the first
                            2)for 'encoding="utf-16"?>', it is not coming perfectly, some other data (iso-8859-1) should come here
    can anybody plz solve it.
    regards,
    viki

  • Converting string to XML format

    Hi All,
    I have a requirement to convert string to xml format and download it. Atpresent, I have a string which is a collection of xml tags. I want to convert this string to xml format like <VALUE004>20387899.437</VALUE004>
    <VALUE005>20387899.437</VALUE005>
    <VALUE006>20387899.437</VALUE006>
    Is there any function module for this.

    Chk this thread.
    Re: Regd: File Conversion to XML format

  • I want convert string to date format in Oracle

    Dear All
    I want convert string to date format in Oracle,Format is given below
    'Friday, 02 March 2012 2:44 PM' to '02/03/2012 2:44 PM'

    >
    Hi Parwez,
    I want convert string to date format in Oracle,Format is given below
    'Friday, 02 March 2012 2:44 PM' to '02/03/2012 2:44 PM'SELECT TO_DATE('Friday, 02 March 2012 2:44 P.M.', 'DAY, DD MONTH YYYY HH:MI A.M.') from dual;
    As well as what the other poster suggested, look here: http://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements004.htm#i34924
    HTH,
    Paul...

  • How to convert a String to Date format?

    the user enter a date in string format and the date is save in the database.
    The problem i am facing is i want to change from String to Date format.
    Here is my codes:
            public boolean insertData() throws Exception {
            boolean validFlag = false;
            DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
            Date d = df.parse("05/18/05");
            String MY_DATE_FORMAT = "yyyy-MM-dd";
            String jobAdvertisementDate = new SimpleDateFormat(MY_DATE_FORMAT).format(d);
            String sql = "INSERT INTO companyjob (CompanyID,JobID, JobAdvertisementDate ) " +
                    " VALUES ('" + companyID + "','" + jobID + "', '" + jobAdvertisementDate + "')";
            System.out.println(sql);
            validFlag = executeSQL(sql);
            return validFlag;
        }The date is save under jobAdvertisementDate.
    My netbeans shows an error. There's a red line under DateFormat and parse inside my codes.
    PLease help me. Reply asap!!

    BebeGirl wrote:
    My netbeans shows an error. There's a red line under DateFormat and parse inside my codes.
    Red Line? Sounds ominous. I wonder what it means.
    So...what does the error say?

  • String Substitutions with PL/SQL Function

    Hello, i user APEX 4.2.1.00.08 in Database 11g
    I new in apex and a try to use String Substitutions.
    When I define a String like CONST with static value like '999' in Edit Applications Definition it's work fine.
    But I need to define the same String 'CONST' but with value to return from PL/SQL function like.. Package.function
    It's Possible ??
    Thanks !!

    No, you'll need to use application items instead - or pass the value as parameter to your function.
    Passing parameters like this makes for good practice anyway, since your modules become more testable outside the apex environment, and more robust.

  • String substitution on Weblogic

    Hi experts.
    As you know, the WLS domain template provides the string substitution mechanism.
    (startscript.xml and stringsubs.xml)
    Here you should specify your entries that will be processed during the template applying.
    After being applied, these entries are "registered" in DOMAIN_HOME/init-info/ startscript.xml and startscript-unsub.xml
    Can these strsubs tasks be modified later?
    1) Is there any UI (or WLST functions) available for strsubs modification?
    Sure, I can edit xml files, but I think that it is not the convinient (and graceful) way to do it.
    2) As there is the startscript-unsub.xml file,
    does it mean that these string substitutions can be rolled back later?
    If yes - then how can it be done?
    Thanks

    There is currently no mechanism to perform string substitution after the config.xml has been created.

  • Possible to rename popup strings upon changing `Chapter` field in `Composition Marker` dialog?

    Hi There,
    I am in need to dynamically change the values inside a popup upon a user changing the value of the `Chapter` field within the `Composition Marker` dialog.  I realize that we cannot add new string values to a popup at runtime, but I read a thread in this forum, and in the `Supervisor` example in the SDK, that it is possible to rename them.  However, it seems like the event for making the changes to those values is triggered by a user changing values in the parameter set of the plugin itself. 
    So my idea is to populate a popup param with 20 strings--for example, 1, 2, 3, . . . 20.  Then when a user enters in a string within the `Chapter` field in a `Composition Marker` dialog, it updates the popup list to show the user entered string.  Is this possible?  I know I can access the string in the `Chapter` field via javascript ExtendScript.  Can I do it within C++ code?
    Thanks for your time and help!

    to get the marker string you should use AEGP_GetMarkerString() with AEGP_MarkerString_CHAPTER.  as for changing the popup values, by looking at the thread you pointed out, it seems it's possible to change the popup names at any time, and not during a specific code. the entire accessing of the popup data in that example was done using AEGP calls, which should not be affected by the calling time. (except for rare cases) never tried it myself. can vouch for my advice here.  since popup param's amount of entries can't be changed dynamically (to the best of my knowledge), you can create 30 (or any other number) of hidden popup params, starting with 1 entry and ending with 30 entries in it, and make only the param that fits your purposes best at that moment - visible.

  • String into date format

    Hi
    I was wondering if anyone knew how to convert a string into different formats,
    to enable it to be stored in a mysql db.
    I was wondering anyone you knew how to convert:
    - String into the date format yyyy-mm--dd
    - String into time format 00:00:00
    - string to double
    Ive tried:
    c_date = java.sql.Date.valueOf(f_date);
    System.out.println("conversion data: " +c_date);
    c_time = java.sql.Time.valueOf(f_time);
    System.out.println(" time converted data: "+c_time);
    // string to double conversion
    c_change = java.lang.Double.valueOf(f_change);
    System.out.println(c_change);
    My class doesnt execute this at all?
    Also,
    SimpleDateFormat sdft = new SimpleDateFormat("yyyy-MM-dd");
    c_date = sdft.format(f_date);
    System.out.println(c_date);
    .. but this method returns the error incompatible types?
    Any suggestions would be helpful.. thanks in advance..

    Friends i've got similar kind of problem...can you help me
    here is my code. When i try to print the user entered date (dd/MM/yyyy)(which i am storing in a string) the program dispalys nothing. and everey time i enter a valid date it displas "invalid From date entered ". I need to store the user entered date into a string because i need that for further use. All my intesion is to get two dates from user in dd/MM/yyyy. Strore them in certain variable. Check if they are valid or not. and make sure todate is either equal or greater than fromdate. Please help me to solve this problem.
    public class EDTDateValidation extends JFrame implements ActionListener{
    private JLabel fromlabel;
    private JLabel tolabel;
    private JTextField fromtxt;
    private JTextField totxt;
    private String fmt ="dd/MM/yyyy";
    private java.lang.String fromdate;
    private java.lang.String todate;
    private JButton buttonOK;
    private JButton buttonCancel;
    private Date theDate;
    private Date date1;
    private Date date2;
    private JPanel mainPanel;
    SimpleDateFormat dtformat = new SimpleDateFormat(fmt);
    public EDTDateValidation(){
    super("Date Validation");
    dtformat.setLenient(false);
    mainPanel=new JPanel();
    mainPanel.setLayout(null);
    fromlabel = new JLabel("From Date");
    tolabel = new JLabel("To Date");
    buttonOK = new JButton("OK");
    buttonCancel = new JButton("Cancel");
    fromdate = new String();
    todate = new String();
    fromtxt = new JTextField(10);
    totxt = new JTextField(10);
    fromdate = fromtxt.getText();
    todate = totxt.getText();
    mainPanel.add(fromlabel);
    fromlabel.setBounds(20,20,50,15);
    mainPanel.add(tolabel);
    tolabel.setBounds(20,50,50,15);
    mainPanel.add(fromtxt);
    fromtxt.setBounds(90,20,130,20);
    mainPanel.add(totxt);
    totxt. setBounds(90,50,130,20);
    mainPanel.add(buttonOK);
    buttonOK.setBounds(70,80,71,23);
    mainPanel.add(buttonCancel);
    buttonCancel.setBounds(150,80,71,23);
    buttonOK.addActionListener(this);
    buttonCancel.addActionListener(this);
    setContentPane(mainPanel);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setSize(247,140);
    setResizable(false);
    //pack();
    public static void main(String args[]) {
    try {
    UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
    catch(Exception e) {
    System.err.println("Could not load Look and Feel" + e);
    EDTDateValidation edtDateVal = new EDTDateValidation();
    edtDateVal.setVisible(true);
    public void actionPerformed(ActionEvent e) {
    if(e.getSource() == buttonOK){
    System.out.println(fromtxt.getText());
    System.out.println(fromdate); //THIS PRINTS BLANK
    System.out.println(todate); //THIS ASWELL
    try {
    Date date = null;
    date = dtformat.parse(fromdate);
    System.out.println("valid From date entered!");
    catch(Exception f) {
    System.out.println("Invalid From date entered!");
    // textField1.setText("");
    return;
    try {
    Date date = null;
    date = dtformat.parse(todate);
    System.out.println("valid TO date entered!");
    catch(Exception f) {
    System.out.println("Invalid To date entered!");
    // textField1.setText("");
    return;
    }

Maybe you are looking for

  • Static NAT not working

    Hi, I'm configuring a 1841 router with 4-port FE WIC card. Interface FE0/1 is outside and FE0/0/0 (WIC) is used for LAN connection. I'm using dinamic NAT for LAN users access to Internet and static NAT to connect to internal servers from external net

  • Self-assigned IP problem - still no resolution!?

    I have a Macbook which is about two and a half years old. I have never experienced any real problems with it, especially regarding connections. I have been connected to my home wireless network (BT homehub) ever since I got the laptop with no issues.

  • Why is a network share not showing up in time machine settings when on the wifi?

    Hi all, I am currently trying to set up time machine for my Macbook air. I have connected an external harddrive to the network router and made it available as a network share. I have both read and write access to the drive, when mounted as a an SMB v

  • Application Server: 9.0.4 on RHEL 3.0 ES

    Hi all, I've searched through the forum and just can't find anything that sort of links to this. I have installed Application Server 9.0.4 on RHEL 3 and everything seems to be in order. I have followed all the instructions correctly (as per the instr

  • What happens to my call history after upgradeing to windows skype

    I have widows 8.01 which it had Apps that you can download from store, on the 8th July I tried to Log in skype a Notifecation came that as from 7th July the Modern windows skype will No longer work so You have download a New version for as for Widows