Reading CONTENT of a spool-file possible ?

hi there,
are there FM's or method of classes with which i can read the content of a spool-file ?
e.g. reading the content of a spool-file line by line to move it e.g. to a table ?
reg, Martin

Martin,
You could try FM's CONVERT_ABAPSPOOLJOB_2_PDF or CONVERT_OTFSPOOLJOB_2_PDF.
Duane

Similar Messages

  • Programmatically reading and processing a spool file

    Hello,
    I would like to read and process a spool file generated by a background job in my ABAP program.
    Can anyone advise if this is possible in SAP and if so, the best way to do this?
    The only information I will have in my program is the job name and the date on which the job was run. I then need to find the corresponding spool and read this into an internal table.
    Any ideas on how to do this would be appreciated.
    Thanks,
    Ruby

    DATA : it_spool      TYPE STANDARD TABLE OF rsporq    .
    *&      Form  find_spool_request_id
    FORM find_spool_request_id.
      CALL FUNCTION 'RSPO_FIND_SPOOL_REQUESTS'
        EXPORTING
          allclients          = '320'
          datatype            = '*'
          has_output_requests = '*'
          rq0name             = nast-dsnam
          rq1name             = '*'
          rq2name             = '*'
          rqdest              = 'LOCL'
          rqowner             = sy-uname
        TABLES
          spoolrequests       = it_spool
        EXCEPTIONS
          no_permission       = 1
          OTHERS              = 2.
      IF sy-subrc <> 0.
        MESSAGE i000 DISPLAY LIKE 'E' WITH text-002.
        LEAVE LIST-PROCESSING.
      ENDIF.
    ENDFORM.                    " find_spool_request_id
    READ TABLE it_spool INTO wa_spool INDEX 1.
      v_spoolno = wa_spool-rqident.
    *Get Spool request attributes
      SELECT SINGLE *
        FROM tsp01
        INTO tsp01
        WHERE rqident EQ v_spoolno.
    Edited by: K.Manas on Jan 7, 2011 6:22 AM

  • If I use an app to remove duplicate pix does the app  read content  or only  the file name such as IMG

    If I use an app to remove duplicate pix does the app  read content  or only  the file name such as IMG. I have some 2500 pix  and the thought of trawling thru  them  toremove duplicates is mind numbing.
    If the apps  read the content then I am ok about that  but if they  only read the  file name ... they maybe  deleting stuff that  isnt really a duplicate

    You have to contact with the developer of the application. We do not know which app you are referring to and we do not know how that application works, but all apps of that type are supposed to delete duplicate files with the same format (like IMG, JPG...)

  • FTP to Read content of Text/xml file

    Hi,
    I need a help for reading content of text/xml file through FTP. Below I just am explaining the scenario.
    Our application server is in UNIX. Now we have to run a report program to access in to a FTP server which is in windows platform. Using FTP_CONNECT, FTP_COMMAND, FTP_DISCONNECT we are able to connect to FTP server and also able to copy files from FTP server to SAP application server. After copied in application server, we are able to read the content of the txt file in to internal table in ABAP program using OPEN DATASET. But our requirement is that we want to read the text or xml file content into internal table while accessing into FTP server from SAP application instead of after copying the file into application server.
    So please help me to solve my problem.
    -Pk

    Thank you Bala,
    But can you help me what should I pass against FNAME and CHARACTER_MODE Import parameter? Should I pass the full path of the file with name or only I have to pass file name ? For example if my text file name in FTP Server is test.txt and the IP of the ftp server is 10.10.2.3 then should I pass the value against FNAME as '
    10.10.2.3\xyz\text.txt' ? Here xyz is the name of the directory in C drive where test.txt is exist.
    Please help me.
    -pk

  • How to read contents of a property file sequentially

    hello all,
    please can any one tell me how to read contents of a property file sequentially.
    i saw most of the classes provided by JAVA API, which get All keys and there return type is enumeration which dosent preserve , or may the getKeys() method of those classes do not preserve the sequential order.
    Kindly do let me know if anyone has done this before.
    Thanks.

    The best solution is that you redesign your program so that it does not depend on the order of the entries in the properties file.
    If you really want to stay with your design, you will have to read the properties file yourself, line by line, just like you would read any other text file, and parse the content of each line yourself.
    BufferedReader in = new BufferedReader(new FileReader("stuff.properties"));
    String line;
    while ((line = in.readLine()) != null) {
        // Parse the line, use e.g. String.split() to split it around the '='
    in.close();

  • Reading contents of uploaded excel file in web dynpro java

    Hi All.
    I am aware how to provide facility to upload files in web dynpro java. But my requirement is that on uploading a particular file (for eg. an excel file having 10 columns), I need to read the contents of that file and store it in a table in R/3.Can anyone suggest a way how I can read the contents of the uploaded file?
    Thanks and Regards,
    Saurabh.

    Hi.
    I am having the following requirement : I have a FileUpload UI element where user clicks Browse button, selects a file from the local system and presses a Upload button. Upon pressing Upload, the name of the selected file and the contents of the file should be shown.
    In the View context, I have two value attributes: FileName of type String and FileResource of type binary.
    This is the code that I have in the Upload button action handler :
      public void onActionUpload(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionUpload(ServerEvent)
        IWDAttributeInfo attributeInfo = wdContext.getNodeInfo().getAttribute(
                 IPrivateReadExcelView.IContextElement.FILE_RESOURCE);
        IWDModifiableBinaryType binaryType = (IWDModifiableBinaryType)attributeInfo.
                 getModifiableSimpleType();
        IPrivateReadExcelView.IContextElement element = wdContext.createContextElement();
        String fname = binaryType.getFileName();
        wdComponentAPI.getMessageManager().reportSuccess("File selected - "+fname);  //Statement 1
         try {
              wdComponentAPI.getMessageManager().reportSuccess("Successful");    // Statement 2
              InputStream in = new FileInputStream(fname);
              HSSFWorkbook wb = new HSSFWorkbook(in);
              wdComponentAPI.getMessageManager().reportSuccess("Successful");    //Statement 3
              int sheetsNo = wb.getNumberOfSheets();
              for (int i=0;i<sheetsNo;i++) {
                   HSSFSheet sheet = wb.getSheetAt(i);
                   Iterator rowsNo = sheet.rowIterator();
                   while(rowsNo.hasNext()) {
                        HSSFRow rows = (HSSFRow)rowsNo.next();
                        Iterator colsNo = rows.cellIterator();
                        while(colsNo.hasNext()) {
                             HSSFCell cell = (HSSFCell)colsNo.next();
                             wdComponentAPI.getMessageManager().reportSuccess("File uploaded" +
                                  "successfully");
                             if(cell.getCellType()==1) {
                                  wdComponentAPI.getMessageManager().reportSuccess("00000"+
                                       cell.getStringCellValue());
                             else if(cell.getCellType()==0) {
                                  String str=""+cell.getNumericCellValue();
                                  wdComponentAPI.getMessageManager().reportSuccess("11111"+str);
         catch(Exception e) { wdComponentAPI.getMessageManager().raisePendingException();
        //@@end
    On pressing Upload button, name of selected file is being shown(Statement 1). I am also getting Statement 2 in the output. However I am not getting Statement 3 onwards.
    Where am I going wrong? Can anyone shed some light on this?

  • How to read contents of a spool?

    hi
       any fm to read the contents of the spool by giving a spool req. no? i want to know before processing a spool whether it has some contents or is null ('List contains no data')..how to know this? any help is appreciated
    Regards,
    Sathish. R

    Hi,
    You may need to first call function module RSPO_RINIT_SPOOL_SP01 which contains the statement ASSIGN DUMMY2 TO <FSPORQ>. Since RSPO_RINIT_SPOOL_SP01 is in the same function group as RSPO_ROUTPUT_JOB, the assignment will remain when you call RSPO_ROUTPUT_JOB.
    See module pool RSPOSP01NR, form DISPLAY_OUTPUT_REQUESTS for an example of the use of RSPO_RINIT_SPOOL_SP01.
    Check this  <b>RSPO_RID_SPOOLREQ_DISP</b>
    Regards

  • Read content in Microsoft Word file.

    My new project is to read content in Microsoft Word. But,
    blah blah blah code are appeared when I read microsoft word file
    with cffile tag, and display included content in textarea. Here is
    my coding. Anything wrong in my coding and how can I read ms.word
    file and display included content in this file??
    all answers will be appreciated.

    I have figured out how to use Object in Word to embed the SWF file and use the Control Box to activate it, however, like you when I convert to Acrobat PDF from the Word Add-in it does not embed the SWF in a playable format, although the object is there.  I can't seem to get any relevant properties using the Touch Up Object tool either.  I hope someone else has a clue.  Otherwise I recommend creating your word document with "empty" text boxes that the text will wrap around and then converting to PDF and once in Acrobat embed a Flash object using the Multimedia button.

  • Read Content of javaws.cfg File

    Hi,
    I want to add some own entries in the javaws.cfg file.
    How could I read the content of this file from ma lauched application ???
    Any help is welcome!!!
    Jens

    or you could do something like this to get the directory where javaws.jar and javaws.cfg riside.
    * Returns the directory where the jar for the specified Class is
    * installed.
    * @param clazz the class object the Main class.
    * @return the directory the .jar file, which contains the Main class.
    private static final File getJarInstallDirectory(Class clazz) {
         File file = new File(clazz.getProtectionDomain().getCodeSource().getLocation().getFile());
         return new File(file.getParent());
    then call this method with javax.jnlp.BasicService.class as an argument. That will return a File object representing the directory containing javaws.jar and javaws.cfg.
    masa

  • Reading contents of tar.gz file programatically

    Hi,
    I have a file explorer type application, where I want the user to be able to double click on the tar.gz file and see the contents of the tar archive inside the .gz file.
    Of course, we dont want to have to extract the entire .gz file first. But it seems that the only way to read a .gz file is to use GZIPInputStream and if we through that, we will end up extracting the entire file.
    So can anyone tell me how to go about doing this?

    Hi,
    yes you're right. It's quite tricky sometimes to get what you need from a GZip file.
    What I found out today worked greatly.
    First of all, you need to get Apache Ant and inside the ant.jar file you'll locate the TAR package under tools (org.apache.tools.tar)
    So:
    1) Create a GZIPInputStream from the file (java.util.zip.GZIPInputStream)
    2) read the file entirely, coping it using a FileOutputStream
    3) In point 2, you created a tar file, you can read it with TarInputStream in org.apache.tools.tar TarInputStream.
    4) Get the entry you look for with TarEntry using
    - TarInputStream ts = new TarInputStream(file);
    - while (true){
    TarEntry t = ts.getNextEntry();
    if (tgetName().equals("myEntry")){
    //use ts to read this entry
    ts.read (buffer, 0, buffer.length)
    5) You have the unpacked Gzip entry where you want. Enjoy!
    ZazzaZ

  • Read contents from a blob file

    hi all
    i have data stored in a blob file
    and i want to show the data in the fields
    but when i am showing the data i am not getting the data in the desired format
    eg
    if i have stored a name (Mandar )in the blob file
    when displaying in the blob field i am getting something like aaaaabbbjddddd (example)
    i am not well versed with this
    can u please guide me through it ?
    thanks
    Mandar

    What you are getting is raw format. You need to use:
    UTL_RAW.cast_to_varchar2 (p_raw);
    in order to make it readable.
    Denes Kubicek

  • Reading Spool files from AS400 through JAVA Applications

    Hi,
    i am trying to read spool fiels through my java application with the help of jt400.jar files,which is developed by IBM.When i try to display the content of the spool file the result is look like this and give some ideas to come out from these
    problems.
    thanks in advance
    selvin
    --- 4- 4++++�+-+@z 4++-_��++_� 4+3@+@+@_���������@M_�����?�] 4+
    s+-�+@z 4+@@@@� � 4+__++@+-@z 4+___ 4+++++++ 4+s--�+@z 4+z_a_�a___� � 4+:-
    ?��@z 4+B__a_�a___� 4+s�+++@z 4+|��z_�z_� � 4+:-�?���@z 4+C__� 4+G` 4+I___ �� 4+
    -�?��� 4+-�?��� 4+B���?�@+�M�] 4+T@@���?� 4+j���?�@_?��� � 4+@+��� 4+@+?�� 4
    B��@����� 4+T+�?����� 4+k��@_�?��� � 4+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~~~~~~~~~~~~ � 4+__� 4+
    ---++ 4+B@@@@_ 4+Q@@@@@@@@@@_ 4+j@@@@@@@@@@@@@@@@@@K__ � � 4+___ 4+
    ---_++++--+ 4+B@@@@_ 4+Q@@@@@_�k___ 4+j@@@@@@@@@@@@_�k_�_K__ � � 4+___ 4+
    ---++++� 4+B@@@@� 4+Q@@@@@�k___ 4+j@@@@@@@@@@@@__k___K__ � � 4+___ 4+
    ----- 4+B@@@@_ 4+Q@@@@@@@@@@_ 4+j@@@@@@@@@@@@@@@@@@K__ � � 4+@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ � 4+'�+--@��-+@z 4+C@@@@_ 4+R@@@@@�_k___ 4+
    k@@@@@@@@@@@@��k��_K__ � 4+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    If you were expecting the spool file to be translated to ASCII with carriage returns, line feeds, and form feeds, here is the magical piece of code:
    SpooledFile splf = new SpooledFile(sys, splfName, splfNum, jobName, jobUser, jobNum);
    PrintParameterList pl = new PrintParameterList();
    pl.setParameter(SpooledFile.ATTR_MFGTYPE, "*WSCST");
    pl.setParameter(SpooledFile.ATTR_WORKSTATION_CUST_OBJECT, "/QSYS.LIB/QWPDEFAULT.WSCST");
    InputStream in = splf.getTransformedInputStream(pl);
    For reasons not immediately clear to me, the first character in the file appears to be a null byte (hex 0). I also believe that CRs and LFs only appear as needed to return to the beginning of the line (CR) and the feed one line (LF). It is permissible for example to have <data><CR><LF><LF><LF> (i.e. feed three lines). I also assume that <data><CR><data><CR><LF> would result in overprinting (missing line feed). I have even seen <data><CR><CR>, and I assume the second CR should be ignored.
    I have not exhaustively tested these scenarios, but from some of the problems we've had, the above description seems like a reasonable way to think about the data stream

  • Help on how to read the content of an XML file from the payload

    I have a receiver channel / mail adapter, that sends e-mails with a XML attachment.
    I’m trying to write a Bean, that should make it possible to rename the attached XML file dynamically.
    In the Bean I want to read the content of the attached XML file, it could be the “order number”.
    The filename should then be “Order number”.XML.
    <u><i>Can anyone help me with how to read the content of the XML file from the payload.</i></u>
    <i><b>Frank</b></i>

    hi,
    check this: http://jakarta.apache.org/poi/

  • Read contents of file into outputstream

    Can anyone suggest that what are the best methods to read contents of a file (better cater to both conditions: big file size and small file size) into outputstream and send through socket...
    Thanks.

    Thanks for the answer. But I would like to ask the following question:
    I have a VB application which generates a file. I have a Java application which read the contents of the file.
    is it possible that VB side calls the read() (file) and send() (through socket to destination) methods in Java application once the file is generated? Actually my objective is VB is responsible for generating a file for Java application to read data from and then send the data (not file) to destination....If it is impossible to achieve, any alternative to achieve this?
    Thanks
    Edited by: whkhoo on Jun 15, 2008 8:45 PM

  • Is it possible to extract the contents of any PDF file using Adobe PDF SDK?

    Is it possible to extract the contents of any PDF file using Adobe PDF SDK?
    For Example: There is one pdf file. Let us say xxx.pdf with 32 pages. I am interested in only in a topic present at 10th page. Can I extract this information and save it into another pdf file (means new pdf file)?

    Thanks Irosenth,
    I am actually interested in extract the page and create a new PDF with that page. But still there is a catch that on which basis the page needs to extract either on PAGE number OR on Bookmark basis.
    But here in this scenario assume I am looking for the PDF file, now I want to save only page 5. How can I extract page 5 automatically/programmatuically? Or in simple word how can I get the reference link of page 5?
    Here I am not getting clear picture that Do I need both SDK Adobe & Acrobat to achieve this requirement. And more over you have mentioned that SDK itself is free. But on Adobe side it is mentioned that it is available by license only with this I have another doubt: To work my desktop/system application with Adobe PDF library, this library needs to distribute with the application. So in this case will it be chargeable for each and every deployment.
    Could you please provide me the link from where I can download the SDK? So that I can do some excerise with SDK to figure out the exact flow of functionality to work with my application.

Maybe you are looking for

  • Leopard client controls view of tiger server share point

    Hi, recently purchased a Mac Mini running Leopard all patched. Connected via afp to a Xserve RAID, Xserve running a sharepoint using ACL's. In list view the leopard client controls the list view on the Xserve, meaning that all the other Tiger clients

  • Windows 7 Bootcamp question

    Hello when i was trying to install it i did broke the dvd and now i cant install it but i got a copy in my usb device of the dvd , can someone tell me how to install via usb ? or i have to get a new dvd ??

  • Loading Variables from a php file

    Im trying to get the stats from a shoutcast radio stations into flash so i can manipulate them into a nicer looking site. Anyway, ive identified the line on which the stats are updated (its in a php file, line 48): <stong>Current Song:</strong></b><p

  • Spry and Lightroom?

    Just curious if Adobe is considering adding Spry photo gallery solution as an option to Lightroom? Any Spry developer heard anything, if not go kick on the devs of LR and make it happen please.

  • Regarding SAP integration modules

    Hi all, My client is interested to implement SAP for shipping project. The system should be able to cater jetty, container terminals, Finance, HR, Logistics, Warehouse etc. It should also be able to integrate with multiple legacy systems developed ea