How to look for spaces in an extract file in order to trigger a MOVE_IT rule

In studio I am defining a variable field on a section and I want to pull information from my extract file using a simple MOVE_IT rule. 
I am trying to pull information from a record that has spaces in columns 10-14.  How do I enter the information required in the DATA field to request this? 
For example, if I was pulling the information from a record that had "XXXXX" in column 10-14 I know the DATA field would be 10,XXXXX
I cant seem to figure out how to look for spaces at a particular offset.
Thanks.

Using XPath to locate the elements you are after is very easy.
Try something like this:
import java.io.File;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathFactory;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
public class BasicXMLReplaceWithDOM4J {
     static String inputFile = "C:/student.xml";
     static String outputFile = "C:/studentRenamed.xml";
     public static void main(String[] args) throws Exception {
          // Read xml and build a DOM document
          Document doc = DocumentBuilderFactory.newInstance()
                    .newDocumentBuilder().parse(new InputSource(inputFile));
          // Use XPath to find all nodes where student is named 'Suresh'
          XPath xpath = XPathFactory.newInstance().newXPath();
          NodeList nodes = (NodeList)xpath
               .evaluate("//stud_name[text()='Suresh']", doc, XPathConstants.NODESET);
          // Rename these nodes
          for (int idx = 0; idx < nodes.getLength(); idx++) {
               nodes.item(idx).setTextContent("Suresh-Renamed");
          // Write the DOM document to the file
          Transformer xformer = TransformerFactory.newInstance().newTransformer();
          xformer.transform(new DOMSource(doc), new StreamResult(new File(outputFile)));
}- Roy

Similar Messages

  • How to look for the Table Name

    Hi Friends,
    Sometimes we need to download the table for the desired information if the same is not available from a particular report. How to look for the table name? Is there a report or a particular feild, where we can find the name of the particular table?
    Thanks for the assistance.
    Regards

    Hi Friend,
    If you want to see the structures then go to SE11. Sometimes it happens that you cannot find the table names but only fields. In such case, if you want to find the Table names which is not available, then go to SE90.
    Abap Dictionary > Fields > Table Fields.
    Now Enter the Field name in Right Hand Side of the screen then Execute. You will see the all tables by which that Fields are used.
    Regards,
    Jigar

  • How  to  look for  fi doc  number in cj88

    HI  expert:
          when I  run cj88.   the system generate FI  doc number.   how to look for FI doc number.
    can you tell me !
    thank you !!!!

    Hi,
    You can see the FI Doc. thru' given instruction
    Go to T-code CJI3 then fillup the WBS no. in which you want to see the Settlement document.
    Execute then filter up document type AA  double click on this & click on FI document.
    Hope it will solve your problem.
    Regards,
    Vishal Kr. Sharma

  • How to look for kMAT material in Testing client?

    Hi PP members:
    How to look for KMAT material in Test client,
    Note: I went to mm60 and entered material type: KMAT it did not populate any
    materials
    Is there any way where I can find the materials, If yes please let me know
    thanks
    Suren

    Hi Saritha:
    When I went to SE16, and entered MTART as KMAT it giving the following
    It is replying me back "No table entries found for specified key"
    Also want to bring to your kind attention I left MATNR field blank as I donot know
    the VC materials
    thanks

  • How to look for business partner number in GTS

    Hi Experts,
    How to look for the business partner number in GTS when we have the Customer Id number in r/3?
    Please let me know the path in GTS.
    Edited by: Anurag87 on Dec 9, 2010 2:17 PM

    Hello,
    just simple in GTS in transaction BP find by "3 External number" (which is yours R/3 number).
    Or in se16 table /SAPSLL/PNTBP type in field BPVSY you external number from R/3 system.
    Cheers,
    Gabriel.

  • How to look for a keyword in SAP MaxDB Library 7.6

    Hi,
    how to look for a keyword in SAP MaxDB Library 7.6 ( http://maxdb.sap.com/doc/7_6/7e/c3fb0e72fcf84580f7ee9fcec672b7/frameset.htm)
    Thank you.

    http://maxdb.sap.com/documentation/
    =>
    Section u201CDownloadu201D - HTMLHelp file < 7.8 or 7.7 version >
    HTMLHelp file
    .chm, full text search, print-optimized, 6.3 MB
    < download it or open it >
    < If downloaded, Then start on your server:
           maxdb-chmdoc-en-78_740.chm   >
    and type a keyword in field u201CType in the keyword find:u201D and search.
    Itu2019s working fine.
    Regards, Natalia Khlopina

  • How to look for sales order number if I know outbound delivery number?

    How to look for sales order number if I know outbound delivery number?

    Hi ,
        If you want to see the Sales order Number from Outbound delivery or invoice,go to their respective T-codes,say for example,
    for delivery,Goto Tcode: VL02N / VL03N.There you will find Document Flow Icon,click on that,or press F7.
    You will get a window,there you can see the Sales order Number before your outbound delivery Number
    With Thanks and Regards,
    Priya

  • Looking for something that converts various file formtats to TIFF

    Hi everyone,
    I am currently working on a project where I am expected to convert numerous files of various formats into 1 multipage pdf and 1 multipage tiff.
    I've been messing around a lot with iText (which i liked a lot because of how it was free) and I see how it can very nicely convert a multipage TIFF to a multipage PDF.
    Hence, I am looking for something that can convert files of various formats (i.e. doc, txt, jpg, pdf) to a multipage tiff.
    Thank you very much.

    Uh-huh. So what on earth would possess you to ask that question on a forum devoted to Java sound?
    I hope that a mod. might notice this thread and move it to a more appropriate forum.
    And since I am here, the Java forum for TIFFs would be JAI. Try looking through some threads there, for tips.
    Edited by: AndrewThompson64 on Jan 8, 2009 3:30 PM

  • Looking for the Garbage Collection log files

    Hello,
    I am looking for the Garbage Collection log files which contain the GC events, like this:
    [GC 2095K->1709K(2160K), 0.0017628 secs]
    [Full GC 2161K->1018K(2276K), 0.0576353 secs]
    The server's GC is already configured accordingly:
    –verbose:gc
    I have examined the std_server<x>.out files at the work folder but can't see this info.
    My question is: Where would I find these files on the server?

    I can't find info in the format I know it not at dev_server* or std_server*.
    in std_server I see xml file like this:
    <gc type="scavenger" id="1" totalid="1" intervalms="0.000">
        <flipped objectcount="303111" bytes="24994248" />
        <tenured objectcount="0" bytes="0" />
        <refs_cleared soft="429" weak="4329" phantom="0" />
        <finalization objectsqueued="1711" />
        <scavenger tiltratio="50" />
        <nursery freebytes="497866672" totalbytes="524288000" percent="94" tenureage="10" />
        <tenured freebytes="1094921936" totalbytes="1098907648" percent="99" >
          <soa freebytes="1039977168" totalbytes="1043962880" percent="99" />
          <loa freebytes="54944768" totalbytes="54944768" percent="100" />
        </tenured>
        <time totalms="185.585" />
      </gc>
    I guess this is the info I need but it's not formatted in a way that your tool can read it and having a tool like this reading it is very helpful.
    Any ideas?

  • How to look for a certain value in a database using sql

    Hello everyone. How do you do this in SQL? Or, is there a way to look for a certain value in a database? What I'm trying to do is this:
    I want to look for the exact value "abcdefg" in the database so that oracle will return me details on the following that contains the said value:
    1. the name of the table(s)
    2. the column/field name(s)
    Note: "abcdefg" could exist in different tables with different column names with different data types.
    Any help is much appreciated. Thanks.
    UPDATE: What about if I just want to check those fields/columns with string data types?
    Message was edited by:
    dongzky
    Message was edited by:
    dongzky

    Just a teeny tweek
    DECLARE
       l_dummy   VARCHAR2 (4000);
    BEGIN
       FOR rec IN (SELECT table_name
                     FROM all_tables)
       LOOP
          FOR rec2 IN (SELECT column_name
                         FROM user_tab_cols
                        WHERE table_name = rec.table_name)
          LOOP
             BEGIN
                EXECUTE IMMEDIATE    'select 1 from '
                                  || rec.table_name
                            || ' where to_char('
    || rec2.column_name
    || ') = ''CAS'' and rownum = 1'
                             INTO l_dummy;
                DBMS_OUTPUT.PUT_LINE (rec.table_name || ' ' || rec2.column_name);
             EXCEPTION
                WHEN NO_DATA_FOUND
                THEN
                   NULL;
             END;
          END LOOP;
       END LOOP;
    END;

  • How to look for files

    Hi!
    How do I look for files (e.g. jpg) on the device or media card? Like in drives/folders in windows?

    Go  to your Media icon and open it, press the Menu key and then EXPLORE.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • How to check for space in manual trigger Search Mask(True/False) Propertie?

    I would like to trigger an section called section1 coded within the from frm1, when at least one record of a transaction has a value of FRM at offset 1 and spaces in position 358?
    I am trying to specify as below:
    1,FRM,358()
    is the above syntax correct?
    Even though, ' ' appears in extract file for record at offset 358 and with FRM in position 1, the section1 is not triggrered. I have verified in the NA file?
    Please note that FRM can be a repeating record.
    Thanks,
    Bala

    Hi Bala,
    The correct trigger would be:
    "1,FRM,358, "
    Please note the space at the end of the trigger.
    Gaétan

  • Looking for SAP solution to extract data from the production system

    Hello,
    we are looking for the SAP standard tool to extract data from the production system and copy it to the development system. It should be as functional as some kind of partial client copy. The data, which we need to replicate is master and transactional data from FI, CO, AA MM and nice to have FS-RI modules. There is a product offered by the IntelliCorp called "Data Management" but we would like to know if SAP offers its own product.
    Kind regards,
    Krzysztof Murkowski

    Hi,
    SAP offers a solution called 'Test Data migration Server' or TDMS.
    You can access the master guide from the below link:
    https://service.sap.com/~form/sapnet?_FRAME=CONTAINER&_OBJECT=011000358700006332942006E
    Cheers !!
    Satya.
    PS: Pls reward points if the answer was helpful...Thx.

  • How to look for duplicate process instances?

    In Oracle BPM 11g, is there a good way to look for duplicate process instances based on process data attributes? For example, I have entered an instance of a process for 'John Smith' with a date of '4/1/2010' and I want to see if there is another instance in the same process with these same data values to evaluate as a potential duplicate. I believe we can write a java service to invoke the API to do this, but I am wondering if there is a better way within the process design to do this (XPath extension functions or soemthing?). It seems like this would be a common need.

    I am really looking for an approach to looking for duplicate instances within my process flow, not from EM. So, if the user starts a new instance of a process, I can check for another instance that appears to be a duplicate and direct the flow to a human activity to review the potential duplicate and make a decision as to whether to continue processing the new instance or reject it. My guess is that we need to us a service task to invoke java code which uses the API to investigate other instances with the same values. But, I was hoping for a simpler solution....I have to think that this is not too uncommon.

  • How to look for a particular phrase in a document???

    Hey guys, I'm a little new at this thing... I need to figure out a way to make Java search through a document looking for instances of particular phrases, and replacing them with something else. For example, have it look for "A B C" and replace each such combination of words with "D E F". The search/replace needs to look for a few different phrases at once.

    String.replaceAll is a fine answer, but you are creating Strings left, right & center, tis best to use a StringBuilder/Buffer.
        private static void replaceAll( StringBuilder sb, String search, String replace ) {
         int index = sb.indexOf( search, 0 );
         while( index >= 0 ) {
             sb.replace( index, index+search.length(), replace );
             index = sb.indexOf( search, index );
        }

Maybe you are looking for