Read Excel file path in WD

Hi,
We want to read a excel file. For that we are using file upload UI element and HSSF POI to read excel file. The code to read the excel file is working fine in standalone. In standalone we are hardcoding the file path. But in WD application, we are not hard coding it.
We are using following code to supply the file name to HSSF code through  file upload UI:
try
         InputStream in = new FileInputStream(wdContext.currentContextElement  
                                           ().getFileResource());
         wdComponentAPI.getMessageManager().reportSuccess("IN "+in);
         HSSFWorkbook wb  = new HSSFWorkbook(in);
catch (Exception e)
     wdComponentAPI.getMessageManager().reportSuccess("ERROR in HSSF");
Where FileResource is a context variable binded with property "data" of FileUpload UI element.
Now, the problem is that the excel file is not getting read. We are getting ERROR in HSSF message.
Please help in reading the file path.
Regards,
Vaibhav

Hi,
   Try this:
InputStream in = wdContext.currentContextElement().getFileResource().read(false);
Regards,
Satyajit.

Similar Messages

  • How to read Excel file in java

    Respected sir/madam
    I want to read the values from Excel file in Java program. How can I do that. When I searched over the net I came to know that you can treat Excel file as a Database and write the code as u write for making DB connections .
    I did that but i am getting the following error ..can anybody please help..
    This is the code what i have written
    import java.io.*;
    import java.sql.*;
    public class ReadExcelFile {
    Connection c;
    Statement stmnt;
    public void checkABA_Number()
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    c = DriverManager.getConnection("jdbc:odbc:ExcelTest","",""); // ExcelTest is the DSN name
    stmnt = c.createStatement();
    ResultSet rs = stmnt.executeQuery("select * from abadata"); // abadata is my Excel file name
    while(rs.next())
    System.out.println(rs.getString(1)+" "+rs.getString(2));
    }catch(Exception e)
    System.out.println(""+e.toString());
    finally
    try
    stmnt.close();
    c.close();
    catch( Exception e )
    System.err.println( e );
    public static void main(String[] args)
    new ReadExcelFile().checkABA_Number();
    My Excel file starts from the first row and first column and also the first row contains the names of the column.
    It give me the following error..
    java.sql.SQLException: [Microsoft][ODBC Excel Driver] The Microsoft Jet database engine could not find the object 'abadata'. Make sure the object exists and that you spell its name and the path name correctly.
    How can I deal with this.?I have properly selected the worksheet while giving the DSN . Is there any versionig problem with Excel or some drivers are in appropriate..and yes i chose Microsoft Excel Driver (.xsl) from ODBC .
    I created System DSN.
    Can anybody please help me with this ? I will be very gratefull for replies
    Thanks in advance

    here is the code to read excel file
    public void readexel(String filename)
    Connection c = null;
    Statement stmnt = null;
    try
    Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
    c = DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};DBQ=" + filename);
    stmnt = c.createStatement();
    String query = "Select * from [Sheet1$]" ;
    ResultSet rs = stmnt.executeQuery( query );
    while( rs.next() )
    System.out.println( rs.getString(1) );
    catch( Exception e )
    System.err.println( e );
    }

  • Error reading excel file using POI.

    Hi ,
    I am having some problem when reading the excel file.
    While reading excel file I am getting error-java.io.IOException: Unable to read entire block; 4 bytes read; expected 512 bytes.
    part of my code:-
    InputStream stream = objFormFile.getInputStream();
    POIFSFileSystem fs = new POIFSFileSystem(stream);//getting above error here.
    HSSFWorkbook wb = new HSSFWorkbook(fs);
    Case 1:
    I download the file on the system ,save it ,and then directly upload it to the system ,I get the above error .
    Case 2:
    It works fine if I download the excel and manually open and save it and then upload it .
    I am using JDK1.4.1 and poi-2.5.1-final-20040804.jar.
    Can any one please help me out for the above problem?
    Edited by: hruday on Jul 31, 2008 3:20 AM

    Instead of using POIFSFileSystem, try to directly create the HSSFWorkbook
    InputStream stream = objFormFile.getInputStream();
    //POIFSFileSystem fs = new POIFSFileSystem( stream );//getting above error here.
    HSSFWorkbook wb = new HSSFWorkbook( stream );

  • Open data set for reading excel file on application server in back ground

    open data set for reading excel file on application server in back ground

    hi Vijay,
    I am afraid you won't be able to read from Excel file on Appl. Server.
    ec

  • Error while reading excel file from application server into internal table.

    Hi experts,
    My requirement is to read an excel file from application server into internal table.
    Hence I have created an excel file fm_test_excel.xls in desktop and uploaded to app server using CG3Z tcode (as BIN file type).
    Now in my program I have used :
    OPEN DATASET v_filename FOR INPUT IN text mode encoding default.
    DO.
    READ DATASET v_filename INTO wa_tab.
    The statement OPEN DATASET works fine but I get a dump (conversion code page error) at READ DATASET statement.
    Error details:
    A character set conversion is not possible.
    At the conversion of a text from codepage '4110' to codepage '4103':
    - a character was found that cannot be displayed in one of the two
    codepages;
    - or it was detected that this conversion is not supported
    The running ABAP program 'Y_READ_FILE' had to be terminated as the conversion
    would have produced incorrect data.
    The number of characters that could not be displayed (and therefore not
    be converted), is 445. If this number is 0, the second error case, as
    mentioned above, has occurred.
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_CONVERSION_CODEPAGE', was not
    caught and
    therefore caused a runtime error.
    The reason for the exception is:
    Characters are always displayed in only a certain codepage. Many
    codepages only define a limited set of characters. If a text from a
    codepage should be converted into another codepage, and if this text
    contains characters that are not defined in one of the two codepages, a
    conversion error occurs.
    Moreover, a conversion error can occur if one of the needed codepages
    '4110' or '4103' is not known to the system.
    If the conversion error occurred at read or write of  screen, the file
    name was '/usr/sap/read_files/fm_test_excel.xls'. (further information about
    the file: "X 549 16896rw-rw----201105170908082011051707480320110517074803")
    Also let me know whether this is the proper way of reading excel file from app server, if not please suggest an alternative .
    Regards,
    Karthik

    Hi,
    Try to use OPEN DATASET v_filename FOR INPUT IN BINARY mode encoding default. instead of OPEN DATASET v_filename FOR INPUT IN text mode encoding default.
    As I think you are uploading the file in BIN format to Application server and trying to open text file.
    Regards,
    Umang Mehta

  • Jar files required to read excel file in SAP PI 7.3.1 sp09 dualstack

    Hi experts,
    I need to read excel file (.xls) using SAP PI and process it to target system. I have read blogs
    and found that there are 2 ways to read an excel file in PI using file adapter.
    1) Developing a custom adapter module
    2) Using XSLT code.
    So in order to develop a custom adapter module, i have followed the following blogs
    **************** - XI - Step-by-step guide to develop Adapter Module to read Excel file
    and
    Excel Files - How to handle them in SAP XI/PI (The Alternatives)
    and
    http://wiki.scn.sap.com/wiki/display/ABAP/Adapter+Module+To+Read+Excel+File+with+Multiple+Rows+and+Multiple+Columns
    I am unable to find the jar files in SAP PI at OS level as per the first blog(think they were obsolete).
    Please let me know
    1) What are the required jar files needed to read excel file and their location
    2) Even if i use the old jar files as mentioned in the first blog can i achieve my requirement
    3) Following this blog Convert incoming XML to Excel or Excel XML – Part 1 - XSLT Way if i apply the same logic at sender side, will it work? Because through case studies i came to know that we cannot read a .xls file using XSLT code. Correct me if i am wrong.
    Looking for your valuable suggestions.
    Regards
    Shilpa

    Hi Shilpa
    Welcome to SCN!
    The blog you refered to might be for previous versions of PI. You can refer to the following two wikis to find out what are the relevant JAR files for PI 7.3 and also how to get them.
    XI libraries for development - Process Integration - SCN Wiki
    Where to get the libraries for XI development - Process Integration - SCN Wiki
    It also looks like for newer versions, you might not need to manually get and add those JAR files into your NWDS project - please refer to the first comment on the blog below. I have not tried it personally as I'm not using the latest NWDS, but you can try that first, and if it does not work, then go get them manually.
    PI 7.4 - Adapter Module Creation using EJB 3.0
    Do note that you should be using the JAR files that is corresponding to your PI server version.
    As for your third question, that does not apply to you. XLS is the older non-XML format, and therefore cannot be read by XLST since it is in binary format.
    Rgds
    Eng Swee

  • Adapter module to read excel file -java code required for PI 7.1

    Hi PI experts,
    I am working on PI 7.1 SP 08.
    I am trying to develope an adapter module to read excel file
    http://wiki.sdn.sap.com/wiki/display/ABAP/AdapterModuleToReadExcelFilewithMultipleRowsandMultiple+Columns
    but here in this wiki , given java code is for pi 7.0 and it is using jar file from PI 7.0
    I tried with using corresponding PI 7.1 files
    com.sap.aii.af.lib.mod.jar:
    sap.comtcloggingjavaimpl.jar:
    com.sap.aii.af.svc_api.jar:
    com.sap.aii.af.cpa.svc_api.jar:
    com.sap.aii.af.ms.ifc_api.jar:
    jave program is not throwing any error in NWDS but After deploying file on server.
    i am getting this errot in communication channel
    2009-12-15 15:47:08 Information AO: Now calling the Convert Method to convert Excel to XML.
    2009-12-15 15:47:08 Error MP: exception caught with cause javax.ejb.TransactionRolledbackLocalException: nested exception is: java.lang.RuntimeException: java.lang.UnsupportedClassVersionError: Bad version number in .class file; nested exception is: javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: java.lang.UnsupportedClassVersionError: Bad version number in .class file; nested exception is: javax.ejb.EJBTransactionRolledbackException: nested exception is: java.lang.RuntimeException: java.lang.UnsupportedClassVersionError: Bad version number in .class file; nested exception is: javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: java.lang.UnsupportedClassVersionError: Bad version number in .class file
    since i am not a JAVA expert so i am unable to resolve this error
    if some one has already deployed this module for PI 7.1, then please provide me java code for PI 7.1
    Thanks
    sandeep sharma

    hi,
    please try this:
    obj = inputModuleData.getPrincipalData();
    msg = (Message) obj;
    amk = new MessageKey(msg.getMessageId(),msg.getMessageDirection());
    XMLPayload xpld = msg.getDocument();
    Workbook wb = Workbook.getWorkbook((InputStream) xpld.getInputStream());
    xmldata ="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n"+ "<ns0:"msgType" ""xmlns:ns0=\""nameSpace+"\">";
    Cell[] cells ;
    Cell[] cellNames ;
    cellNames = wb.getSheet(0).getRow(0);
    for(int j=1;j<wb.getSheet(0).getRows();j++)
    xmldata = xmldata+"<Record>";
    cells = wb.getSheet(0).getRow(j);
    for(int i=0;i<wb.getSheet(0).getColumns();i++)
    xmldata = xmldata"<"cellNames<i>.getContents()">"cells<i>.getContents()"</"cellNames<i>.getContents()+">";
    xmldata = xmldata+"</Record>";
    xmldata = xmldata"</ns0:"msgType+">"; 
    wb.close();
    byte byt[] = xmldata.getBytes();
    xpld.setContent(byt);
    inputModuleData.setPrincipalData(msg);
    Thanks,
    Mayank

  • Customised module for reading Excel files.

    Hi Gurus,
    I have to develop a customsed java module for reading Excel files from PI. I downloaded NWDS 7.31 from following location NWDS Download links - Java Development - SCN Wiki. I have installed it on my local laptop. For developing the module I need following Jar files.
    com.sap.aii.af.ms.svc_api
    com.sap.aii.proxy.svc_api.jar
    com.sap.aii.sec.svc_api.jar
    com.sap.aii.utilxi.server.jar
    com.sap.aii.utilxi.core.jar
    com.sap.xi.mapping.tool.lib_api.jar
    sap.com~tc~bl~txmanagerimpl~plb~impl.jar
    sap.com~tc~je~appcontect_api~API.jar
    com.sap.aii.af.cpa.svc.api
    com.sap.aii.af.lib.mod
    com.sap.aii.af.ms.ifc_api
    com.sap.aii.af.svc_api
    com.sap.xpi.ib.mapping.lib
    1. Where can i get these jar files. I checked these files in my downloaded NWDS 7.31  package, but cold not find them.
    Thanks in advance

    Hi.
    Check this thread.
    Where to get the libraries for XI development - Process Integration - SCN Wiki
    Regards
    Lucho

  • Acrobat Reader won't read pdfs: "file path not valid"

    I thought that my PlayBook would be the perfect device to read pdfs in the Adobe Reader. The only problem is when I download a pdf from the internet, or copy a pdf from my computer, and click on the file icon from within the Reader, all I get is a cryptic error message that reads "The file path is not valid". No hints at what to do.
    At first I thought it was a problem with the file. But every file suffers from the same ill fate. Do you have any suggestions?

    Article ID: KB26744
    Unable to open any PDF documents on BlackBerry PlayBook
    Type: Support Content
    Last Modified: 06-17-2011
    Product(s) Affected:
        BlackBerry® PlayBook™
    Overview
    When attempting to open locally saved or attached Adobe® PDF document the following error is returned:
    The file path is not valid
    Environment
        BlackBerry® PlayBook™ tablet
    Cause
    The error is returned due to application permissions to of the Adobe® Reader application on the BlackBerry® Playbook™. The 'files' option within Adobe Reader application is set to 'Denied'.
    Resolution
    Edit the application permissions file access rights for the Adobe Reader application.
    1.  On BlackBerry Playbook open Options
    2.  Select Security -> Application Permissions
    3.  Select Adobe Reader application
    4.  Edit file permissions setting to allow the application to access files stored on BlackBerry PlayBook
    5.  Save settings by selecting Back button after making changes
    rabbitupnorth:
    This solution works! Problem solved.

  • Java API for reading Excel Files.

    Hi,
    Can you please suggest me any api for reading excel files.
    Right now i am using jxl.jar for this purpose but i am searching for an open source java api better than this.
    Whether POI gives better than this ?
    Thanks,
    Amit Shah.

    Can you please suggest me any api for reading excel
    files.
    Right now i am using jxl.jar for this purpose
    but i am searching for an open source java api better
    than this.
    Whether POI gives better than this ?i don't know about jxl but poi has several features which an excel can contain and it has been vastly improved in the past few versions.

  • Problem in reading the excel file path in WINDOWs machine from UNIX environ

    Hello friends,
    My requirement is to read each row of the excel sheet and sent that row to the database. I have implemented it by using jxl and apache poi framework. locally in my WINDOWS machine it is working fine..
    But when i deploy the code in UNIX machine. My application runs on a Unix server , trying to read the excel file in WINDOWS environment. I am not able to retrieve the file path. for ex : C:\Documents and Settings\sabbanik\My Documents\KARUNAKAR\excel.xls
    I am getting error in this line
    workbook = Workbook.getWorkbook(filepath)
    Error message : input file not found.
    Thanks in advance..

    You said: I am getting error in this line workbook = Workbook.getWorkbook(filepath) >
    Based on this, I will assume you are trying to use OLE to access information about the Excel file. As mentioned by Andreas, your code will be executing on the server (Unix) and since Excel isn't on the server (and cannot be) an error will result. OLE can only be used in Windows environments (client or server). To access client side OLE calls and content, you need a java bean and Excel installed on the client machine. Oracle provides WebUtil as an option to writing your own Java Bean. To use this, you will need to be running Forms 10.1.2 or newer. Details can be found here along with a demo:
    http://www.oracle.com/technetwork/developer-tools/forms/webutil-090641.htm

  • How to read excel file in document library and store excel content in sql table

    Hello,
    Can anyone help me how to read the excel file present in document library and store the content inside excel into sql table?
    Please let me know the ways to acheive this. Feel free to give your suggestions.
    Thanks,
    Cool Developer

    Hi!
    this code i have written becuase i donot find any soltions on net for this , u can try with this . :)
    System.Data.OleDb.
    OleDbConnection ExcelConnection = null;
    FileMode fileMode;
    string filePath = ConfigurationManager.AppSettings["TempLoaction"] + "\\" + fileName;
    using (SPSite _site = new SPSite(SPContext.Current.Web.Url))
    using (SPWeb _web = _site.OpenWeb())
    string docLibrary = ConfigurationManager.AppSettings["DocumentLibrary"];
    SPFile _file = _web.GetFile("/" + docLibrary + "/" + fileName);
    fileMode =
    FileMode.Create;
    byte[] byteArray = _file.OpenBinary();
    MemoryStream dataStream = new MemoryStream(byteArray);
    Stream stream = dataStream;
    using (FileStream fs = File.Open(filePath, fileMode))
    byte[] buffer = new byte[4096];
    int bytesRead;
    while ((bytesRead = stream.Read(buffer, 0, buffer.Length)) != 0)
    fs.Write(buffer, 0, bytesRead);
    fs.Close();
    //Create the Connection String
    try
    string ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;
    Data Source ='"
    + filePath + "'; Extended Properties=Excel 5.0";
    //Create the connection
    ExcelConnection =
    new System.Data.OleDb.OleDbConnection(ConnectionString);
    //create a string for the query
    string ExcelQuery;
    //Sheet1 is the sheet name
    //create the query:
    //read columns from the Excel file
    ExcelQuery =
    "Select * from [Sheet1$]"; // from Sheet1";
    //use "Select * ... " to select the entire sheet
    //create the command
    System.Data.OleDb.
    OleDbCommand ExcelCommand = new System.Data.OleDb.OleDbCommand(ExcelQuery, ExcelConnection);
    //Open the connection
    ExcelConnection.Open();
    //Create a reader
    System.Data.OleDb.
    OleDbDataReader ExcelReader;
    ExcelReader = ExcelCommand.ExecuteReader();
    //For each row after the first
    while (ExcelReader.Read())
    thanks,
    kshitij

  • How to read Excel file in flex

    Hi,
         I am new to Adobe flex and i dont know how to read Excel in flex and i need coding for that. So anybody help me...
    thanks in advance...

    Hi
    You can read and parse XLS files (only works with xls-files) with urlloader and a ZIP-lib that can read zip-files.
    public function loadXLS(url:String):void
                var urlLoader:URLLoader = new URLLoader();
                urlLoader.dataFormat = URLLoaderDataFormat.BINARY;
                urlLoader.addEventListener(Event.COMPLETE, onLoadComplete);
                urlLoader.load(new URLRequest(url));
            private function onLoadComplete(even:Event):void
                urlLoader.removeEventListener(Event.COMPLETE, onLoadComplete);
                model.sheetsDict = new Dictionary();
                var zipFile:ZipFile = new ZipFile(urlLoader.data);
                for(var i:int = 0; i < zipFile.entries.length; i++)
                    var entry:ZipEntry = zipFile.entries[i];
                    var data:ByteArray = zipFile.getInput(entry);
                    if(useFile(entry.name, "/sheet([^$]+)"))
                        model.sheetsDict[entry.name.split("xl/")[1]] = new XML(data.toString());
                    else if( useFile(entry.name, "/sharedStrings.xml") )
                        model.sharedStrings = new XML(data.toString());
                    else if( useFile(entry.name, "/workbook.xml$") )
                        model.workbook = new XML(data.toString());
                    else if( useFile(entry.name, "/workbook.xml.rels") )
                        model.rels = new XML(data.toString());
                trace(model.sharedStrings)
    to read the xml properly you have to use namespaces in the reader-class
    namespace ns1 = "http://schemas.openxmlformats.org/spreadsheetml/2006/main";
            use namespace ns1;
            namespace ns2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
            use namespace ns2;
            namespace ns3 = "http://schemas.openxmlformats.org/markup-compatibility/2006";
            use namespace ns3;
            namespace ns4 = "urn:schemas-microsoft-com:mac:vml";
            use namespace ns4;
            namespace ns5 = "http://schemas.openxmlformats.org/package/2006/relationships";
            use namespace ns5;
    //Olof

  • Formatting Error While Reading Excel File using POI 2.5 Final Related

    Hi All,
    I am using poi-2.5-final-20040302.jar for my project to create excel files.
    My system is having Microsoft Excel 2002 (SP-2) version, but my client is having Microsoft Office Excel 2003 (SP-3).
    My problem is that I can download the excel file with no formatting issues , but client is not able to download the same and is getting error as
    "Damage to the file was so extensive that repairs were not possible.Excel attempted to recover your formulas and values, but some data might have been lost or corrupted".
    After getting above error message, they can open the file but the colours,fonts ie formatting will be lost and only data will be available in excel.
    Can anyone help how to sort out ths issue.
    Thanks in Advance,
    Ravi

    Sound like the Excel file is invalid... Maybe its outdated or corrupted or something. What would we know about that? POI has a mailing list.

  • Read Excel File on Application Server to Internal Table

    Hi Everybody!
    Can anyone tell me how I can Read in an Excel File from the Application Server?
    I'm familiar with the OPEN DATASET Statement and I already use it to read in text files.
    Important is, that it works in the Batch / can be used as a background job
    I already tried using
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    which did not work.
    Can anybody please help me`?
    I created the file I try to read out from the Application Server Folder with the Standard upload
    in ABAP Web Dynpro and Wrote it to the Server with the following code. Does anyone know
    if maybe already the writing is to the application server is wrong?
    try.
          convt = cl_abap_conv_in_ce=>create(
            input = lv_filedata
            encoding = 'UTF-8'
            replacement = '?'
            ignore_cerr = abap_true ).
          convt->read( importing data = s_cont ).
        catch cx_sy_conversion_codepage.
          wd_comp_controller->show_error( exporting
            text = 'There occurred an error during conversioning the code page.' type = 'E' ).
      endtry.
        open dataset XLSFILEPATH for output in binary mode.
        transfer s_cont TO XLSFILEPATH.
        close dataset XLSFILEPATH.
    Best Regards and Thanks,
    Steffen

    Hi Suhan,
    I tried the following, but the output in the table doesn't look good at all
    Can you please help?
    OUTPUT:
    ??#u0871#?################>###??##############################=#######????########???????????????????????????????????????????????????????????????????????????????????????????????????????
    ####################################################################################### ###!###"#######$###%###&###'###(###)###*###+###,###-###.###/###0###1###2###3###4###5###6###7#
    #?######Z##A#r#i#a#l###3########,#####0#\# #"#? "#;#\#-###,#####0#\# #"#? "###=########,#####0#\# #"#? "#;#[#R#e#d#]#\#-###,#####0#\# #"#? "###?########,#####0#.#0#0#\# #"#? "#;#\#-
    ###?? ##?########? ?#######?? ##?########? ?#######?? ##?#P######? ?#######?? ##?#P######? ?#######?? ##?# ######? ?#######?? #################A#?#?j}#(#}############################
    ##########?########}#?#}#############*##################_#? _#-########????#,#####0########????#? _#-#;########????#"#?#?#\########????#_#-#@#_
    #######????########}#(#}#############+##################_#? _#-}#(#}#############,##################_#? _#-}#(#}#############-##################_#? _#-}#(#}#############.###########
    ##########?########}#<#}#############6#############?}#?#_#? _#-########??#?#,#####0}#<#}#############7#############?e#?#_#? _#-########????#,#####0}#?#}#############8###############
    #######????########}#?#}#############9#############????#_#? _#-########????#,#####0########????#? _#-#;########????#"#?#?#\########????#_#-#@#_
    #######????########}#(#}#############:##################_#? _#-}#-#}#############;##################_#? _#-#####}#P#}#############<##################_#? _#-#############,#####0#####
    ##Check Cell?#z#?##############?
    #C#h#e#c#k# #C#e#l#l##########?##????########????#####?##????#######?##????#######?##????#######?##????##?###+?#??# #?##############?##C#o#m#m#a#####?###,?#??#(#?##############?##C#
    #5####Input?#p#?##############?##I#n#p#u#t##########?##?u0319?#####?##??v?#####?#####?#######?#####?#######?#####?#######?#####?##?###6####Linked Cell?#F#?##############?##L#i#n#k#e#d#
    ?##N#o#t#e##########?##????#####?##????#######?##????#######?##????#######?##????##?###9####Output?#r#?##############?##O#u#t#p#u#t##########?##????#####?##????#####?##????#######?#
    #;####Title?#1#?##############?##T#i#t#l#e##############I}?%####?#
    #<####Total?#H#?##############?##T#o#t#a#l################?########O???##########O???##?###=####Warning Text?#:#?##############?##W#a#r#n#i#n#g# #T#e#x#t##########?##?##??#X#?######
    ##Commission###Health Incentive ###Housing Norm###Hypo Tax###Hypo Tax- Special Wages###Paid Time Off(##Vision Insurance- Withheld from Employee###Working Spouse/DP surcharge)##TX St
    ###########?#?#?######### #########c###?3###N##?h##?t##nu############d#################????MbP?_#####*#####+#####?#####?###########%#####?#?###?#########?#####?#####&###ffffff??'###
    #I#######}########+######}#######$
    ######}#######m###############c###################?###################?###################?###################?###################?###################?###################?##########
    CODING:
    types: begin of st_excel_parse,
              clientno type string,
              fileid type string,
              paymtreportingid type string,
              name type string,
              employee_id  type string,
              home_country type string,
              host_country  type string,
              actstartdt  type string,
              actenddt type string,
              assignment_status type string,
              paymttypenm  type string,
              paymtcategorynm  type string,
              paymtdt  type string,
              transeffdt  type string,
              amount  type string,
              currency_code type string,
      end of st_excel_parse.
      data: ls_excel_parse type st_excel_parse,
            lt_excel_parse type table of st_excel_parse.
      data l_wa_raw_data type string.
      open dataset gv_str_filename for input in text mode encoding default.
      if sy-subrc = 0.
        do.
          read dataset gv_str_filename into l_wa_raw_data.
          if sy-subrc = 0.
            "Split the file record using <TAB> and store inside the work area
            split l_wa_raw_data at cl_abap_char_utilities=>horizontal_tab into :
              ls_excel_parse-clientno
              ls_excel_parse-fileid
              ls_excel_parse-paymtreportingid
              ls_excel_parse-name
              ls_excel_parse-employee_id
              ls_excel_parse-home_country
              ls_excel_parse-host_country
              ls_excel_parse-actstartdt
              ls_excel_parse-actenddt
              ls_excel_parse-assignment_status
              ls_excel_parse-paymttypenm
              ls_excel_parse-paymtcategorynm
              ls_excel_parse-paymtdt
              ls_excel_parse-transeffdt
              ls_excel_parse-amount
              ls_excel_parse-currency_code .
            append ls_excel_parse to lt_excel_parse.
          endif.
        enddo.
      endif.

Maybe you are looking for

  • Difference in Fault message types & exceptions for Webservice in ABAP

    Hello all, I am relatively new to the web service framework in SAP. My problem scenario is as follows. I have a WSDL file of a webservice from 3rd party non-SAP s/w  and I want to replicate the same webservice into SAP by creating FM in SE37 with sam

  • Black and White with Blue Flasing Lights

    Hi I am doing a pop video for my cousins band and they want it black and white except when the lights flash they want it to turn blue ( a bit like a sepia tint) but im thinking they want the lights to go blue and all the black areas to stay black. ca

  • FAQ: What OS does Photoshop Elements run on, or Will PSE run on my computer?

    There are many different combinations of Photoshop Elements (PSE) and the Operating Systems (OS) it is supported on. Here is a table to help identify which versions of PSE are supported on which versions of Windows and Macintosh. By "supported", we m

  • Documentation on Class CL_RSRD_SETTING_DT

    Hello Experts, We are planning to build an enhancement that will create Broadcast Settings automatically. We are thinking of using the class CL_RSRD_SETTING_DT to create/update the settings. I would like to know if anyone knows where to get some docu

  • ELEMENTS SHUTS DOWN WHEN SENDING EMAILS

    I have a Vista system and when I attempt to send photos through Elements 7 it shuts down completely. Tech support said I need Outlook, which is not on my computer. Is there another way to send photos? How do I set up an Adobe email account? Thanks!