ERMS: Issue with setting up charset

Hi Experts,
We are using CRM 6.0 ERMS to send out emails to customers. Based on the Setting in transaction SCOT all the out going emails are sent with UTF-8 charset (Code Page: 4110). Today Japanu2019s internet mail standard is ISO-2022-JP, and most of mail applications have an option to encode outgoing message to JIS. However, all outgoing message from ERMS are UTF-8 (Unicode) without capability to encode other character code. This will result in Japanese mail message broken in most of webmail clients in Japan such as MSN Hotmail.
Has anyone faced this issue before. Can we achieve the funtionality wherein Japanese Code page gets selected based on the customers BP language?
Regards,
Namita

The language for the outgoing ERMS email is determined first by content analysis by TREX (some customers may choose not to set up TREX).   If this determination fails the language of the BP is taken into account . If the BP determination fails, the system language of the WF-BATCH user is taken .
   From the logic above if the Content Analysis succeeds the Japanese language is set for the email.
   We can check the Clasification/Trex setup to make sure that for an email received in Japanese for example the language is recognized.
As an example you can test/debug by following the steps below
1   Send an email in Japanese that will trigger auto acknowledge (need to create a mailform with Japanese text to use in auto acknowledge) .
2   In swi1 look for the background task id corresponding to the ERMS mail
3   Set a breakpoint in class CL_CRM_ERMS_ADD2FB_CA method
     IF_CRM_ERMS_SERVICE~EXECUTE line 77
    IF error_code <> 0.
    CONCATENATE 'TREX error:'(001) error_text '[' 'error code = ' msg
    ']' INTO msg.
    RAISE EXCEPTION TYPE cx_crm_erms_service_failed
If error returned is not 0 means that either there is a problem with TREX or it just could not decide based on the content. However normally it should recognize the language. (Watch variable xml_chunk - at the end
of the XML there is a language tag that should have some value 'DE'
'EN' etc)
4  Run program CRM_ERMS_LOGGING. For workitem id enter the id of the
background task from step 2
5. The program stops at the breakpoint mentioned above.
6. Also note that if the language is detected correctly you need also the mail form that is used to be translated in that language ( Japanese ).
The language of the email overwrites the SXCPSEND entry (language to codepage mapping)
To sumarize:
1. Check if clasification/bp detects the language
2. Mailform is translated in Japanese
3. Mapping for codepage is maintained in SapConnect (SXCPSEND language to codepage mapping)
  I hope these steps will help the investigation.

