Verification of text file content without using AUT

The AUT is generating a text file. The text file can not be opened in the AUT.
How can I verify the content of the text file (e. g. with regular expressions)?

You may use read-lines command.
It reads lines and writes them one-by-one to output pipe.
Please try and let me know if you have any questions.

Similar Messages

  • Is it possible to translate MSS/ESS WDJ content without using NWDS?

    Hi there, is it possible to translate MSS/ESS WDJ content without using NWDS? CTRL+Right Click allows only to hide the text element, portal content translation doesn't allow to translate Web Dynpro Java content.

    Hi,
    Using CtrlRight click you can modify the names, hide the text . on the ESS/MSS ivew's preview  and cTrlright cllick.
    then you will get options to hide,change the text . etc.
    For deploying,changing  the WDJ files you need NWDS. without NWDS it's not possible
    regards
    mahesh

  • Setting Font for converting multiple text files into PDF using VB 6.0

    Dear All,
    Am converting multiple text files into PDF using VB6.0. Currently, am unable to control the font face and size for the generated files. Below is the procedure am using for each file;
    Public Sub proc_convert_to_PDF(srcFilename As String, destFilename As String)
    Dim p_AcroApp As CAcroApp
    Dim p_VDoc As CAcroAVDoc
    Dim p_DDoc As CAcroPDDoc
    Dim IsOk As Boolean
    Set p_AcroApp = CreateObject("AcroExch.App")
    Set p_VDoc = CreateObject("AcroExch.AVDoc")
    Call p_VDoc.Open(srcFilename, "")
    Set p_VDoc = p_AcroApp.GetActiveDoc
    If p_VDoc.IsValid Then
    Set p_DDoc = p_VDoc.GetPDDoc
    ' Fill in pdf properties.
    p_DDoc.SetInfo "Title", Format(Date, "dd-mm-yyy")
    p_DDoc.SetInfo "Subject", srcFilename
    If p_DDoc.Save(1 Or 4 Or 32, destFilename) <> True Then
    MsgBox "Failed to save " & srcFilename
    End If
    p_DDoc.Close
    End If
    'Close the PDF
    p_VDoc.Close True
    p_AcroApp.Exit
    'Clear Variables
    Set p_DDoc = Nothing
    Set p_VDoc = Nothing
    Set p_AcroApp = Nothing
    End Sub
    What I need;
    1) to be able to set the font face of the destination file ( destFilename)
    2) to be able to set the font size of the destination file ( destFilename)
    Am using Adobe Acrobat 7.0 Type Library
    Kindly Help.
    Thanks in advance

    We didn't say it doesn't work. We said it isn't supported.
    There are a number of other ways to make a PDF. The one which would
    give the most control is if your application directly printed to GDI,
    controlling the font directly. This could print to Adobe PDF.
    You could look for an application that gives control of font for
    printing.
    You could use a text-to-PostScript system and distill the result. You
    could even look for a non-Adobe text-to-PDF.
    Working in the unsupported and dangerous world you chose, the font
    size for text conversion is set (and this is very bad design from
    Adobe) in the settings for Create PDF > From Web Page. There is no API
    to this.
    Aandi Inston

  • How to read text file content in portal application?

    Hi,
    How do we read text file content in portal application?
    Can anyone forward the code to do do?
    Regards,
    Anagha

    Check the code below. This help you to know how to read the text file content line by line. You can display as you require.
    IUser user = WPUMFactory.getServiceUserFactory().getServiceUser("cmadmin_service");
    IResourceContext resourceContext = new ResourceContext(user);
    String filePath = "/documents/....";
    RID rid = RID.getRID(filePath);
    IResource resource = ResourceFactory.getInstance().getResource(rid,resourceContext);
    InputStream inputStream = resource.getContent().getInputStream();
    BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
    String line = reader.readLine();
    while(line!=null) {
          line = reader.readLine();
         //You can append in string buffer to get file content as string object//
    Regards,
    Yoga

  • Problem with File RFC File scenario without using BPM

    Hi all,
      I am trying a File RFC File scenario without using BPM with the help of the following thread:
    File - RFC - File without a BPM - Possible from SP 19.
      The XI system is PI 7.0 sp 12. When I am trying to acheive the above scenario, I am getting wierd results i.e., when I observe in SXI_MONITOR, the message is showing as processed successfully, but when I watch the message status in communication channel monitoring, I am getting the following error:
    "Attempt to process file failed with com.sap.aii.af.service.cpa.CPAException: Couldn't retrieve inbound binding for the given P/S/A values: FP=;TP=;FS=DEV120;TS=Test_Service;AN=MI_Invoice;ANS=urn:sap.com:test;"
    I am not able to understand what the problem is. By the way, one more thing, is, I have kept the File processing mode as "Delete" in the sender file adapter. But the file is not getting deleted. I think the reason could be because of the above error.
    Can any body help me out in getting my problem resolved?
    Thanks,
    Adithya K

    CPA Cache Refresh from the Adapter Engine To trigger a cache refresh from the individual Adapter Framework, open a browser window and enter the following
    URL: http://<host>:<port>/CPACache/refresh?mode=<b>delta|full</b>
    The Monitoring url is like this: http://<host>:<port>/CPACache
    Thanks & Regards,
    Farooq.

  • Need to read text file content and have to display it in multiline text box

    dear all,
    Need to read text file content and have to display it in multiline text box.
    actually im new to file handling. i have tried up to get_line and put_line.
    in_file := TEXT_IO.FOPEN ('D:\SAMPLE.txt', 'r');
    TEXT_IO.GET_LINE (in_file,linebuf);
    i dont know how to assign this get_line function to text item
    pls help me in this regards,

    Simply write:
    in_file := TEXT_IO.FOPEN ('D:\SAMPLE.txt', 'r');
    TEXT_IO.GET_LINE (in_file,linebuf);
    :block2.t1 := chr(10)||:block2.t1||chr(10)||linebuf;
    chr(10) --> is for new line character

  • How to convert a text file content to String in JSP?

    Hi,
    I need to read the content of a text file and convert it into String and display it on to a JSP file.
    But the codings below don't work. Please advise me on how can i display the text file content.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    File adCheck = new File("list.txt");
    fis = new FileInputStream(adCheck);
    int Length = adCheck.length();
    byte arr[] = new byte[Length];
    int dataRead = 0;
    int totalData = 0;
    while(totalData <Length)
         dataRead = fis.read(arr,totalData,Length);
         totalData += dataRead;
    String Content = new String(arr);//byte array converted to String
    arr = null;

         InputStreamReader in=new InputStreamReader(fis);
          StringWriter out=new StringWriter();
          char[] buffer=new char[8192];
          int sizeRead;
          while ( ( sizeRead=in.read(buffer, 0, 8192) ) != -1 )
            out.write(buffer, 0, sizeRead);
         String content=out.toString();

  • How to print a text file contents using java.

    Using Input and Output streams I can add and retrive the contents to/from text file. But how to send this file contents to the printer or how to print the file.

    Example from my code:
       private void printErrorReport()
          PrintJob pjob = getToolkit().getPrintJob(m_frame,null,null);
          if (pjob != null) {
            Graphics pg = pjob.getGraphics();
            if (pg != null) {
              String s = detailsArea.getText();
              printLongString (pjob, pg, s);
              pg.dispose();
            pjob.end();
    // Utility method needed
       void printLongString (PrintJob pjob, Graphics pg, String s) {
         int pageNum = 1;
         int linesForThisPage = 0;
         int linesForThisJob = 0;
         // Note: String is immutable so won't change while printing.
         if (!(pg instanceof PrintGraphics)) {
           throw new IllegalArgumentException ("Graphics context not PrintGraphics");
         StringReader sr = new StringReader (s);
         LineNumberReader lnr = new LineNumberReader (sr);
         String nextLine = "       ";
         int pageHeight = pjob.getPageDimension().height;
         pageHeight -= 20;
         Font helv = new Font("Arial", Font.PLAIN, 12);
         //have to set the font to get any output
         pg.setFont (helv);
         FontMetrics fm = pg.getFontMetrics(helv);
         int fontHeight = fm.getHeight();
         int fontDescent = fm.getDescent();
         int curHeight = 0;
         try {
           do {
             nextLine = lnr.readLine();
             if (nextLine != null) {
               if ((curHeight + fontHeight) > pageHeight) {
                 // New Page
                 System.out.println ("" + linesForThisPage + " lines printed for page " + pageNum);
                 pageNum++;
                 linesForThisPage = 0;
                 pg.dispose();
                 pg = pjob.getGraphics();
                 if (pg != null) {
                   pg.setFont (helv);
                 curHeight = 0;
               curHeight += fontHeight;
               if (pg != null) {
                 pg.drawString (nextLine, 0, curHeight - fontDescent);
                 linesForThisPage++;
                 linesForThisJob++;
               } else {
                 System.out.println ("pg null");
           } while (nextLine != null);
         } catch (EOFException eof) {
           // Fine, ignore
         } catch (Throwable t) { // Anything else
           t.printStackTrace();
         System.out.println ("" + linesForThisPage + " lines printed for page " + pageNum);
         System.out.println ("pages printed: " + pageNum);
         System.out.println ("total lines printed: " + linesForThisJob);
         }

  • Receiver mail with text file attached without line feeds

    Hi, friends
    I have a text file  to mail scenario, where file must be attached to receiver mail.
    Receiver CC mail is protocol XIPAYLOAD and use mail package and keep attachment.
    In tab module, i have:
    Module name --> SAP XI Sample/ConvertCRLFfromToLF
    Module configuration --> mode LFtoCRLF
    The plain text file is attached to mail but there are no line feeds after the plain text lines.
    Thanks, in advance

    Stefan,
    This is not a Java mapping, it's an ABAP mapping.
    I've tryed also to insert this characters, but without success.
    In my abap class i have:
      data: l_newline type c value cl_abap_char_utilities=>newline.
      data: l_linefeed type c value cl_abap_char_utilities=>CR_LF.
      clear wa_string.
      incode = idocument->get_elements_by_tag_name( 'linea' ).
      length = incode->GET_LENGTH( ).
      do length times.
        outcode = incode->get_item( index = d_lines ).
        wa_linea = outcode->get_value( ).
        if wa_string is initial.
          wa_string = wa_linea.
        else.
          concatenate wa_string l_newline  l_linefeed crlf wa_linea into wa_string.
        endif.
        add 1 to d_lines.
      enddo.
      l_element_dummy  = l_document->create_simple_element(
                    name = 'Content'
                    VALUE = wa_string
                    parent = l_element_root  ).
    so...it's similar to your suggestion..
    Any other input, please?
    Regards,
    Carme.

  • How to process a text file (mail attachment) using the sender mail adapter?

    Hi guys,
    Is it possible to process mail attachments using the sender mail adapter? Let's say I have a structured text file (attachment) which needs to be mapped and sent to target system.
    Post please any thoughts or experience.
    Thanks,
    Olian

    Hi Olian,
    Have a look at these helpful links -
    1. http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/9e6c7911-0d01-0010-1aa3-8e1bb1551f05&overridelayout=true
    2. http://www.riyaz.net/blog/xipi-configuring-the-sender-mail-adapter/
    3. http://help.sap.com/saphelp_nw70/helpdata/en/23/c093409c663228e10000000a1550b0/content.htm
    Regards,
    Sunil Chandra

  • Linked Adobe Tagged Text files importing without styles

    I have several data-heavy weekly publications where suddenly, the link to all Adobe Tagged Text format files have the proper paragraph styles and character styles stripped on being placed.  I'm aware of the default settings issue, where you deselect all and make sure the character styles is none, and that does not seem to be the issue. Specifics are
    Working in CS 5 (Version 7.0.4)
    The Adobe Tagged Text format files are exported from Excel spreadsheets
    The InDesign documents have links to the Adobe Tagged Text format files, and Update Link is used inside InDesign to update the text when the file is exported from the spreadsheet.
    When the publications are opened on my workstation, ALL files linked to Adobe Tagged Text files are not imported correctly, they revert to the Basic Paragraph style.
    These are not new documents I'm designing or new Adobe Tagged Text files, this is part of a production process that has worked without issue for years.
    When the same documents are opened on another workstation, and Update Links used, they come in perfectly, so it doesn't seem to be a document or file corruption problem, but a problem with my environment or ID settings.
    It's not one specific document or file, it is every single document that has a link to an Adobe Tagged Text file (and we have lots, I tried several!)
    I've opened the text files in the text editor to check them, but as I mentioned: same document, same files, I'm the only one who can't update without stripping out the styles.
    Thanks! Nancy

    Hi, Peter! Thanks for the response. Yes, it's really Tagged Text. See below. After exporting from the spreadsheet and database, opening the document in InDesign, and selecting update link, we do no editing in InDesign after the fact because everything is already setup exactly as we want it with the Tagged Text format.
    I have literally hundreds of these among several different documents, updated weekly, mainly dealing with prices and numbers. Every one of the links to Tagged Text format files in every publication now strips out the Tagged Text paragraph style and character style formatting on Update Link on my workstation only. On my other two workstations, the links update without issue, and everything is correct in the final document.
    So I'm beginning to think I need to look at rebuilding something, maybe as Joel said, replacing preferences. I keep looking for a workstation or ID option that might effect this.
    <ANSI-WIN>
    <vsn:6><fset:InDesign-Roman><ctable:=<Black:COLOR:CMYK:Process:0,0,0,1>>
    <dps:Pnl Comp\:Pnl Comp \$Numbers=<Nextstyle:Pnl Comp\:Pnl Comp \$Numbers>>
    <dps:Pnl Comp\:Pnl Comp Bold \$Numbers=<BasedOn:Pnl Comp\:Pnl Comp \$Numbers><Nextstyle:Pnl Comp\:Pnl Comp Bold \$Numbers>>
    <dps:Pnl Comp\:Pnl Group \$Numbers=<BasedOn:Pnl Comp\:Pnl Comp \$Numbers><Nextstyle:Pnl Comp\:Pnl Group \$Numbers>>
    <pstyle:Pnl Comp\:Pnl Comp Bold \$Numbers> $302 $302 $278
    <pstyle:Pnl Comp\:Pnl Group \$Numbers> 203 202 211
    <pstyle:Pnl Comp\:Pnl Group \$Numbers> 456 458 393

  • File content conversion using SOAP adapter

    Hi,
         I'm using a receiver SOAP adapter in my IDOC to file scenario and need to do file content conversion in the receiver side.
    Are any standard modules available for file content conversion in the SOAP adapter or do I need to write custom EJB modules for this.
    Please note that I have to use a SOAP adapter, can't use any other adapter.
    Thanks in advance
    Shiladitya

    Hi,
    XML Document Conversion Type
    &#9679;      Enter recordTypes as the parameter name.
    Under Parameter Value, enter the complete, comma-separated list of all names of recordset types that occur in the document to be converted.
    If you decide to use this method, you can define a different conversion type for each recordset type that occurs in the XML document.
    For example, you could name the recordset types as follows: RecordType1,RecordType2,RecordType3.
    &#9679;      Enter singleRecordType as the parameter name.
    Under Parameter Value, enter the name of a recordset type that is to be used to convert all elements that occur in the XML document.
    If you decide to use this method, define the same conversion type for each recordset type that occurs in the XML document.
    You must enter exactly one parameter only. Whichever parameter you choose, you automatically exclude the second parameter.
    You define further parameters for each recordset type.
    In the remainder of this documentation the parameters are specified by the prefix <RecordType>. In your configuration, replace this name with the name of the recordset type.
    Conversion Type List with Separators
    &#9679;      <RecordType>.fieldSeparator
    Enter the field separator that is written between the individual fields of a record.
    This specification is mandatory.
    Conversion Type List with Fixed Field Length
    &#9679;      <RecordType>.fieldLengths
    Specify a character string that contains a list of fixed field lengths that are separated by commas and which determines the number and the length of fields generated in the text file.
    For example, you want to write a recordset with three elements that have field widths of five, ten, and fifteen characters. Enter:
    <RecordType>.fieldLengths = 5,10,15
    This specification is mandatory.
    &#9679;      <RecordType>.fieldLengthExceeded
    Specify how you want to handle fields that exceed the configured field length. Permitted values for the parameter value are:
    &#9675;       error (default)
    Interrupts processing of message with error
    &#9675;       cut
    Cuts off superfluous characters
    &#9675;       ignore
    Ignores the field length restriction
    Further Entries
    &#9679;      <RecordType>.beginSeparator
    Enter a string. The string is placed in front of the first field of a recordset.
    &#9679;      <RecordType>.endSeparator
    Enter a string. The string is appended to the last field of a recordset as a concluding character. The default is \r\n.
    &#9679;      contentType
    Enter the MIME type of the converted payload. The default value is text/plain.
    &#9679;      addHeaderLine
    Only define this parameter if you have already defined singleRecordType.
    Define whether a header line is to be added to the result of the conversion.
    &#9675;       none (default)
    Does not insert a header line
    &#9675;       fromXML
    The header line is generated from the element name of the first recordset of the XML document
    &#9675;       fromConfiguration
    The header line is determined by the configuration parameter headerLine.
    &#9679;      headerLine
    Only define this parameter if you have already set addHeaderLine=fromConfiguration.
    The value that you define is placed in front of the result of the conversion as a header line.
    &#9679;      fixedLineWidth
    Enter the maximum line length n (in characters) that can be written to the resulting document. The separator specified by lineSeparator is inserted in the resulting document every n characters.
    &#9679;      lineSeparator
    Only define this parameter if you have already defined fixedLineWidth.
    Specify the string that is written to the resulting document at the end of each line that is written with fixedLineWidth. The default is \r\n.
    Use of Special Characters
    You can use special characters in the following parameters: <RecordType>.fieldSeparator, <RecordType>.beginSeparator, <RecordType>.endSeparator, headerLine, and lineSeparator.
    &#9679;      Tabulator: \t
    &#9679;      Carriage Return (CR): \r
    &#9679;      Line Feed (LF): \n
    &#9679;      Arbitrary character: \x<code>
    <code>indicates the hexadecimal character code of the character to be displayed.
    Regards,
    Phani

  • How to display content without using webcenter services - task flows?

    Good day!
    I wanted to create a portlet where I can display and update an xml content retrieved from UCM Content Server. How can I do this without using taskflows (webcenter services)?
    Thanks in advance!
    Keith

    Hey Keith,
    Since you are already using the getResponseAsString() method you have your GET_FILE call working. To get the xml file as the file itself you need to instead call the getResponseStream() method. This will get you an InputStream representing the response.
    Once you have the stream you can do the following (I assume you are on a jsp page or somewhere you have access to the HttpServletResponse):
    String contentType = serviceResponse.getHeader("Content-Type");
    InputStream xmlInputStream = serviceResponse.getResponseStream();
    OutputStream outStream = response.getOutputStream();
    response.addHeader("Content-Disposition", "attachment;filename=myXmlFile.xml");
    response.setContentType(contentType);
    StreamUtil.copyStream(xmlInputStream,outStream,true,true);
    The runthrough:
    1. get the content type of the file coming back form the GET_FILE call
    2. grab the file as an InputStream
    3. get the output stream representing the response
    4. add a header to the response to trigger the "download file" dialog
    5. set the content type of the response
    6. copy the input stream to the output stream to send the xml file to the browser
    Notes:
    -StreamUtil is part of the RIDC jar
    -use Content-Disposition = inline to tell the browser to try and render the file in it's window if it can.
    Hope that helps,
    Andy Weaver - Senior Software Consultant
    Fishbowl Solutions < http://www.fishbowlsolutions.com?WT.mc_id=L_Oracle_Consulting_amw >

  • Opening a text file in notepad using swing

    Hi,
    I am trying to getting all files and directoriess from my Home Drive to JTreeModel, and i also want whenever i click into text file the contents should be open in notepad, but i am not able to add this feature, can any one help?
    Suresh

    Suresh_Dewangan_1981 wrote:
    No, I am using java 1.5 only, please help me accordingly.
    import java.io.IOException;
    class StartTxt {
        public static void main(String args[])
            throws IOException
            String fileName = "c:\\temp\\test2.txt";
            String[] commands = {"cmd", "/c", "start", "\"DummyTitle\"",fileName};
            Runtime.getRuntime().exec(commands);
    }Bye
    RG.

  • Query regarding file content conversion using file adapter

    Hi All
    I have a question regarding file content conversion in file adapter.
    I have a file coming in the following format.
    AA,111,222,333
    BB,444,555,666
    CC,777,888,999
    My incoming message structure has a hierarchy. The CC record is a structure part of BB record. BB record is a structure part of AA record. It is like this:
    AA,111,222,333
    <<BB,444,555,666>>
    <<<<CC,777,888,999>>>>
    After file content conversion, in the resulted xml, i am getting a flat hierarchy instead of nested hierarchy.
    Is it possible to get a nested hierarchy as a result of file content conversion?
    Please let me know
    Thanks
    Chandra

    Hi Udo
    According to your suggestion, I am trying to use mapping.
    I am getting a flat file and i am reading it.
    This is my source structure:
    AA,11,22,33
    BB,44,55,66
    CC,77,88,99
    This is my required targer structure:
    AA,11,22,33
    <<BB,44,55,66>>
    <<<<CC,77,88,99>>>>
    To explain this, BB record can have multiple records of CC records.
    AA records can have multiple records of BB record.
    I am using removecontext node function.
    CC (Source)  (removecontext)-> CC (target structure)
    But here, when i rightclick on source CC field in the mapping editor, i cannot see any other context except root node. So, how can i proceed here??
    Many Thanks
    Chandra

Maybe you are looking for

  • Adobe photoshop wont open

    it says iot was unable to start correctly (0xc000007b)?

  • Restrict use of tab Components in Maintenance Order

    Hello guys.    I'd like to know if is there a configuration to restrict the use of modification Maintenance Order (IW32) to only the "Components" Tab? Otherwise, how can I implement this?    Thanks in advance. Gabriel

  • Creating DB Control

    Hi, I try to create DB control grid like following : C:\oracle\product\10.2.0\db_1\BIN>emca.bat -config dbcontrol db STARTED EMCA at Nov 18, 2008 7:14:05 AM EM Configuration Assistant, Version 10.2.0.1.0 Production Copyright (c) 2003, 2005, Oracle. 

  • Solaris 8 Jumpstart Rollout

    I am upgrading an existing solaris 2.6 / 2.7 system to solaris 8. I was wondering if anyone has any pointers or advice on where to start, as I have not used or built a jumpstart server before. We have 10*Ultra60 workstations and 1*Sun Enterprise 250

  • Can I use my Shuffle to ...

    Can I use my Shuffle to transfer music files from a Windows PC to a Mac. The reason is I want to get rid of my PC, the PC does not have iTunes and the files are kept in the My Music folder. Can this be done? I have read that I can and I have read tha