Print from .csv or .txt file

Hello Experts,
I am new to ABAP development.
Is there any way to print the content of an .csv or .txt file.
For example my report will have a selection screen where we will upload a file containing "Hello world" when we execute the output screen will show "Hello World".
Regards,
Sarnava

Hi Sarnava,
If your are selecting file from your system desktop then use  GUI_UPLOAD to upload data in data_tab and then while applying loop at this internal table split the code at ',' or space and fill internal table with your relevant fields.
Loop at final internal table and display on output screen.
DATA: BEGIN OF I_APPFEED OCCURS 0,
         RECORD(200)  TYPE C,
       END   OF I_APPFEED.
CALL FUNCTION 'GUI_UPLOAD'
     EXPORTING
       FILENAME                = LV_FILE (path of .csv file from desktop)
     TABLES
       DATA_TAB                = I_APPFEED
LOOP AT I_APPFEED INTO GWA_LOC_APP.
     SPLIT GWA_LOC_APP AT ','
    into wa_fields.
append wa_fields to it_fields.
endloop.
loop at it_fields into wa_fields
write: wa_fields-fields.
endloop.
Hope, this will solve your issue or let me know if you want something else.

Similar Messages

  • How to write csv or txt file through utl_file with UTF-8 Encoding

    Hi All,
    I need your help to write the data from DB to csv or txt file with UTF-8 encoding through utl_file.
    Database character set:AL32UTF8
    Database version:10G
    All the columns in the DB are of varchar2 type.
    Please let me know if there is any way of doing it.

    What was wrong with the info provided in the link(s) given?
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions027.htm#SQLRF00620]

  • Maximum number of lines in Al11 for csv and txt files

    Hello Experts,
    I need to extract millions of records to a file in AL11 from several DSO - based on fiscal period and year. Can anyone tell me about the maximun number of lines a csv and txt file can hold in AL11.
    Points will be assigned.
    Kevin.

    Hi.
    As per my knowledge there is no limit for text files but for csv file its 1048576 rows.
    Hope this helps.
    Regards
    Sai

  • Need existing custom script to run with a .csv or .txt file

    Hi, Scripting Guys!
    I am a very novice novice when it comes to PowerShell -- I'll state that up front. So apologies if the answer to this is really basic. I am trying to use a script written by someone else, where I can simply paste in the script, identify the user by any one
    of several attributes, and the magic happens (in this case, all mail attributes in the AD Object are cleared and then the email address is added back in, resetting that object to the point where IDSync can run).  For a single user at a time, it works
    perfectly.
    .\Reset-MailAccountforIDSync.ps1 -Identity "[email protected]"
    My problem is that I have a .csv file with 60 users I need to run this script on, and there's a possibility of other large batches in the future.  How can I convert this single user script into one that can work with a .csv or .txt file?
    Thanks, Stormicat/J.L.Newmark

    This will do the trick.
    $csv=Import-Csv users.csv
    foreach($user in $csv){
    .\Reset-MailAccountforIDSync.ps1 -Identity $user.Mail
    Of course you will have to learn enough to understand that so start here:
    http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx
    ¯\_(ツ)_/¯

  • SPRY using .csv or .txt file

    Hello,
    I am interested in any ideas on the best way to get Spry
    working with a .csv or .txt file? We sometimes have the misfortune
    <vbg> of having to take others files (.csv or .txt file) and
    display them in a table format without converting them.
    I looked at the raw data non-xml example but that is using
    some static data.
    Thanks in advance...
    Matt

    Hi Matt,
    You might want to take a look at my patched version of Spry,
    where I added JSON support to Spry. It's available here:
    Doug's Spry Patch.
    It would be pretty easy to add a CSVDataSet or a TxtDataSet
    using what I put in place there.
    However, please note, this is of course not officially
    sanctioned by Adobe, and I know they are working on a way to offer
    support for different kinds of data in the next version, so this
    might all get chucked out the window in the next round. But if you
    really need it now, then this might be an avenue you'd want
    to explore.
    -Doug

  • [b]export data from a table to a csv or .txt file[/b]

    hi plz i need help in how to export data from a table to a csv or .txt file

    If you are using TOAD, then you can execute the statement like SELECT * FROM TABLE1
    Then, you can go to Output Grid and you can say save as and you can save it as you want, excel, tab delimited or whatever.
    Thanx,
    Cheers,

  • Error while load the data from CSV with CTL file..?

    Hi TOM,
    When i try to load data from CSV file to this table,
    CTL File content:
    load data
    into table XXXX append
         Y_aca position char (3),
         x_date position date 'yyyy/mm/dd'
    NULLIF (x_date = ' '),
    X_aca position (* + 3) char (6)
    "case when :Y_aca = 'ABCDDD' and :XM_dt is null then
    decode(:X_aca,'AB','BA','CD',
    'DC','EF','FE','GH','HG',:X_aca)
    else :X_aca
    end as X_aca",
    Z_cdd position char (2),
         XM_dt position date 'yyyy/mm/dd'
    NULLIF XM_dt = ' ',
    When I try the above CTL file; geting the following error..
    SQL*Loader-281: Warning: ROWS parameter ignored in parallel mode.
    SQL*Loader-951: Error calling once/load initialization
    ORA-02373: Error parsing insert statement for table "XYZ"."XXXX".
    ORA-00917: missing comma

    Possible Solutions
    Make sure that the data source is valid.
    Is a member from each dimension specified correctly in the data source or rules file?
    Is the numeric data field at the end of the record? If not, move the numeric data field in the data source or move the numeric data field in the rules file.
    Are all members that might contain numbers (such as "100") enclosed in quotation marks in the data source?
    If you are using a header, is the header set up correctly? Remember that you can add missing dimension names to the header.
    Does the data source contain extra spaces or tabs?
    Has the updated outline been saved?

  • Printing from Adobe Reader X; file turns to "Print" file (*.prn).

    When I try to print a PDF file from Adobe Reader X, the system presents me with a "SAVE" window with the PDF file renamed as a "Print" File (*.prn).  I am unable to print this.  However, if I locate the file in a folder, and click on it, then click "Print" from the drop-down menu, the file prints correctly.
    Has anyone else had this problem, and what can be done to correct it?
    I'm using Windows XP Professional on a slightly older IBM compatable computer.

    In the print dialog disable the entry 'Print to File'.

  • How to send mail from linux with .txt file as attachment ..

    I want to send email from linux box and in the body of the email i want to have the content of dblog.txt file.
    I want dglob.txt file content to be part of the mail body.
    Thanks in advance!!

    Apr 29 15:19:35 lctwprddb01 sendmail[1616]: m3TJJZ4k001616: to=[email protected], ctladdr=oracle (500/500), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30109, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (m3TJJZhB001617 Message accepted for delivery)
    Apr 29 16:04:52 lctwprddb01 sendmail[1422]: m3TIP6LJ031388: to=<[email protected]>, ctladdr=<[email protected]> (500/500), delay=01:39:46, xdelay=00:48:01, mailer=esmtp, pri=120423, relay=cluster2a.us.messagelabs.com. [216.82.249.211], dsn=4.0.0, stat=Deferred: Connection timed out with cluster2a.us.messagelabs.com.
    Apr 29 16:07:36 lctwprddb01 sendmail[1619]: m3TJJZhB001617: to=<[email protected]>, ctladdr=<[email protected]> (500/500), delay=00:48:01, xdelay=00:48:01, mailer=esmtp, pri=120425, relay=cluster2a.us.messagelabs.com. [216.82.248.44], dsn=4.0.0, stat=Deferred: Connection timed out with cluster2a.us.messagelabs.com.
    Apr 29 16:07:52 lctwprddb01 sendmail[1627]: m3TILs2r031176: to=<[email protected]>, ctladdr=<[email protected]> (500/500), delay=01:45:58, xdelay=00:48:01, mailer=esmtp, pri=120429, relay=cluster2a.us.messagelabs.com. [216.82.248.45], dsn=4.0.0, stat=Deferred: Connection timed out with cluster2a.us.messagelabs.com.

  • How to save in CSV or TXT file the Powershell script output?

    Hi,
    I am not sure how to expot this to csv/TXT file, should I use export-csv "c:\test.csv" ?
    my code:
    $site = Get-SPSite "http://tst.pg.com/sites/tsta"
    Write-Output("`n" + $site.URL)
    $myweb = $site.AllWebs | where {$_.url -eq $site.url}
    Foreach ($list in $myweb.Lists) 
    if($list.BaseType -eq "DocumentLibrary")
          Write-Output("")
    Write-Output("Doc Library Name:" + $list.Title)                
    Write-Output($list.roleassignments | ft Member,RoleDefinitionBindings -auto)
    }$site.dispose()

    Hi there - If you just want to dump the output as a txt file, how about the following?
    .\yourpowershell.ps1 > output.txt
    Please remember to mark your question as answered and vote it helpful if this solves or helps with your problem. *******************************************************************************************************

  • Write to local CSV (or txt) file on iPad -- access via iTunes

    I'm trying to figure out how to write to a local CSV (or TXT) text file on the iPad. I've got UIFileSharingEnabled working--iTunes sees the app as available for file sharing. However, via FileStreram, I can't find where to save the file to? I've tried all the options I know of;
    * documentsDirectory
    * applicationDirectory
    * desktopDirectory
    * userDirectory
    * applicationStorageDirectory
    ...but the file doesn't show up in iTunes. Anyone have any suggestions? You game developers must have this figured out for 'high-score' and preferences.
    Thanks

    Hi, did you find any solution for this problem?
    I'm also looking for an answer...

  • How to read in text string pairs from an external txt file?

    I have an external txt file containing 26000 pairs of strings in the format
    string1a   string1b
    string2a   string2b
    string26000a string26000b
    all strings are always 4 characters in length.  For example,
    a123   jkdh
    b456   uusp
    How can use TestStand 2013 to input this data into local string array varaibles?  I also have legacy testers running TestStand 3.5, so I need a TestStand 3.5 solution as well.  Thanks in advance for any ideas.  Hopefully this can be done in TestStand without the use of LabView or LabWindows/CVI.

    Daniel E., thanks for the reply. 
         It is very frustrating to have to implement workarounds in order to access text in an external file when using TestStand.  TestStand already reads in text ini files, so it would probably take a TestStand software developer all of 1/2 day to write the code and 1/2 day to debug it.  Here I will restate the obvious.  Engineers have to deal with data, sometimes data generated from other applications.  Sharing data in a text file is one of the most basic functions (and one of the easiest to implement).  When I think of all the effort needed to support ActiveX, but NI did not see it fit to give TestStand users simple text file read/write functionality, it does not make sense to me.  Maybe it was too simple or mundane a task so it did not get developed?  Whatever the reason, I think users of TestStand deserve this basic functionality.
         Even if TestStand cannot read the data directly into array variables, it should provide some mechanism to read the text from the file, either line by line or all file text into a string, so the data could then be parsed into the array variables I need.
         I will pursue a CVI or LabView solution.  Please also know that I am not directing these comments at you, I do appreciate your reply.
    Regards,
    Ron

  • How to get print from adobe digital edition file

    I coundn't print a document from Adobe digital edition file. will appreciate to know to method doing print from this program, thanks.

    If you are in ADE (digital editions) you should be able to read a file of type .epub (assuming it is properly authorized).
    It is while reading in ADE that need to try ctrl-I/cmd-I to ADE to check the rights.
    If you are reading in ADE and ctrl-P/cmd-P doesn't work is it probably because you do not have rights to print the document.

  • Deskjet 1010 won't print from pdf or word files

    I have a deskjet 1010 printer.  I have a toshiba satellite laptop.  I have windows 7.  i just bought this printer.  I can print from the internet no problem, but it will not print anything from a pdf file, microsoft word, or excel.  I have reinstalled many times, using the usb, and the disk and the internet.  I have installed new drivers, etc.  I have tried EVERYTHING.  Nothing is working.  Please help.

    Hello randrinchina,
    Welcome to the HP Forums.
    I see that you are having some printing issue from microsoft word and excel.
    I suggest that we start off by running the HP Print and Scan Doctor.  If the Doctor fails, please let me know where it fails as well as any error codes that it generates.
    Write me back when you have time and I will be happy to help.
    Cheers,  
    Click the “Kudos Thumbs Up" at the bottom of this post to say “Thanks” for helping!
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    W a t e r b o y 71
    I work on behalf of HP

  • Update string table from continious reading "*.txt" file

    Hello community ,
    I read a txt file continiously and try to catch the next data written each time the txt file is modified. My problem is that I can't use an event structure inside the while loop to catch the new data written.
    So the process write new data in the txt file line per line without erasing previous data like this:
    data1
    data2
    data3
    etc....
    I just want to catch the new data writen when it's written.
    Thank for any inputs......
    Attachments:
    zip.zip ‏11 KB

    What you are doing is basically what you have to do, you must poll the file somehow.  If you have an event structure you can always use the timeout event to time the polling.
    The only other workaround would depend on the producer of the data file.  If it is a LabVIEW program you cna make it send the consumer VI an event telling it to read.  Although at that point I would just have it send the data.

Maybe you are looking for

  • Need a column based off a PL/SQL cursor, how to do this?

    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production With the Real Application Testing option JServer Release 9.2.0.8.0 - Production Report Builder 10.1.2.2.0 ORACLE Server Release 10.1.0.5.0 Oracle Procedure Builder 10.1.2.2.0 Oracle ORA

  • HT5654 What is the "other" section in my cellular usage and how do I get rid of it? It is taking almost 75% of my usage space.

    It is taking almost 75% of my usage space and I have no idea what it entails and how to get rid of it. I deleted almost all of my pictures and apps, emails, and emptied my safari cache and browsing history.

  • How to write a function module?

    How can i write a function module that does the same thing as BAPI_FLIGHT_GETLIST in the SAP system?

  • Java WSDP vs. J2EE

    I recently downloaded Java Web Services Development Package ... because I need to run SAX with Java (using JAXP in the package). On the other hand, I downloaded a code sample from this site about BookStore application. And I couldn't run the example,

  • Open dataset filename length.

    Hi all, Could any one help me regarding opendataset. i am creating files on app server using open dataset. for one program the code i have written is working. and for another the file is not getting created. my doubt is is ther any restriction with f