Similar Messages

  • Issue with Setting Application Item

    Hi All,
    I have an issue with setting the value of application item G_USER_ID as part of the login process.
    I use customized authentication for login. I have created an application item G_USER_ID, and in my CUSTOM_AUTH procedure, I am setting its value as APEX_UTIL.SET_SESSION_STATE('G_USER_ID', l_user_id);
    For some reason, the value is not set to G_USER_ID the first time I login. When I log out and login again without closing the browser, the value is set. Note that I even tested with a static value instead of l_user_id like APEX_UTIL.SET_SESSION_STATE('G_USER_ID', '5555555'); but still fails to set during the first login.
    I hope someone can guide me as to what I am doing wrong here.
    Thanks!
    JMcG

    What does this do?
    :SVR_FLAG := NVL(l_mult_svr,'N');
    Scott

  • Issue with setting ratings and labels

    Greetings all. I am having an issue with setting ratings AND labels on image files at the same time. If the script sets the label first then the rating, the label doesn't show in Bridge. If the script sets the rating first then the label, the rating doesn't show in Bridge.
    Is there a workaround for this? Here is my script function for doing this. file=filename minus extension. Rating is a number for the desired rating. lab is a number for the level of Label I wish to set. Everything works great except that I can't set both Rating and Label with the script as shown. In this instance, only the Ratings will show up in Bridge after running the script. If I move the x.label=Label line under the x.rating=Rating line, then the ratings only show for those images with no label (lab=0). Any image that gets a label receives no rating.
    If you're going to test this, you may want to comment out the Collections part. That's the part within the "switch(Number(Rating))" block.
    function setRating(file,Rating,lab) {
        try{
            cr=File(file+"CR2");
            psd=File(file+"psd");
            jpg=File(file+"jpg");
            tif=File(file+"tif");
            switch(lab) {
                case 0: Label = ""; break;
                case 1: Label = "Select"; break;
                case 2: Label = "Second"; break;
                case 3: Label = "Approved"; break;
            if (cr.created) {
                var c=new Thumbnail(cr);
                c.label=Label;
                c.rating=Rating;
                if (psd.created) {
                    p=new Thumbnail(psd);
                    p.label=Label;
                    p.rating=Rating;
                    if (jpg.created) {
                        var j=new Thumbnail(jpg);
                        j.label=Label;
                        j.rating=Rating;
                        Rating=0;
                    else addFile=psd;
                else addFile=cr;
            switch(Number(Rating)){
                case 0 : break; /* No Rating */
                case 1 : if(!app.isCollectionMember(OneStar,new Thumbnail(addFile))) app.addCollectionMember(OneStar,new Thumbnail(addFile)); break;
                case 2 : if(!app.isCollectionMember(TwoStars,new Thumbnail(addFile))) app.addCollectionMember(TwoStars,new Thumbnail(addFile)); break;
                case 3 : if(!app.isCollectionMember(ThreeStars,new Thumbnail(addFile))) app.addCollectionMember(ThreeStars,new Thumbnail(addFile)); break;
                case 4 : if(!app.isCollectionMember(FourStars,new Thumbnail(addFile))) app.addCollectionMember(FourStars,new Thumbnail(addFile)); break;
                case 5 : if(!app.isCollectionMember(FiveStars,new Thumbnail(addFile))) app.addCollectionMember(FiveStars,new Thumbnail(addFile)); break;
                default : break;
        }catch(e){
              alert(e);
              return -1;

    Afew errors to start with, you were not creating a proper file as there wasn't a fullstop in the filename.
    If a CR2 file didn't exist no other file was looked for, you were using "created" and should have been "exists"
    This now labels and rates....
    setRating("/C/Test Area/NEF/z",2,1);
    function setRating(file,Rating,lab) {
        try{
            cr=File(file+".CR2");
            psd=File(file+".psd");
            jpg=File(file+".jpg");
            tif=File(file+".tif");
            switch(Number(lab)) {
                case 0: Label = ""; break;
                case 1: Label = "Select"; break;
                case 2: Label = "Second"; break;
                case 3: Label = "Approved"; break;
            if (cr.exists) {
                var c=new Thumbnail(cr);
                c.label=Label;
                c.rating=Rating;
                if (psd.exists) {
                    p=new Thumbnail(psd);
                    p.label=Label;
                    p.rating=Rating;
                    if (jpg.exists) {
                        var j=new Thumbnail(jpg);
                        j.label=Label;
                        j.rating=Rating;
                        Rating=0;
            switch(Number(Rating)){
                case 0 : break;
                case 1 : if(!app.isCollectionMember(OneStar,new Thumbnail(addFile))) app.addCollectionMember(OneStar,new Thumbnail(addFile)); break;
                case 2 : if(!app.isCollectionMember(TwoStars,new Thumbnail(addFile))) app.addCollectionMember(TwoStars,new Thumbnail(addFile)); break;
                case 3 : if(!app.isCollectionMember(ThreeStars,new Thumbnail(addFile))) app.addCollectionMember(ThreeStars,new Thumbnail(addFile)); break;
                case 4 : if(!app.isCollectionMember(FourStars,new Thumbnail(addFile))) app.addCollectionMember(FourStars,new Thumbnail(addFile)); break;
                case 5 : if(!app.isCollectionMember(FiveStars,new Thumbnail(addFile))) app.addCollectionMember(FiveStars,new Thumbnail(addFile)); break;
                default : break;
        }catch(e){
              alert(e);
              return -1;

  • Issue with setting Planning Data Source

    I keep getting error when I try to set up the data source
    the Oracle database  = orcl
    The data base schema EPMAPLAN
    Password = EPMAPLAN
    when i log on i  to Oracle Database
    Sys as SYSDBA
    Password = Password01
    so what what should be the Database Source Name  = ORCL Correct ????
    Server = win-392h1l307n1 or localhost
    Databse = ORCL
    User Name  = ????????????
    Password  = ?????????
    I try all the  combinations
    Please advise

    Duplicate post - Issue with setting up planning data source
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Issues with setting "Album Artist" in iTunes 9.2.5.1 on Windows 7

    I googled this for a while but haven't been able to find this issues mentioned anywhere else yet. Here's what's happening: I am importing CDs to iTunes 9.2.1.5 on Windows 7 Pro (64 Bit) using MP3 Encoder > Higher Quality. All is well except for a few CDs where I'd like to set an overall Album Artist. Example: Tony Bennett's Duets: An American Classic. When importing the CD it shows up under "Various Artists" since "Artist" is always Tony Bennett plus whoever he sings with. To make sure the album shows up under Tony Bennett in the library I click on the album and set "Album Artist" to Tony Bennett. That, however results in changing the "Artist" field as well now so all fields say Tony Bennett, which shouldn't happen, "artists" should stay unchanged. I tried this with several albums and the behavior is always the same.
    I also tried the back door by going into the actual folder of the album in Windows then change the MP3 details and populate "Album Artist" there for all tracks within the album. Once I re=open iTunes it registers the change only for the first track but not the rest. So I re-import the folder into iTunes and then it does take "Album Artist" and also leaves "Artist" unchanged but for some reason has now lots of numbers under "Comments". There seems to be a mismatch of the field attributes between iTunes and Windows for MP3 files (possibly other formats as well). Wondering if anyone else has observed this or if I am just missing some setting.

    FYI iTunes handling of ID3v2.4 tags seems to have some issues as well... Translating genres into their numeric codes for one thing. I'd recommend sticking with v2.3.
    I'm not exactly sure from your posts what you were seeing. Was the artist being changed in Get Info. after you'd set Album Artist, or was it changing elsewhere on screeen? iTunes 9(.1 I think) added an option *View > Column Browser > Use Album Artists*. Unfortunately this doesn't change the heading of the column so that you "see" it is now only listing album artists but that's what it does.
    There is also an occasional issue with the current build in that sometimes changes to Album Artist or Sort Album Artist fail to be reflected properly in the column browser until iTunes is closed and reopened.
    tt2

  • Issues with setting up Exchange Server 2013

    Hi All
     Not sure what im doing wrong yet i am having issues with exchange server 2013.
    Currently I have got general SMTP Mail flow working. as long as i log onto the local servers OWA (https://10.x.x.x/owa) i can log into a users mailbox. i have tested sending and recieving mail using this and it works.
    My main issue now is with accessing the OWA externally via our website.  (owa.xx.xx.au/owa) or connecting ANY Outlook to the server.
    When i connect to the exchange server via outlook it asks for the password again multiple times never authenticating it then time's out and says:
     " the action cannot be completed. the connection to microsoft exchange is unavailable, outlook must be online or
    connected to complete this action "
    then when i click on OK it goes to the General Tab and under microsoft exchange server: the name for it appears as 
    [email protected]
    with mailbox set as:
    =SMTP:[email protected]
    Currantly on our DNS i have
    mx=  10  mail.xx.xx.au
    CNAME= autodiscover  = mail.xx.xx.au
    CNAME= OWA = mail.xx.xx.au
    A = mail = 12.34.56.78 
    On our modem/router i have set one-to-one nat to our firewall IP
    On our firewall i have
    SMTP SAT and NAT to Exchange server
    HTTPS Sat and NAT to exchange Server
    HTTP Sat and Nat to exchange Server
    Port 587 SAT and Nat to exchange server
    pop SAT and NAt to exchange server
    Im willing to bet its something stupid i have overlooked but i was wondering if anyone would be able to help me out
    Regards
    Sibsy

    Hello,
    Firstly, please follow the Shadab's suggestion to check related virtual directory settings.
    Please make sure you use certificate that's created by a CA that's trusted by the client computer's operating system. 
    Please use get-outlookanywhere | fl cmdlet to check ExternalClientAuthenticationMethod. By default, the authentication is Negotiate.
    Cara Chen
    TechNet Community Support

  • N82: issue with sett. wizard

    Hi All,
    I'm using a black N82 with the latest FW (V20.0.062) and whenever I try to open the Sett. wizard the phone is freezing (only the wallpaper is displayed). Only a restart (by removing the battery) recovers the phone. I tried also a reset to the factory settings but the problem remains...
    Anyone knows a solution to this problem?

    Thanks again for your prompt response.
    I've never installed additional applications on my phone.
    The following 'items' have gone 'into' the phone since purchase:
    1. Mp3 songs.
    2. Contacts via the sim directory.
    3. a Powerpoint presentation via data transfer mode (nearly a month ago, but my issues with the phone surfaced a week ago....so no problem with the ppt i guess)
    4. camera pics, MS outlook calender, to-do and Text messages routinely syncd between my phone and laptop.
    5. Bluetooth transfer out of my phone to another phone for a transfer of pics taken.
    Again many weeks ago not followed by adverse effects...
    Thanks, it'll take me a while to understand SYNCML. Ill read and try to understand soon.
    But then wont PC suite take care of contacts backup n restore,etc?
    If so, where can i find the contacts stored in my computer and in what format?
    For instance, the photos and text msgs - synced - are stored in Lifeblog folder under my documents folder and can be easily accessed via the LifeBlo application both on the phone and the computer/laptop.
    PS: I also managed to update the software today, with the help of Nokia Software updater app on my laptop.
    Keeping this all in mind:
    I reckon, the m-card and perhaps phone memory are affected. Maybe the camera application as well.
    If this is proved, i think, then i m-card format and hard reset is the way forward.
    Thanks again.

  • Crystal Reports XI R2 SP 6 - Issue with setting Data Source Location

    Hello,
      After some initial difficulty instally CR XI R2 with SP 6 on a windows XP machine (see thread Error on installation of CR XI R2 SP6), the Crystal Reports environment seemed fine, however, when I tried resetting the datasource location on an ODBC datasource between a development and production server, I get the message 'Some Tables could not be replaced as no match was found....'   The tables in the two databases are identical so that isn't the issue.
    Here is some additional information
    The issue seems related only to DSN's that point to a progress database.  I am able to reset datasource locations for DSN's that use the SQL server driver and also for those that use the XML CR ODBC XML Driver 5.0.  I am not able to reset the datasource locations on the DSN's that use a Progress Open Edge 10.1 DB  driver.
    I can create a new report using the DSN for the Progress Driver and add tables, but the table names are coming up as an alias - i.e. if I add a table called PM_Plant, the table added to the report is PM_Plant1.
    I also found I can go into existing reports, rename the tables in the database expert to be an alias (appending 1 to the end of the table name), then I am able to repoint them using the datasource location screen. 
    So it looks like there is a potential work around to the situation, but I didn't run across any information that we should need to do that. 
    Any recommendations how to fix the issue?  
    Thanks,

    Hi Don,
    The reports were created with CR XI R1 on my PC  initially and the progress drivers have not changed since.   The reports were deployed to a server and I pulled them back to my PC to test out any changes after the CR XI R2 SP 6 upgrade.  (so there is really only one machine involved, the one that had the upgrade). 
    I did look at the settings for verifying and tried playing around with those and also with verifying the database but that didn't make any difference.
    I wasn't quite sure which registry keys to look at or what the values should be so wasn't able to pursue that option. 
    All the tables in the progress database use underscores as part of the table name (i.e. PM_Plant, PM_Company), do you think the upgrade to SP6 means that the underscore is now a reserved character and that is why the tables are getting aliased?  If so, do you know how to change the alias settings or the list of characters that are reserved?
    Just an FYI, I had to downgrade back to CR XI R1 at this point to get work done.   If time allows, I'll retry the upgrade in about 5-7 weeks.  I discussed the issue with a system admininstrator and we willl try removing the progress drivers and DSN's prior to trying an upgrade again to see if that makes a difference.  I'll also make sure to keep track of all Report Options and Options and also registry keys to see what changes.
    Thanks

  • Issue with setting float point in Textfield

    hi
    i have an issue with float input in a textfield.
    what i want to do is.
    when the user start typing numerics it should accept from right hand side and keep appending value from right hand side.
    for ex
    if i want to enter 123.45
    user starts entering
    1 then it should display as 0.01
    2 then it should display as 0.12
    3 then it should display as 1.23
    4 then it should display as 12.34
    5 then it should display as 123.45
    to achive this i have written the code as below
    public class Test{
         public static void main(String[] a){
         try {
    UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
    } catch (Exception evt) {}
    DecimalFormat format = new DecimalFormat();
    format.setGroupingUsed(true);
    format.setGroupingSize(3);
    format.setParseIntegerOnly(false);
    JFrame f = new JFrame("Numeric Text Field Example");
    final DecimalFormateGen tf = new DecimalFormateGen(10, format);
    // tf.setValue((double) 123456.789);
    tf.setHorizontalAlignment(SwingConstants.RIGHT);
    JLabel lbl = new JLabel("Type a number: ");
    f.getContentPane().add(tf, "East");
    f.getContentPane().add(lbl, "West");
    tf.addKeyListener(new KeyAdapter(){
         public void keyReleased(KeyEvent ke){
              char ch = ke.getKeyChar();
              char key;
              int finalres =0;
              String str,str1 = null,str2 =null,str3 = null,str4= null;
              if(ke.getKeyChar() == KeyEvent.VK_0 || ke.getKeyChar() == KeyEvent.VK_0 ||
                        ke.getKeyChar() == KeyEvent.VK_0 || ke.getKeyChar() == KeyEvent.VK_1 || ke.getKeyChar() == KeyEvent.VK_2 ||
                             ke.getKeyChar() == KeyEvent.VK_3 || ke.getKeyChar() == KeyEvent.VK_4 || ke.getKeyChar() == KeyEvent.VK_5 ||
                             ke.getKeyChar() == KeyEvent.VK_6 || ke.getKeyChar() == KeyEvent.VK_7 || ke.getKeyChar() == KeyEvent.VK_8 ||
                             ke.getKeyChar() == KeyEvent.VK_9 ){
                   double value1 = Double.parseDouble(tf.getText());
                   int position = tf.getCaretPosition();
                   if(tf.getText().length() == 1){
                        if(tf.getText() != null || tf.getText() != ""){
                        value1 = value1 / 100;
                        tf.setText(String.valueOf(value1));
                   /*else if(tf.getText().length() == 3){
                        str = tf.getText();
                        for(int i=0;i<str.length();i++){
                             if(str.charAt(i) == '.'){
                                  str1 = str.substring(0,i);
                                  str2 = str.substring(i+1,str.length()-1);
                                  break;
                        key = ke.getKeyChar();
                        finalres = calculate.calculate1(str2,key);
                        str3 = merge.merge1(str1,finalres);
                        tf.setText(str3);
                        System.out.println(key);
                        System.out.println(str1);
                        System.out.println(str2);
                   else{
                        value1 = Float.parseFloat(tf.getText());
                        value1 = value1*10;
                        tf.setText(String.valueOf(value1));
    tf.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent evt) {
    try {
    tf.normalize();
    Long l = tf.getLongValue();
    System.out.println("Value is (Long)" + l);
    } catch (ParseException e1) {
    try {
    Double d = tf.getDoubleValue();
    System.out.println("Value is (Double)" + d);
    } catch (ParseException e2) {
    System.out.println(e2);
    f.pack();
    f.setVisible(true);
    import javax.swing.JTextField;
    * Created on May 25, 2005
    * TODO To change the template for this generated file go to
    * Window - Preferences - Java - Code Style - Code Templates
    * @author jagjeevanreddyg
    * TODO To change the template for this generated type comment go to
    * Window - Preferences - Java - Code Style - Code Templates
    import java.awt.Toolkit;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.text.DecimalFormat;
    import java.text.ParseException;
    import java.text.ParsePosition;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JTextField;
    import javax.swing.UIManager;
    import javax.swing.text.AbstractDocument;
    import javax.swing.text.AttributeSet;
    import javax.swing.text.BadLocationException;
    import javax.swing.text.Document;
    import javax.swing.text.PlainDocument;
    import javax.swing.text.AbstractDocument.Content;
    public class DecimalFormateGen extends JTextField implements
    NumericPlainDocument.InsertErrorListener {
         public DecimalFormateGen() {
         this(null, 0, null);
         public DecimalFormateGen(String text, int columns, DecimalFormat format) {
         super(null, text, columns);
         NumericPlainDocument numericDoc = (NumericPlainDocument) getDocument();
         if (format != null) {
         numericDoc.setFormat(format);
         numericDoc.addInsertErrorListener(this);
         public DecimalFormateGen(int columns, DecimalFormat format) {
         this(null, columns, format);
         public DecimalFormateGen(String text) {
         this(text, 0, null);
         public DecimalFormateGen(String text, int columns) {
         this(text, columns, null);
         public void setFormat(DecimalFormat format) {
         ((NumericPlainDocument) getDocument()).setFormat(format);
         public DecimalFormat getFormat() {
         return ((NumericPlainDocument) getDocument()).getFormat();
         public void formatChanged() {
         // Notify change of format attributes.
         setFormat(getFormat());
         // Methods to get the field value
         public Long getLongValue() throws ParseException {
         return ((NumericPlainDocument) getDocument()).getLongValue();
         public Double getDoubleValue() throws ParseException {
         return ((NumericPlainDocument) getDocument()).getDoubleValue();
         public Number getNumberValue() throws ParseException {
         return ((NumericPlainDocument) getDocument()).getNumberValue();
         // Methods to install numeric values
         public void setValue(Number number) {
         setText(getFormat().format(number));
         public void setValue(long l) {
         setText(getFormat().format(l));
         public void setValue(double d) {
         setText(getFormat().format(d));
         public void normalize() throws ParseException {
         // format the value according to the format string
         setText(getFormat().format(getNumberValue()));
         // Override to handle insertion error
         public void insertFailed(NumericPlainDocument doc, int offset, String str,
         AttributeSet a) {
         // By default, just beep
         Toolkit.getDefaultToolkit().beep();
         // Method to create default model
         protected Document createDefaultModel() {
         return new NumericPlainDocument();
         // Test code
         public static void main(String[] args) {
         try {
         UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
         } catch (Exception evt) {}
         DecimalFormat format = new DecimalFormat("#,###.###");
         format.setGroupingUsed(true);
         format.setGroupingSize(3);
         format.setParseIntegerOnly(false);
         JFrame f = new JFrame("Numeric Text Field Example");
         final DecimalFormateGen tf = new DecimalFormateGen(10, format);
         tf.setValue((double) 123456.789);
         JLabel lbl = new JLabel("Type a number: ");
         f.getContentPane().add(tf, "East");
         f.getContentPane().add(lbl, "West");
         tf.addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent evt) {
         try {
         tf.normalize();
         Long l = tf.getLongValue();
         System.out.println("Value is (Long)" + l);
         } catch (ParseException e1) {
         try {
         Double d = tf.getDoubleValue();
         System.out.println("Value is (Double)" + d);
         } catch (ParseException e2) {
         System.out.println(e2);
         f.pack();
         f.setVisible(true);
         class NumericPlainDocument extends PlainDocument {
         public NumericPlainDocument() {
         setFormat(null);
         public NumericPlainDocument(DecimalFormat format) {
         setFormat(format);
         public NumericPlainDocument(AbstractDocument.Content content,
         DecimalFormat format) {
         super(content);
         setFormat(format);
         try {
         format
         .parseObject(content.getString(0, content.length()), parsePos);
         } catch (Exception e) {
         throw new IllegalArgumentException(
         "Initial content not a valid number");
         if (parsePos.getIndex() != content.length() - 1) {
         throw new IllegalArgumentException(
         "Initial content not a valid number");
         public void setFormat(DecimalFormat fmt) {
         this.format = fmt != null ? fmt : (DecimalFormat) defaultFormat.clone();
         decimalSeparator = format.getDecimalFormatSymbols()
         .getDecimalSeparator();
         groupingSeparator = format.getDecimalFormatSymbols()
         .getGroupingSeparator();
         positivePrefix = format.getPositivePrefix();
         positivePrefixLen = positivePrefix.length();
         negativePrefix = format.getNegativePrefix();
         negativePrefixLen = negativePrefix.length();
         positiveSuffix = format.getPositiveSuffix();
         positiveSuffixLen = positiveSuffix.length();
         negativeSuffix = format.getNegativeSuffix();
         negativeSuffixLen = negativeSuffix.length();
         public DecimalFormat getFormat() {
         return format;
         public Number getNumberValue() throws ParseException {
         try {
         String content = getText(0, getLength());
         parsePos.setIndex(0);
         Number result = format.parse(content, parsePos);
         if (parsePos.getIndex() != getLength()) {
         throw new ParseException("Not a valid number: " + content, 0);
         return result;
         } catch (BadLocationException e) {
         throw new ParseException("Not a valid number", 0);
         public Long getLongValue() throws ParseException {
         Number result = getNumberValue();
         if ((result instanceof Long) == false) {
         throw new ParseException("Not a valid long", 0);
         return (Long) result;
         public Double getDoubleValue() throws ParseException {
         Number result = getNumberValue();
         if ((result instanceof Long) == false
         && (result instanceof Double) == false) {
         throw new ParseException("Not a valid double", 0);
         if (result instanceof Long) {
         result = new Double(result.doubleValue());
         return (Double) result;
         public void insertString(int offset, String str, AttributeSet a)
         throws BadLocationException {
         if (str == null || str.length() == 0) {
         return;
         Content content = getContent();
         int length = content.length();
         int originalLength = length;
         parsePos.setIndex(0);
         // Create the result of inserting the new data,
         // but ignore the trailing newline
         String targetString = content.getString(0, offset) + str
         + content.getString(offset, length - offset - 1);
         // Parse the input string and check for errors
         do {
         boolean gotPositive = targetString.startsWith(positivePrefix);
         boolean gotNegative = targetString.startsWith(negativePrefix);
         length = targetString.length();
         // If we have a valid prefix, the parse fails if the
         // suffix is not present and the error is reported
         // at index 0. So, we need to add the appropriate
         // suffix if it is not present at this point.
         if (gotPositive == true || gotNegative == true) {
         String suffix;
         int suffixLength;
         int prefixLength;
         if (gotPositive == true && gotNegative == true) {
         // This happens if one is the leading part of
         // the other - e.g. if one is "(" and the other "(("
         if (positivePrefixLen > negativePrefixLen) {
         gotNegative = false;
         } else {
         gotPositive = false;
         if (gotPositive == true) {
         suffix = positiveSuffix;
         suffixLength = positiveSuffixLen;
         prefixLength = positivePrefixLen;
         } else {
         // Must have the negative prefix
         suffix = negativeSuffix;
         suffixLength = negativeSuffixLen;
         prefixLength = negativePrefixLen;
         // If the string consists of the prefix alone,
         // do nothing, or the result won't parse.
         if (length == prefixLength) {
         break;
         // We can't just add the suffix, because part of it
         // may already be there. For example, suppose the
         // negative prefix is "(" and the negative suffix is
         // "$)". If the user has typed "(345$", then it is not
         // correct to add "$)". Instead, only the missing part
         // should be added, in this case ")".
         if (targetString.endsWith(suffix) == false) {
         int i;
         for (i = suffixLength - 1; i > 0; i--) {
         if (targetString
         .regionMatches(length - i, suffix, 0, i)) {
         targetString += suffix.substring(i);
         break;
         if (i == 0) {
         // None of the suffix was present
         targetString += suffix;
         length = targetString.length();
         format.parse(targetString, parsePos);
         int endIndex = parsePos.getIndex();
         if (endIndex == length) {
         break; // Number is acceptable
         // Parse ended early
         // Since incomplete numbers don't always parse, try
         // to work out what went wrong.
         // First check for an incomplete positive prefix
         if (positivePrefixLen > 0 && endIndex < positivePrefixLen
         && length <= positivePrefixLen
         && targetString.regionMatches(0, positivePrefix, 0, length)) {
         break; // Accept for now
         // Next check for an incomplete negative prefix
         if (negativePrefixLen > 0 && endIndex < negativePrefixLen
         && length <= negativePrefixLen
         && targetString.regionMatches(0, negativePrefix, 0, length)) {
         break; // Accept for now
         // Allow a number that ends with the group
         // or decimal separator, if these are in use
         char lastChar = targetString.charAt(originalLength - 1);
         int decimalIndex = targetString.indexOf(decimalSeparator);
         if (format.isGroupingUsed() && lastChar == groupingSeparator
         && decimalIndex == -1) {
         // Allow a "," but only in integer part
         break;
         if (format.isParseIntegerOnly() == false
         && lastChar == decimalSeparator
         && decimalIndex == originalLength - 1) {
         // Allow a ".", but only one
         break;
         // No more corrections to make: must be an error
         if (errorListener != null) {
         errorListener.insertFailed(this, offset, str, a);
         return;
         } while (true == false);
         // Finally, add to the model
         super.insertString(offset, str, a);
         public void addInsertErrorListener(InsertErrorListener l) {
         if (errorListener == null) {
         errorListener = l;
         return;
         throw new IllegalArgumentException(
         "InsertErrorListener already registered");
         public void removeInsertErrorListener(InsertErrorListener l) {
         if (errorListener == l) {
         errorListener = null;
         public interface InsertErrorListener {
         public abstract void insertFailed(NumericPlainDocument doc, int offset,
         String str, AttributeSet a);
         protected InsertErrorListener errorListener;
         protected DecimalFormat format;
         protected char decimalSeparator;
         protected char groupingSeparator;
         protected String positivePrefix;
         protected String negativePrefix;
         protected int positivePrefixLen;
         protected int negativePrefixLen;
         protected String positiveSuffix;
         protected String negativeSuffix;
         protected int positiveSuffixLen;
         protected int negativeSuffixLen;
         protected ParsePosition parsePos = new ParsePosition(0);
         protected static DecimalFormat defaultFormat = new DecimalFormat();
    this is not working as desired pls help me.
    can we use this code and get the desired result or is there any other way to do this.
    it is very urgent for me pls help immediately
    thanks in advance

    Hi camickr
    i learned how to format the code now, and u also responded for my testarea problem , iam very much thankful to u, and now i repeat the same problem what i have with a text field.
    actually i have window with a textfield on it and while end user starts entering data in it , it should be have as follows
    when the user start typing numerics it should accept from right hand side and keep appending value from right hand side.
    first the default value should be as 0.00 and as the user starts entering
    then it is as follows
    for ex
    if i want to enter 123.45
    user starts entering
    1 then it should display as 0.01
    2 then it should display as 0.12
    3 then it should display as 1.23
    4 then it should display as 12.34
    5 then it should display as 123.45
    i hope u will give me quick reply because this is very hard time for me.

  • Issues with setting "Maked Reader the default PDF viewer" with Adobe Customization Wizard XI

    I am using the Adobe Customization Wizard XI. I have set the following options in the Adobe Customization Wizard.
    Personalization Options
    Enabled the checkbox for Suppress display of End User License Agreement (EULA)
    Installation Options
    Selected the radio button for Make Reader the default PDF viewer
    Run Installation: selected radio button Silently(No Interface)
    Security
    Enhanced Security Settings - Clicked drop down and set value to Disable
    Online Services and Features
    Checked Disable product updates
    Checkd In Adobe Reader, disable Help > Purchase Adobe Acrobat
    Checked Disable Product Improvement Program
    Checked Disable Viewing of PDF with Ads for Adobe PDF
    Checked Disable all Adobe online services based workflows and entry points.
    I have tried to deploy the MSI with MST via GPO and Command Line with no luck.  Every time i deploy via below methods, the same result occurs, all of the options are set correctly except the "Make Reader the default PDF viewer".  I know how to manually set this option via Windows or Adobe interfaces but i am looking to roll this out to the masses and would not want a bunch of service desk calls because a user clicks on an Adobe PDF file and it is not opening in Adobe Reader.
    GPO
    Create New Package Use AcroRead.msi
    Choose Advanced
    Deployment Options - Click Uninstall this application when it falls out of the scope of management.
    Modifications - Select Transform file located in the folder of MSI
    Command Line.
    Tried these options to try and apply "Make Reader the default PDF viewer"
    msiexec /i  "<path>\AcroRead.msi" TRANSFORMS="<path>\TransformFile.mst"
    msiexec /i  "<path>\AcroRead.msi" TRANSFORMS="<path>\TransformFile.mst" /qn
    msiexec /i "<path>\AcroRead.msi" IW_DEFAULT_VERB=Read
    msiexec /i  "<path>\AcroRead.msi" TRANSFORMS="<path>\TransformFile.mst" IW_DEFAULT_VERB=Read /qn
    Anyone know how to make this setting work with the Transform file, i sure would appreciate assistance on this issue.

    Instead of saving as a PDF thru Work do a Print ➙ PDF ➙ Save as PDF and it will be saved the first time with the Preview icon.

  • Issue with setting a default value to a Tabular Form field

    Hi -
    I'm running into an issue setting the default value of a tabular form column. I'm trying to set the default value to the row number (#rownum#). This used to work in previous versions, but now it's returning 0. Is there a was to set this value in the default value attribute of the field with a substitution string?
    Thank you in advance for help!

    Share with us what worked in previous versions.
    Jeff

  • Issue with setting mm_username

    Folks,
    I'm new to DreamWeaver, and to web design in general, so I'm fairly sure I'm doing something obvious wrong. I have an SQL database with registered users in, I have a php login page, and I have a php "welcome" page, on which, I want to display the name of the user who's logged in.
    I'm able to log in fine, I have a restricted page for the "welcome", and I have my datasource set to filter on the session variable of mm_username. However, when the page opens, there's nothing returned. if I don't set the datasource to filter, then, data is returned.
    Here's the code for my login page:
    <?php session_start(); ?>
    <?php require_once('../../Connections/SpartansUsers.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    ?>
    <?php
    // *** Validate request to login to this site.
    if (!isset($_SESSION)) {
      session_start();
    $loginFormAction = $_SERVER['PHP_SELF'];
    if (isset($_GET['accesscheck'])) {
      $_SESSION['PrevUrl'] = $_GET['accesscheck'];
    if (isset($_POST['name'])) {
      $loginUsername=$_POST['name'];
      $password=$_POST['password'];
      $MM_fldUserAuthorization = "";
      $MM_redirectLoginSuccess = "Welcome.php";
      $MM_redirectLoginFailed = "userLogin.php";
      $MM_redirecttoReferrer = false;
      mysql_select_db($database_SpartansUsers, $SpartansUsers);
      $LoginRS__query=sprintf("SELECT username, password FROM users WHERE username=%s AND password=%s",
        GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text"));
      $LoginRS = mysql_query($LoginRS__query, $SpartansUsers) or die(mysql_error());
      $loginFoundUser = mysql_num_rows($LoginRS);
      if ($loginFoundUser) {
         $loginStrGroup = "";
        //declare two session variables and assign them
        $_SESSION['MM_Username'] = $loginUsername;
        $_SESSION['MM_UserGroup'] = $loginStrGroup;         
        if (isset($_SESSION['PrevUrl']) && false) {
          $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];   
        header("Location: " . $MM_redirectLoginSuccess );
      else {
        header("Location: ". $MM_redirectLoginFailed );
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    <!--
    body {
        font: 100% Verdana, Arial, Helvetica, sans-serif;
        background: #666666;
        margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
        padding: 0;
        text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
        color: #000000;
    .oneColElsCtr #container {
        width: 46em;
        background: #FFFFFF;
        margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
        border: 1px solid #000000;
        text-align: left; /* this overrides the text-align: center on the body element. */
    .oneColElsCtr #mainContent {
        padding: 0 20px; /* remember that padding is the space inside the div box and margin is the space outside the div box */
    -->
    </style></head>
    <body class="oneColElsCtr">
    <div id="container">
      <div id="mainContent">
            <form id="userLogin" name="userLogin" method="POST" action="<?php echo $loginFormAction; ?>">
              <table width="650" border="0">
                  <tr>
                     <td width="120">User Name</td>
                     <td width="520"><input name="name" type="text" id="name" size="75" /></td>
                  </tr>
                  <tr>
                     <td>Password</td>
                    <td><input name="password" type="password" id="password" size="75" /></td>
                  </tr>
                 <tr>
                    <td></td>
                    <td><input name="login" type="submit" value="Log In" /></td>
                  </tr>
            </table>
        </form>
        <!-- end #mainContent --></div>
    <!-- end #container --></div>
    </body>
    </html>
    And here's the code for my "welcome" page:
    <?php session_start(); ?>
    <?php require_once('../../Connections/SpartansUsers.php'); ?>
    <?php
    if (!isset($_SESSION)) {
      session_start();
    $MM_authorizedUsers = "";
    $MM_donotCheckaccess = "true";
    // *** Restrict Access To Page: Grant or deny access to this page
    function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {
      // For security, start by assuming the visitor is NOT authorized.
      $isValid = False;
      // When a visitor has logged into this site, the Session variable MM_Username set equal to their username.
      // Therefore, we know that a user is NOT logged in if that Session variable is blank.
      if (!empty($UserName)) {
        // Besides being logged in, you may restrict access to only certain users based on an ID established when they login.
        // Parse the strings into arrays.
        $arrUsers = Explode(",", $strUsers);
        $arrGroups = Explode(",", $strGroups);
        if (in_array($UserName, $arrUsers)) {
          $isValid = true;
        // Or, you may restrict access to only certain users based on their username.
        if (in_array($UserGroup, $arrGroups)) {
          $isValid = true;
        if (($strUsers == "") && true) {
          $isValid = true;
      return $isValid;
    $MM_restrictGoTo = "userLogin.php";
    if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {  
      $MM_qsChar = "?";
      $MM_referrer = $_SERVER['PHP_SELF'];
      if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
      if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0)
      $MM_referrer .= "?" . $QUERY_STRING;
      $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
      header("Location: ". $MM_restrictGoTo);
      exit;
    ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $colname_uDetails = "-1";
    if (isset($_SESSION['MM_username'])) {
      $colname_uDetails = $_SESSION['MM_username'];
    mysql_select_db($database_SpartansUsers, $SpartansUsers);
    $query_uDetails = sprintf("SELECT firstname, surname FROM users WHERE username = %s", GetSQLValueString($colname_uDetails, "text"));
    $uDetails = mysql_query($query_uDetails, $SpartansUsers) or die(mysql_error());
    $row_uDetails = mysql_fetch_assoc($uDetails);
    $totalRows_uDetails = mysql_num_rows($uDetails);
    ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    <!--
    body {
        font: 100% Verdana, Arial, Helvetica, sans-serif;
        background: #666666;
        margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
        padding: 0;
        text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
        color: #000000;
    .oneColElsCtr #container {
        width: 46em;
        background: #FFFFFF;
        margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
        border: 1px solid #000000;
        text-align: left; /* this overrides the text-align: center on the body element. */
    .oneColElsCtr #mainContent {
        padding: 0 20px; /* remember that padding is the space inside the div box and margin is the space outside the div box */
    -->
    </style></head>
    <body class="oneColElsCtr">
    <div id="container">
      <div id="mainContent">
        <?php echo 'Welcome, ' . $row_uDetails['firstname'] . ' ' . $row_uDetails['surname']; ?>
        <p>MM_username <?php echo $_SESSION['MM_username']; ?> should be here</p>
      <!-- end #mainContent --></div>
    <!-- end #container --></div>
    </body>
    </html>
    <?php
    mysql_free_result($uDetails);
    ?>
    If someone can tell me what it is I've done wrong, I'd really appreciate it, as it's driving me crazy!!

    In your 'welcome.php' page you have 3 instances of a lower case 'u' - 'MM_username' when they should be MM_Username.
    2 here:
    $colname_uDetails = "-1";
    if (isset($_SESSION['MM_username'])) {
      $colname_uDetails = $_SESSION['MM_username'];
    1 here:
    <p>MM_username <?php echo $_SESSION['MM_username']; ?> should be here</p>

  • Issue with set up of 2 new iPads on 4G

    Just purchased 2 new 4G ipads, during setup of 4G set mine up with my wifes name, email and cell phone as account info.  Thought i could set up both to this account.  after finding out it just moved the account, I then moved it back to mine and set hers up with using my info including cell number in the 4G account set up..  Issue is now txts from her to me show up as coming from me, same if i send one to her it shows up and she has sent...  This carries over to iphones also as it looks the same there two even though no changes to them.  The question is what is the easiest way to get these two iPads switched now?  would moving the contract on mine to her and  hers to mine work or do i have to do back ups and resture to the other machine, etc.??

    Knowing the way Apple works you will probably have to delete and create a new account for one of the two

  • Issue with setting the tag "Bld_localDestDir" in pre-build VI: Project gets saved to previous localDestDir.

    Hey All,
    I'm writing a pre-build VI that updates the build destination (and other items, but we're ignoring those for now). This pre-build vi, when run, grabs the Destination Directory from the tag "Bld_localDestDir" and modifies the directory by incrementing a version number.
    The issue I'm having is that after the pre-build vi is run, the build continues and puts the executable in the *previous* Destination directory instead of the updated one.
    Example:
    Destination Dir = c:\temp\version1   -->   Choose to build the executable   -->   Pre-build VI runs and sets Destination Dir to c:\temp\version2   -->   Build finishes and says "You can locate the build at C:\temp\version1"   -->   Check the build properties, destination dir is C:\temp\version2   -->   build again   -->   Pre-build runs and updates destination to version3   -->   Build finishes and says "you can locate the build at C:\temp\version2"   -->   check build properties, destination dir is C:\temp\version3
    And so on and so forth. As you can see, the tag setting is working (as witnessed by the Build Properties being updated). However, it looks like the destination directory for the build is determined and set *before* the pre-build VI is run. This is, in my opinion, not intended behavior.
    Here's a snippet of a watered-down version of the code, which still has the issue. I've also attached the full VI, saved for LV2010.
    The attached VI will grab the version number of the build, append it to the startup vi's title bar, update the build destinations with a new path that has the version number, and then save the project.
    As a final note, I'd prefer to not use a post-build VI to rename the directory that the build is placed in.
    Solved!
    Go to Solution.
    Attachments:
    Pre-Build Action 2010.vi ‏25 KB

    > Leah-L Said:
    > We were able to replicate your problem here as well. We are also seeing that the destination directory for the build is determined and set *before* the pre-build VI is run. Just so I am aware, have you found any other documentation concerning Pre-Build VI's?
    Cool, thanks for confirming that I'm not crazy.   And no, I haven't found any documentation concerning this phenomenon.
    > gmart Said:
    > it potentially processes the information and so simply updating values may not have the desired effect
    Good to know. I think this should be in the documentation somewhere though, perhaps in the detailed help for the Get/Set Tag invoke nodes for a Build Spec reference.
    To fix the issue, I've just made my own "Build Executable" vi that sets the tags before the build is started. It uses the same VI that I attached earlier (confirming that the VI works). Instead of starting the build from the project window and having a pre-build vi execute, I run this stand-alone VI and it builds the app.

  • Issue with setting an Action Listener for a Command Button

    Hi all,
    I'm trying to set an action listener for a CoreCommanButton in a backing bean. Here's my code:
         CoreCommandButton editBtn = new CoreCommandButton();
              MethodBinding mb = FacesContext.getCurrentInstance().getApplication().createMethodBinding("#{backBean.doButtonAct}",null);
              editBtn.setActionListener(mb);
    //Action listener method
         public void doButtonAct(ActionEvent actionEvent)
    I keep getting a javax.faces.el.MethodNotFoundException error. However when I remove the ActionEvent parameter in doButtonAct(), I get a wrong number of arguments error.
    So i'm guessing there is something wrong with the parameters i accept in my action listener method. what can be causing this issue?
    Cheers.

    I figured this out.
    Since doButtonAct() requires an ActionEvent object as a parameter, i needed to define the parameter type when I create the method binding.
    Solution:
         Class argsString[] = new Class[] { ActionEvent.class };
              MethodBinding mb = FacesContext.getCurrentInstance().getApplication().createMethodBinding("#{backBean.doButtonAct}",argsString);

Maybe you are looking for

  • J2ee security newbie: integrated authentication question

    I am trying to build a set of JSPs/servlets that require authentication and probably authorization. The jsp / sevlets should be able to authenticate against any underlying password system, or should cope with most common systems such as win2k / unix

  • Custom operator for advanced search in OIM

    Hi All, We have two operators like Equals and Begin with in Advanced users search. I want to search with new operator, Can we add any other new operators Regards user7609

  • PM Order integration with Controlling

    Dear All, Can anybody say detailed How to integrate  PM Order with Controlling? What is the T-code and How to see the effect?? Thanks and Regards Rakesh

  • Post processing agent in partner profile

    Hi Inbound idoc fails. The partner profile has a user (US) in the post processing:permitted agent, both on the actual partner (LS) and on the inbound message type. I would expect to see the error in the inbox of the business workplace, but I see noth

  • What is communication error 321*

    I just brought a officejet pro 8600 premium and I cannot send a fax. I get "A communication error occurred during the fax transmission. and I get error 321* This question was solved. View Solution.