Sapscript: Do not interpret two commas in text as tab

Since Sapscript interprets two commas in a row as a tab, this causes a problem for any form which prints out any text containing two commas. Does anyone know a way to get Sapscript to ignore these commas?

Hello friend,
Welcome to SDN.
The interpretation is different.
Situation 1
/: Do,,not,,interpret,,two,,commas,,in,,text,,as,,tab
"the output will look like below text with tabs in between each word.
Do  not interpret two commas  in  text  as  tab
Situation 2.
"Define two variables in script editor like below and display.
/: DEFINE text1 = 'Do not interpret two,,commas in text as tab'
/: DEFINE text2 = ',,Text will be displayed like this'
/: &text1&,,&text2&
"The output will be like below
Do not interpret two,,commas in text as tab ,,Text will be displayed like this
"It does not care what is there inside program symbols &text1& and &text2&
I think that you will understand.
Thanks
Venkat.O

Similar Messages

  • Why does text field in InfoPath 2010 show user name with two commas between first name and last?

    Here's the problem. I have a text field called Manager in an InfoPath 2010 form that is getting populated by a drop down field called
    Business Unit.
    The Business Unit drop-down field is pulling information from
    column A in a custom list via a managed data connection. The custom List has two columns:
    Title & Manager. 
    The Manager column in the custom list is a 'Person or Group' type column.
    The Data Connection pulls both the Title, Manager
    (and ID) data.
    There is a rule on the Business Unit drop-down field to change the value of the
    Manager text field with the Manager data on the custom list. The rule pulls the
    Manager information and filters the value to match the
    Business Unit on the Data Connection with the Business Unit drop-down
    field value (Main).
    The Business Unit drop-down field works great and pulls the value from the custom list, and the rule populates the Manager text field. The problem is that Manager text field shows the name as such:
    [smith,, john]. Notice the two commas between the last and first name. There should only be
    one comma!
    Anyone have an idea why the text field is appearing with two commas?
    Arnel

    Hi all,
    I have a workaround for this. I have an InfoPath 2010 form pulling data from a SP2010 list. The user chooses a System (Business Unit) from the dropdown list and that choice auto populates the associated user (Manager) for that system. I had to
    use concatenation, substring before and substring after to display the correct data.
    concat(substring-before(DisplayName, ",, "), ", ", substring-after(DisplayName, ",, "))
    DisplayName is the original data for the field. I am able to cut & paste this field into the formula. Therefore, I added a few spaces to separate it from the actually formula for future use.
    Select Insert Function
    Select concat
    Select the first link to double-click to insert field
    and then select Insert Function
    Select the Text category and choose substring-before
    Select the third link to double-click to insert field
    and then select Insert Function
    Select the Text category and choose substring-after
    Copy and paste your fieldname (in my case DisplayName) in the
    double-click to insert field
    parts of the substring-before and substring-after links.
    Delete the middle double-click to insert field link
    Add quotes, spaces and commas so that they match the following format:
    concat(substring-before(DisplayName, ",, "), ", ", substring-after(DisplayName,
    Translation:
    concat(substring-before(Doe,, John, ",, "), ", ", substring-after(Doe,,
    John, ",, "))
    Bring together all of the text before ",," (i.e. Doe) with ", " (comma, space) and all text after ",," (i.e. John).
    It should return
    Doe, John.
    I hope this makes sense. I have these instructions with screenshots if you need them, contact me.

  • " Can not interpret the data in file " error while uploading the data in DB

    Dear All ,
    After running the below report I am getting the " Can not interpret the data in file " error.
    Need to upload the data in DB through excel or .txt file.
    Kindly advise to resolve the issue.
    REPORT  ZTEST_4.
    data : it like ZPRINT_LOC occurs 0 with header line,
    FILETABLE type table of FILE_TABLE,
    wa_filetable like line of filetable,
    wa_filename type string,
    rc type i.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
    CHANGING
    FILE_TABLE = filetable
    RC = rc.
    IF SY-SUBRC = 0.
    read table filetable into wa_filetable index 1.
    move wa_filetable-FILENAME to wa_filename.
    Else.
    Write: / 'HI'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    start-of-selection.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    FILENAME = wa_filename
    FILETYPE = 'ASC'
    HAS_FIELD_SEPARATOR = 'X'
    TABLES
    DATA_TAB = it.
    IF SY-SUBRC = 0.
    Write: / 'HI'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    insert ZPRINT_LOC from table it.
    if sy-subrc = 0.
    commit work.
    else.
    rollback work.
    endif.
    Regards
    Machindra Patade
    Edited by: Machindra Patade on Apr 9, 2010 1:34 PM

    Dear dedeepya reddy,
    Not able to upload the excel but have sucess to upload the .csv file to db through the below code. Thanks for your advise.
    REPORT  ZTEST_3.
             internal table declaration
    DATA: itab TYPE STANDARD TABLE OF ZPRINT_LOC,
          wa LIKE LINE OF itab,
          wa1 like line of itab.
                       variable  declaration
    DATA: v_excel_string(2000) TYPE c,
           v_file LIKE v_excel_string VALUE    'C:\Documents and Settings\devadm\Desktop\test.csv',  " name of the file
            delimiter TYPE c VALUE ' '.         " delimiter with default value space
         read the file from the application server
      OPEN DATASET v_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc NE 0.
    write:/ 'error opening file'.
      ELSE.
        WHILE ( sy-subrc EQ 0 ).
          READ DATASET v_file INTO wa.
          IF NOT wa IS INITIAL.
            append wa TO itab.
          ENDIF.
          CLEAR wa.
        ENDWHILE.
      ENDIF.
    CLOSE DATASET v_file.
    EXEC SQL.
         TRUNCATE TABLE "ZPRINT_LOC"
    ENDEXEC.
    *------display the data from the internal table
    LOOP AT itab into wa1.
    WRITE:/ wa1-mandt,wa1-zloc_code,wa1-zloc_desc,wa1-zloc,wa1-zstate.
    ENDLOOP.
    insert ZPRINT_LOC from table itab.

  • DataControl does not expose a Commit operation

    Hi all,
    I'm using ADF & JDeveloperStudio Edition Version 11.1.1.3.0 PS2.
    I'm trying to insert a new row in my database from an input screen, using a task flow.
    My task flow has:
    - Behaviour -> Transaction set to Always Begin New Transaction: to create a new transaction when the flow starts.
    - method activity to call the Create operation from my DataControl
    - view activity for data-entry screen.
    - view activity for read-only, confirm screen to display the entered data and provide a Confirm button to proceed with inserting the data to the database.
    - return activity: has Behaviour -> End Transaction set to Commit to complete the insertion to the database. NOTE: I did not drag the Commit operation from my DataControl to the command button that navigates to this return activity—I explain below.
    Problem:
    When I hit the Confirm button on the confirm screen I get an HTTP 404 Error (The server has not found anything matching the Request-URI.)
    Nothing displays on either the Messages or Running: IntegragedWebLogicServer; nothing appears in the DefaultServer.log.
    I'm following [this section|http://download.oracle.com/docs/cd/E14571_01/web.1111/b31974/web_form.htm#sthref1906] from the Fusion Developer's Guide. I have deviated from the instructions on point 6 ("Because you need to commit the new data, the application needs to execute the commit operation of the data control. To do this, you can add a button that navigates to a return activity that calls the commit operation.") because my DataControl does not have a Commit operation. I suspect this is the cause of my problem.
    My DataControl was generated from a Session Bean, which was created from an Entity EJB, which was in turn generated from my database table (I have SELECT and INSERT grants on the table. All this is correct, I believe.
    I've compared my DataControl to that from JDeveloper's Cue Cards tutorial "Build a Web Application with EJB, JPA and JSF"; that tutorial's DataControl does not have a Commit operation either, but the tutorial does not try to use task flows.
    Any ideas as to why
    - I'm getting the error when I try to navigate from the confirm page to the return activity responsible for committing the insertion to the database?
    - my DataControl does not exhibit a Commit operation?
    Thanks for your help.
    Regards,
    Ken.

    Hi Shay,
    Thanks for response.
    I've tried your suggestion to call the persist... transaction method.
    Here are my steps:
    - Started with a fresh, even simpler task flow with only two activities: a view activity to display an input form, and a method activity to call the persistMyEntity(...) transaction method.
    - Added method activity, and dropped persistMyEntity(...) from my data control onto it. (Data control created from Session Bean.)
    - persistMyEntity(...) takes one parameter, a MyEntity object: I need to identify this parameter object using EL. There is no such object existing in any binding context at this point.
    - Added managed bean, of type MyEntity to the task flow in page flow scope. Updated the EL for the persistMyEntity(...) parameter to refer to this managed bean in page flow scope - *#{pageFlowScope.myEntity}*.
    - Added a view activity to task flow, and created the *.jspx* for it.
    - Dropped input text components onto the page for each of the entity's attributes that I want to persist to the database.
    - Manually bound the value for each input text component to the corresponding attribute in the managed bean - *#{pageFlowScope.myEntity.myAttribute}*
    When I run my task flow, I get following exception: oracle.jbo.NoDefException: JBO-25058: Definition myAttribute of type Attribute is not found in myAttribute.
    I would have thought I could expand the persistMyEntity(...) node within the Data Control panel and drag its parameter onto the screen as an ADF Form, with ADF looking after binding; then drag the persistMyEntity(...) method onto the method activity. My gut tells me I shouldn't have to add a managed bean to the task flow, of type required by the persistMyEntity(...) method, then manually bind it to the input text fields of the screen. It just seems 'wrong'.
    Is my approach incorrect?
    Many thanks,
    Ken.

  • SAPScript Image not printing

    Hi all,
    In SAPScript I can see an image in the print preview, but when i print it is not printing from spool, other text parts are printing.
    Please help me in solving this.
    Thanks

    Hi,
    It should print from spool. Please check the spool whether the image is there or not.
    Regards,
    Teddy Kurniawan

  • SQL to match a single value in a field with comma-delimited text

    I have a column that can contain none, one or many recordIDs
    (from another table) stored as comma-delimited text strings (i.e.,
    a list). I need to retrieve all records that match a single value
    within that list.
    For example, if I want to match all values that equal
    recordID 3, and I use ... WHERE MyColumn IN ('3') ... , I will get
    all records that have EXACTLY 3 as the value of MyColumn, but not
    any MyColumn records whose values include 3, if they are instances
    such as "3,17" or the like.
    Also using the LIKE operator -- as WHERE MyColumn LIKE '%3%'
    -- will get me unwanted records with values such as 35 or 13 ...
    Can I use some sort of intervening ColdFusion list processing
    to output only the desired records?

    Normalize your database so that your data becomes
    accessible.

  • Using Excel Functions, such as VLOOKUP to compare two columns of text for similarities

    My problem seems simple but I am struggling to figure it out. I have two columns of text. I am trying to see if the text in column B appears in column A. However, it is not always an exact match, and I basically want to check if column A contains the text
    that appears in column B. What is the best way to do this?

    In C2, use a formula like
    =IF(SUMPRODUCT(NOT(ISERROR(SEARCH(B2,$A$1:$A$1000)))*1)>0,"Found","Not Found")
    then copy down to match column B.
    This formula will return "Found" when the entire contents a cell in B is found somewhere in any cell in A1:A1000.  E.G.,  "red" in B2 is found in cell A100 which contains "I have a red dog"

  • SAPScript graphic not printing

    Hi Folks
    I have a problem in a 3.1i system (yes that's right 3.1i - ah those were the days...I remember when..etc).
    I have changed a SAPScript layout (just the contents of a text element in the main window) and this works fine. However something is now causing the logo in the header window to not print at all (neither print preview nor hard copy). The standard text is there but I can not get this to print out from SO10 either.
    I don't think I have changed anything that could have caused this and it may be coincidence, but does anyone have an idea of what could be causing it?
    During testing of this problem, I have created a new layout and included the same logo and other graphics all with no result. I have checked that all graphic are created from Tif files (version 6 no compression).
    Now I have run out of ideas...
    Thanks in advance.
    Nick

    Fixed it by uploading the image again. Don't know why it didn't work before but it does now.

  • Html code i have saved in TextEdit as .html is not interpreted by Safari

    I have entered simple html code in a new TextEdit.app document,
    saved it as web page (.html),
    opened as a file from Safari and the
    exact contents of the file are shown in my browser window
    ... it is not interpreted.
    (I was following a "create your first html..." tutorial)

    use textedit-format-Make Plain Text or set the preferences for New Document accordingly
    then save-as html will be unavailable, but you can name the file something.html & Safari should display as expected.

  • Making a two column for text page

    Lightroom may have a great photo editing set of capabilities, but text soooo leaves a lot to be desired.  Why isn't there a template in the book module for two columns of text on a page.  It seems like a no-brainer.  Does anyone have a workaround??  thanks

    For lots of issues that LR can't handle, I just use PS make the page I want, flatten it as jpg and import to LR.
    For text, even PS isn't really great, so I just use Word or Pages, copy the text into a blank page and flatten and save as jpg.
    Probably not how you WANT to work, but it does get the job done.
    I'll follow this thread just in case someone comes up with a better answer though :-)
    Cheers,
    Tom

  • Difficulty with pdf form trying to "choose" one of two paragraphs of text

    I am creating a PDF form and trying to find a way to choose one of two groups of text that are about paragraph long. and only having the the one I choose be visible on my pdf.  I tried using a dropdown list, but it would not accmodate the amount of text I needed

    OK, the following is for a single check box and a single field. If the check box is checked the multiline text field will display one block of text, and if unchecked, it will display the other.
    I'm goping to assume the text field is named "Text1". The Mouse Up JavaScript of the check box could then be:
    // Get a reference to the text field
    var f = getField("Text1");
    // Set the value of the text field depending
    // on the state of this check box
    if (event.target.value === "Off") {
        f.value = "Paragraph 1 goes here. You can use \rto indicate a carriage return.";
    } else {
        f.value = "Paragraph 2 goes here. Add as much text as you like...";
    Change "Text1" in the getField statement to match the name of your multiline text field.

  • Are not interpreted JSTL tags in a JSP page including in a servlet.

    Hi people,
    I have a project where una page (index.jsp) includes a servlet (MyServlet), that consult a persistence class and get a List of objects (Users),      
    then the servlet passes the List to a Request object and includes another JSP page (showUsers.jsp). And this is conceptually correct, but don´t works, the JSTL tags are not interpreted in showUsers.jsp.
    This is my code...
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
    <c:out value="Show me some things index.jsp"/>
    <div style="border-color:red; border:solid; padding-left:60px">
          <jsp:include flush="true" page="pepe/MyServlet"/>
    </div>
    </body>
    </html>...and the Servlet...
    public class MyServlet extends HttpServlet
         public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
              UserManager um = new UserManager();
              List users = um.getUsers(); //This use Hibernate to return a Users List
              request.setAttribute("users", (ArrayList) um.getUsers());
              request.getRequestDispatcher("/showUsers.jsp").forward(request, response);
    }...Finally, we have the showUsers.jsp file....
    <c:out value="Show me some thing showUsers.jsp"/>
    <table>
         <tr>
              <th>ID</th>
              <th>Name</th>
              <th>e-Mail</th>
              <th>Type</th>
         </tr>
         <tr>
              <c:foreach items="${requestScope.users}" var="user">
                   <td><c:out value="${user.id}" /></td>
                   <td><c:out value="${user.name}" /></td>
                   <td><c:out value="${user.email}" /></td>
                   <td><c:out value="${user.type}" /></td>
              </c:foreach>
         </tr>
    </table>This i get as result page...
    ID       Name       e-Mail       TypeFinally, this is the code of showUsers.jsp...
    <c:out value="Show me some thing showUsers.jsp"/>
    <table>
         <tr>
              <th>ID</th>
              <th>Name</th>
              <th>e-Mail</th>
              <th>Type</th>
         </tr>
         <tr>
              <c:foreach items="[src.User@18f729c, src.User@ad97f5, src.User@d38976, src.User@1e5c339, src.User@17414c8, src.User@7a17]" var="user">
                   <td><c:out value="" /></td>
                   <td><c:out value="" /></td>
                   <td><c:out value="" /></td>
                   <td><c:out value="" /></td>
              </c:foreach>
         </tr>
    </table>Somebody can help me?
    Many thanks,
    Gonzalo

    Thanks you all guys,
    I appreciate very much your help. In response to everyone ...
    BalusC wrote:
    Is JSTL taglib declared in top of that JSP page? I don't see it back in the posted code snippet. In this example I stuck...
    request.getRequestDispatcher("/showUsers.jsp").forward(request, response);By mistake, but this is just a test, the original line of my servlet is...
    request.getRequestDispatcher("/showUsers.jsp").include(request, response);As you can see, both (the servlet and the showUser.jsp file) are included in the index.jsp file. So the header...
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>...in the index.jsp file should works (I hope so).
    njb7ty wrote:
    I assume in your web.xml, you have ''pepe/MyServlet' defined as a servlet tag and servlet map tag? Without that, I don't think your JSP will find the servlet. I'm >not sure you need it in web.xml since I never call a servlet from a JSP page.
    I suggest putting System.out.println() throughout your servlet code and out.println() in your JSP pages to see exactly what is called and when.
    As a general rule, JSP files are to display data only, and submit back to a servlet. The servlet does all the business logic and dispatches to the appropriate >JSP page. The JSP shouldn't have any business logic. Including the servlet looks kinda like including business logic. Actually, in a MVC design, your >presentation, control, busines, and database layers have their own isolated responsibilities.
    I suggest the servlet put data as one java bean in request scope via request.setAttribute() and dispatch to the JSP page. The JSP page gets the data via ><useBean> tag. The JSTL gets the variables from the useBean tag and uses the data from there to display it. Really, this is my web.xml file...
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
         version="2.4">
         <servlet>
              <servlet-name>MyServlet</servlet-name>
              <servlet-class>src.MyServlet</servlet-class>
         </servlet>
         <servlet-mapping>
              <servlet-name>MyServlet</servlet-name>
              <url-pattern>/pepe/MyServlet/*</url-pattern>
         </servlet-mapping>
    </web-app>Regarding putting System.out.println() and out.println(), i did it and thats works.
    Respect of your last comment, I am not a expert in MVC, but I understand that the view layer can make calls to the Controller layer, I am wrong?
    evnafets wrote:
    It's not. However thats not code, but the generated HTML.
    As Balusc pointed out it's the result of running this JSP page without importing the tag library at the top.
    Because the tag library is not declared, it treats the <c:forEach> and other tags as template text, and basically ignores them.
    It then evaluates the ${items} attribute as an expression in template text, calling toString() on it.
    Cheers,
    evnafets      The file showUsers.jsp are included into the index.jsp page, that's have the header taglib. Could this works?
    BalusC wrote:
    njb7ty wrote:
    By the way, I dont think this is the correct format for the foreach tag:
    <c:foreach items="[src.User@18f729c, src.User@ad97f5, src.User@d38976, src.User@1e5c339, src.User@17414c8, src.User@7a17]" var="user">You're right friend.
    And that's my problem. Any ideas?
    Thanks everyone,
    Gonzalo

  • Jspf files are not interpretated when included? weblogic 8.1

    Well My problem is that jspf files are not interpretated when included
              into jsp files. stuff such as netui tags are included as text and
              printed as such?
              Does this mean that jspf files are only for pure HTML?

    Hey David
              I discovered the error its the special danish letters (which I cant even
              write here due to the charset). ae,oe,aa (???)
              When used as variable names in a jspf file and included they are
              misinterpreted. This is not the case in a jsp file.
              Its clearly a bug in BEA, but I replaced all occurrences and worked
              myself around it.
              David Karr skrev:
              > It's important to understand that JSP pages are compiled into servlet classes, and then loaded into the JVM. The servlet class is executed when the JSP page is loaded by the application.
              >
              > It's also important to understand the difference between an "include directive", and an "include action". The "directive" includes the text into the JSP page before it is compiled, so any JSP tags in the included text will be compiled as if they were part of the original page. The "action" includes the text at run-time, after the JSP is converted to a servlet and loaded into the JVM. If the result of your "include action" is a string of text with JSP tags, that string will be included in the result as-
              > is, without being compiled.
              >
              > From what you describe, I'm guessing you're using an include action, not an include directive. Reorganize your application to use include directives for your ".jspf" files, and you should be on the right track.

  • Upload Comma separated Text file.

    Hi all ,
    i would like to upload a comma seperated text file into an internal table using CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD but am not able to load correctly. Please let me know any aditional parameters should be pass to this FM.
    data **********
    060000012,1001,01052005,2.5,C123,0198345678912
    08000001,1001,01052005,5.0,C123,016545678912
    08000001,1002,02052005,2.5,C234,012345678912
    types  : Begin of ty_itab,
    pernr(10),
    ABS_ATT_TYPE(4),
    REC_CCTR(10),
    work_order(12),
    date(8),
    hours(8).
    types: end of ty_itab.
    data : itab type standard table of ty_itab with header line .
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
      EXPORTING
        FILENAME                = 'C:\LOAD.TXT'
         FILETYPE                = 'ASC'
        HAS_FIELD_SEPARATOR     = 'X'
       HEADER_LENGTH           = 0
       DAT_MODE                = SPACE
       CODEPAGE                = SPACE
       IGNORE_CERR             = ABAP_TRUE
       REPLACEMENT             = '#'
       READ_BY_LINE            = 'X'
    IMPORTING
       FILELENGTH              =
       HEADER                  =
      CHANGING
        DATA_TAB                = itab[]
      EXCEPTIONS
        FILE_OPEN_ERROR         = 1
        FILE_READ_ERROR         = 2
        NO_BATCH                = 3
        GUI_REFUSE_FILETRANSFER = 4
        INVALID_TYPE            = 5
        NO_AUTHORITY            = 6
        UNKNOWN_ERROR           = 7
        BAD_DATA_FORMAT         = 8
        HEADER_NOT_ALLOWED      = 9
        SEPARATOR_NOT_ALLOWED   = 10
        HEADER_TOO_LONG         = 11
        UNKNOWN_DP_ERROR        = 12
        ACCESS_DENIED           = 13
        DP_OUT_OF_MEMORY        = 14
        DISK_FULL               = 15
        DP_TIMEOUT              = 16
        NOT_SUPPORTED_BY_GUI    = 17
        ERROR_NO_GUI            = 18
        others                  = 19
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Thx
    Palani

    as you are telling that is comma delimited then save the file as comma delimited,
    this can be done uisng excel , open the text fiel with excel and save it as .csv file. and try ...
    or else i will tell another solution for it...
    Data: begin of itab occurs 0,
          rec(1000) type c,
          end of itab.
    Data: begin of itab2 occurs 0,
          matnr type mara-matnr
          werks type marc-werks
          quant(10) type c.
          end of itab2.
      file = 'C:test.txt'.
      call method cl_gui_frontend_services=>gui_upload
        exporting
          filename                = file
        filetype                = 'ASC'
         has_field_separator     = 'X'
        changing
          data_tab                = itab
      exceptions
        others                  = 17
      if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    Loop at itab.
    clear itab2.
    split itab-rec at ',' into itab2-matnr
                               itab2-werks
                               itab2-quant.
    append itab2.
    endloop.
    you can do using any of the one...

  • Jsp:include tag does not preserve encoding of the text

    hi
    I am using Apache web server and Tomcat 4.1.
    I have a jsp:include tag (in say test1.jsp) and I am trying to include a data1.html file. This html file contains UTF-8 encoded text. When this JSP is executed, the UTF-8 text is displayed as garbage characters.
    I have included following in the JSP
    <%@ page contentType="text/html; charset=UTF-8" %>
    I have included following in the info.html
    <meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
    However if I rename the info.html to data1.jsp and then include, the UTF-8 text gets displayed correctly.
    I suppose, the JSP engine does not interprete the content of the html file correctly according to its encoding.
    Where as if it is a .jsp, then it is int erpreting it appropriately?
    Can anybody throw some lite on this?
    regards
    haresh
    sample files.......
    test1.jsp..........
    <%@ page contentType="text/html; charset=UTF-8" %>
    <%
    response.setContentType("text/html; charset=UTF-8");
    %>
    <HTML>
    <HEAD>
    <meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
    </HEAD>
    <BODY>
    <jsp:include page="data1.html" flush="true"/>
    </BODY>
    </HTML>
    data1.html.....
    <meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
    <br>
    &#2361;&#2366;&#2340;&#2368; &#2328;&#2381;&#2351;&#2366;&#2354; &#2340;&#2375; &#2340;&#2337;&#2368;&#2360; &#2344;&#2381;&#2351;&#2366;.
    <br>

    Your generated HTML will be flawed.
    The output of the included JSP is included in the outputstream of the enclosing one.
    Browsers will normally skip any illegal tags when encountered. This included your complete html headers from the included jsp and may (depending on the browser) include all code after the html close tag from that jsp.
    Stricter browsers may simply refuse to display anything at all.
    Read up on what the include mechanism exactly does and on wellformed HTML.

Maybe you are looking for