How to tackle " . " or " , "Comma DECIMAL notations in text file uploading?

Hi Experts,
I hv to upload the text file via LSMW and creating the Purchse Orders.
So, issue is with QUANTITY and VALUE fileds, bcoz, the text file may some times contain " . " as DECIAML or may some times " , "(comma-Europe) as DECIMALs.
And some times this LSMW may run by US guys, where " ." is DECIMAL and some times Europe guys, where " , " is DECIMAL.
So, request u that, let me know that, How to handle all situations? Is there any FM?
thank u

Hello Srinivas
The easiest approach would be the organizational one:
Assuming that all relevant values have at most two digitals then export all values without decimal sign and interpret the last two digit of any values as decimals values (this approach is used in many EDI messages).
The second approach would be to include a "marker" about the decimal notation in the file.
However, I would always recommend to use the simplest approach (= 1st approach).
Regards
  Uwe

Similar Messages

  • How to output a query results into a text file

    How to output a query results into a text file instead of outputing it to the screen..
    is there a way for us to write a SQL query which specifies to output the query results to a text file.
    Pls let me know how to do it
    Thanking u in advance
    regards
    Muraly

    Muraly,
    If you are using SQL*Plus 8.1.6 or later, you can also spool output to a file in HTML format, eg
    SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON
    SPOOL c:\temp\report.html
    SELECT DEPARTMENT_NAME, CITY
    FROM EMP_DETAILS_VIEW
    WHERE SALARY>12000;
    SPOOL OFF
    SET MARKUP HTML ENTMAP OFF
    In iSQL*Plus 9.0.1 (the browser-based interface to SQL*Plus) onwards, you can also send the HTML output to a new web browser window, or an html file -- much easier than the command line method.
    Alison

  • How do i read complete line from a text file in j2me?????

    how do i read complete line from a text file in j2me????? I wanna read file line by line not char by char..Even i tried with readUTF of datainputstream to read word by word but i got UTFDataFormatException.. Please solve my problem.. Thanks in advance..

    That is not my problem . i already read it char by char.. i am getting complete line..But this process is taking to much time..So thats why i directly wanna read complete line or word to save time..

  • How to create Base Dimensions with MaxL and Text File?

    Hi,
    Doing a scratch rebuild of a cube every month. Don't want to have a 'dummy' outline with base dimensions to copy over every build. Instead want to build from text file somehow. Thus my plan is to: 1) Delete the existing app/db 2) Create a new blank app/db 3) Create the base dimensions in the outline via text file and 4) Build entire outline via a text file. I'm stuck on #3 how to get the 'base dimensions' built via text file. I need:
    ACCOUNTS
    PERIOD
    VALUE
    VIEWS
    SCENARIO
    CUSTOM4
    YEAR
    CUSTOM3
    CUSTOM2
    ENTITY
    CUSTOM1
    I see this MaxL, but it uses a 'rules file' and I never have built a rules file to create base dims so I'm confused if it's possible or not...
    import database sample.basic dimensions
    from data_file '/data/calcdat.txt'
    using rules_file '/data/rulesfile.rul'
    on error append to '/logs/dimbuild.log';

    We rebuild our Departments and Organization from an enterprise hierarchy master each week.
    The way we implemented (what you call #3) was to not do #1 and #2, but to have a "destructive" load rule for each of these dimensions using a text file. (in the "Dimension Build Settings" for the load rule, select "Remove Unspecified" to make it destructive)
    The text file just has the dimension name (parent) and any children we needed defined in a parent/child relationship. For instance
    "Sales Departments" "0100-All Departments"
    This essentially works the same as deleting the app because the destructive load rules will drop all the blocks of data that were unspecified.
    Then we run our SQL load rule to build the rest of the dimensions from the Location Master.
    We perform a level-0 export prior to this process, then reload the level-0 data and execute all the consolidation scripts to get the data back (now in a current enterprise defined hierarchy)

  • SQL Loader-How to insert -ve & date values from flat text file into coloumn

    Question: How to insert -ve & date values from flat text file into coloumns in a table.
    Explanation: In the text file, the negative values are like -10201.30 or 15317.10- and the date values are as DDMMYYYY (like 10052001 for 10th May, 2002).
    How to load such values in columns of database using SQL Loader?
    Please guide.

    Question: How to insert -ve & date values from flat text file into coloumns in a table.
    Explanation: In the text file, the negative values are like -10201.30 or 15317.10- and the date values are as DDMMYYYY (like 10052001 for 10th May, 2002).
    How to load such values in columns of database using SQL Loader?
    Please guide. Try something like
    someDate    DATE 'DDMMYYYY'
    someNumber1      "TO_NUMBER ('s99999999.00')"
    someNumber2      "TO_NUMBER ('99999999.00s')"Good luck,
    Eric Kamradt

  • How do I overide the values in the text file

    I am reading a text file using loadvars, to get some values
    such as
    &yourid=123456 from the text file.
    How do I overide the values in the text file
    <PARAM NAME=movie VALUE="jamietrailer.swf?yourid=65432
    <---- this doesn't seem to work
    So I can change the values from the html file?

    I want to do this:
    # It should look like this:
    <PARAM NAME=movie VALUE= "movie.swf?text=hello">
    # Find the EMBED tag. Look for this:
    <EMBED src="/support/flash/ts/documents/movie.swf"
    # Again, replace the filename "movie.swf" with
    "movie.swf?text=hello".
    It should look like this:
    <EMBED
    src="/support/flash/ts/documents/movie.swf?text=hello"
    Is this supposed to overide the value I am reading using
    loadvars?
    or do I have to not read the value from the file if I am
    going to give it a value in html?

  • How can I convert a mp3 to a text file?

    How can I convert a mp3 to a text file?

    Agree with dwb
    .. and wanted to say hi from my Schnauzer....

  • How can i link a video to a text file on iPad2

    how can i link a video to a text file on iPad2

    Alrite mate,cheers for replying....You are right,my mistake,,It is Frame and not Panel...therefore Frame 1 is home and Frame 2 is Add User. Frame 1 has a button called Add User,which if i press it should run and open up my Frame 2. I can run Frame 1 and 2 seprately and it works fine,but Now i want to link them. So When i run Frame 1 at first i only get Frame 1,but then when i press Add User button my program should start Frame 2.Resuting in 2 Frames opened. I dont know how to link them.

  • How To Re-Input More Data To A Text File?

    I was wondering if anyone could tell me how to re-input more data into a text file? I don't want to over-write the text file, but just add more data to it. The current code i have is:
    import java.util.Scanner;
    import java.io.*;
    class trialanderror002 {     
    public static void main(String args[]){     
         Scanner input = new Scanner(System.in);
         String str;
    FileOutputStream out;
    PrintStream p;
    try{
         out = new FileOutputStream("c:\\products.txt");
         p = new PrintStream(out);
         System.out.println("Please insert text to be written to file...");
         str = input.next();
         p.println (str);
         p.close();
    catch (Exception e){
         System.err.println ("Error writing to file");
    Basically, after each time the program is ran, i'd like to insert another line of data into products.txt.
    Is there a way for me to loop the program too and not remove the data from the text file?
    thanx...

    just one more question...
    i've figured out the code to retrieve the text file and print it to screen...but how do i go about only printing parts of my text file?
    So supposing my text file has 5 lines of data/text etc, how would i make it print the first line?...or the second line?...or the third....etc etc...
    the current code i now have is:
    package Assignment1;
    import java.util.Scanner;
    import java.io.*;
    class trialanderror002 {     
    public static void main(String args[]){     
         Scanner input = new Scanner(System.in);
         String str;
    FileOutputStream out;
    PrintStream p;
    try{
         out = new FileOutputStream("c:\\trial.txt", true);
         p = new PrintStream(out);
         System.out.println("Please insert text to be written to file...");
         str = input.next();
         p.println (str);
         p.close();
    catch (Exception e){
         System.err.println ("Error writing to file");
              try {
              FileReader file = new
              FileReader("c:\\trial.txt");
              BufferedReader buff = new
              BufferedReader(file);
              boolean eof = false;
              while (!eof){
                   String line = buff.readLine();
                   if (line == null)
                        eof = true;
                   else
                        System.out.println(line);
              buff.close();
              }catch (IOException e){
                   System.out.println("Error -- " + e.toString());
    }

  • How to do setting of  decimal notation and arithmatic and character note

    Hi colleagues
    I do have one problem
    And the following setting tried in SAP netweaver so do not give any hint for Netweaver
    The problem is stated as follows
    in output type in Germany they use , instead of . the dot signifies point that is .
    and we use , as a seperator in means suppose we have to write 2000 we write like wise means as per our requirement whether we need to mention 2.000 or 20.00 but in germany they use comma ,
    so in output type display point the problems are increasing and they are not getting solved.
    so it is the question of compatibility
    what went wrong i am unable to understand
    is there is any significance of country specific setting of decimal notation
    or any thing need hint towards the same.

    Hi
    For your output type assign a smartform and in the smartfrom write the program that the decimals should come like , instead of . then your requirement can be fulfilled
    Also check in OY04 wheather you can maintain or not
    Regards
    Srinath

  • How often have inverted commas in an inserted text to be doubled?

    Hello,
    if I want to insert a text into a string field and the text contains inverted commas, how often have these inverted commas to be doubled, to avoid inserting errors and to keep the original inverted commas after insertion?
    Example "this is a text to be inserted and it contains *'text in inverted commas'* and normal text" How has it to look to keep the single inverted commas in the the text after inserting it?
    Regards
    Carsten

    Use (a) the quote operator or (b) escape quotes.
    For the first case, assuming you're on 10g or higher, your example would be:
    Insert into tab1 values( q'{this is a text to be inserted and it contains 'text in inverted commas'}'); For the second case, simply add a single quote to escape another. Your example would be:
    Insert into tab1 values( 'this is a text to be inserted and it contains ''text in inverted commas'''); (Notice the trailing quote is the end-quote for the entire text.)
    Edited by: Sharma on Mar 21, 2011 4:26 PM

  • Want to know how to check for new line character in text file

    Hi All,
    I`m trying to read data from text file. However I`m not sure whether the data is in 1st line or nth line. Now I`m trying to read the text from the readline. But if text is "" and not NULL then my code fails. So I want to know how to check for new line character and go to next line to find the data. Please help.
    Thanks
    static int readandwriteFile(Logger logger,String filepath){
              BufferedWriter out = null;
              BufferedReader in = null;
              File fr = null;
              int get_count = 0;
              try     {
              if(new File(filepath).exists())
              fr= new File(filepath);
                        System.out.println("FileName: "+fr);
                   if(fr != null){
    in = new BufferedReader(new FileReader(fr));
                             String text = in.readLine();
                             if(text != null){
                             get_count = Integer.parseInt(text);
                             in.close();
                             else{
                                  get_count = 0;
         else{                    
    out = new BufferedWriter(new FileWriter(filepath));
         out.write("0");
                out.close();
                   }          //Reading of the row count file ended.
              catch(Exception e) {
                   e.printStackTrace();
              finally {
                   try{               if (in != null) {
                             in.close();
              if (out != null) {
                             out.close();
              catch(Exception e) {
                        e.printStackTrace();
              return get_count;
         }

    You are calling the readline() only once which means you are reading only the first line from the file...
    Use a loop (Do-While preferably)
    do{
    //your code
    }while(text == "")

  • How to make an applet to read the Text file present inside a jar

    Hi All,
    I have writen one applet named ReadFile.java which reads a text file present in the same directory and does some manipulation of text file contents.
    The applet code runs successfully when i run the applet in command prompt like
    {color:#ff0000}*java ReadFile*{color}
    And i am getting the needed results.
    Then i made a jar file with the applet code and text file as
    {color:#ff0000}*jar cvf rf.jar ReadFile.class File1.txt*{color}
    Then i have inlcuded this applet inside a html file as
    {color:#ff0000}*<applet code= "ReadFile.class" width= "500" height= "300" archive = "rf.jar" ></applet>*{color}
    after this when i load the html file, the applet code is not executed fully. Its throwing FileNotFoundException: File1.txt.
    Applet is not recognizing trhe text file present inside the jar file.
    Can any body explain me how to overcome this problem. Any setting needs to be done for making the applet indicate the presence of Text file inside the jar file.

    what code in your applet gets the text file and reads it? are you using getResource or something similar?

  • How can I write some informations in a text file ?

    Hello.
    I am a beginner in java in general and in Web Dynpro Java in particular.
    I have to work in an application written by a consultant wich works no more at my office.
    Due to performances problems (slowness of the application at unpredictable instants),
    I have to write in an external file all the actions which make the users in the application.
    The problem is I don't know how to proceed.
    Somebody can help me ?
    Edited by: Serge L. on Aug 10, 2009 2:21 PM

    Hi Serge,
    You can try this as well to generate a text file.
    Use Filedownload UI element. And try following code in Webdynpro.....
    IOUtil IOUtil=new IOUtil();
    File f = new File("skill_master.txt");
    FileWriter fw = new FileWriter(f);
    fw.write(formattedStr);
    fw.close();
    InputStream template  = new FileInputStream(f);
    ByteArrayOutputStream templateSourceOutputStream = new ByteArrayOutputStream();
    IOUtil.write(template, templateSourceOutputStream);
    IWDCachedWebResource resource=WDWebResource.getWebResource(templateSourceOutputStream.toByteArray(), WDWebResourceType.getWebResourceType( "txt","text/html"));
    resource.setResourceName("User.txt");
    wdContext.currentContextElement().setVa_FileData(resource);
    Here formattedStr is the string which contain all the contents you want in the file. Here Va_FileData  attribute is of type com.sap.ide.webdynpro.uielementdefinitions.Resource.
    Map this Va_FileData attribute to the Filedownload UI. So that when u click on the FileDownload UI it will generate a txt file.
    Hope it helps you.
    Regards,
    Swati

  • How to update and delete records in a text file?

    Hi,
    I had a text file in which contains records line by line with ',' as delimiter as I use stringtokenizer and vector to read the data.
    The format in the text file likes: Name, Sex, Age.
    I want to add 2 functions:
    (1) update the record by name, sex or age;
    (2) delete the whole line of record;
    Do I need to open a temp text file to do it?
    And, what is the algorithm can be suggested?
    For both of them, I want to firstly read the total line numbers. Then, the line number + Name, Sex, Age will be displayed on the console window. User can choose which line of record to update or delete.
    Or, user can search name in order to do that.
    But, what is the backend algorithm to handle it? If I have 10 lines of record, I want to delete 7th line, the 7th line of the text file will be blanked. How can I move 8th, 9th and 10th lines of records up by one line in order to fill the blank line?
    Do I need to copy the first 6 lines to a temp text file and copy the last 3 lines of records to the same temp file first? and then copy all the content of that temp file back to the original text file? If so, how can I copy the same format of the original file (with '\n') to the temp file? I need the same data structure likes Name, Sex, Age.
    However, when I add records, I need to append the text in the original text file, not override it's current content.
    Any advice?
    Thanks
    gogo

    If your file is not designed to be amazingly large, then you don't need to use a temporary file -- you can just read the data into memory and manipulate it there. (Like, into a Document object or something.)
    But if you are dealing with really large files, you might want to consider using a database back end instead of a text file, which is a completely different approach I know but... well, that's why databases were invented.

Maybe you are looking for