Mapping, splitting linen in several lines

Hi,
I have the following situation.
The source structure contains a field that can be up to 4000 characters long,
The target structure contains a field than has a length of 132.
These fields have to be mapped with each other but how can I split the field of 4000 characters
into several lines of 132 characters long?
kind regards Maarten

Hi,
You can do this with a UDF.
Create a advanced UDF of type Context and use the following code.
while(a[0].length() >132)
String tem = a[0].substring(0,132);
a[0] = a[0].substring(132,a[0].length());
result.addValue(tem);
Note that this UDF splits only for the first occurance of the source field i.e. a[0] if you require for all the occurance loop through the source field and also the single target field should have a unbounded occurance.
Thanks
SaNv...

Similar Messages

  • Split table record into several lines - pdf forms

    hello experts
    im trying to split a table record into several lines in order to present the whole table record in the form.
    for example:
    table T has 4 fields F1 F2 F3 F4
    if the tables has 2 records - R1 and R2 (every record contains 4 data fields) then i want to present my table in the following way:
    R1-F1 R1-F2
    R1-F3 R1-F4
    R2-F1 R2-F2
    R2-F3 R2-F4
    please do not refer me to links - i really need a specific procedure
    thanks ahead to all
    Eyal
    P.S i am using the adobe lifecycle - SFP tran.

    hey everyone
    it has been solved
    for the record:
    subform table (flowed content) contains 2 positioned subforms
    subforn header
    subform lines contains 2 flowed subforms 1 for the first two fields and 1 for the ladt two fields
    thank anyway
    Eyal

  • Issue with splitting string into multiple lines

    Hi Experts,
    I have a long string s. I want to split this string into several lines each having 72 characters. For this I have done following programming:
         String s = "For the first time it includes a supplementary report attempting to determine if extreme weather
    events can be linked to human-induced climate change. The research team, including members
    of the UK Met Office, identified recent episodes of extreme weather then used a computer to
    estimate the likelihood of the episode happening in a world without increased CO2." ;
         s = s.replaceAll("[\r\n]+", " ");
         char[] sAr = s.toCharArray();
         AbstractList RecepitsList7 = new Bapitrtext.Bapitrtext_List();;
         int start = 0; // start with
         int i = 72 ;
    //     for (int i = 71; i < sAr.length; i++) {
    while (i < sAr.length) {
    //     {     if (sAr[i] == ' ')
                   Bapitrtext Recepits7 = new Bapitrtext();
                   Recepits7.setTextid("TEXT");
                   Recepits7.setTextline(s.substring(start, i).replaceAll("[\r\n]+", ""));
                   RecepitsList7.add(Recepits7);
                   start = i+1;
                   i += 72;
         input.setText(RecepitsList7);
    The output of program is as below:
    For the first time it includes a supplementary report attempting to dete
    mine if extreme weather events can be linked to human-induced climate
    hange. The research team, including members of the UK Met Office, iden
    ified recent episodes of extreme weather then used a computer to estim
    te the likelihood of the episode happening in a world without increased
    Here as we can see last characters are getting deleted by program. For example in first line
    determine 'r' is missing in extreme right.
    In 3rd line c is missing in extreme left (word change is needed. Program
    prints hange.
    Also in 3rd line extreme right 't' is missing
    Also in 4th line extreme right 'a' is missing
    Also the last line is not being printed. In last line "CO2." " should appear.
    There are two issues:
    1. Why last word of each sentence is not being printed?
    2. Why last sentence is not being printed?
    I am struggling since last 2 days. Please help. I made all changes like replacing 72 by 71 etc.
    By making such changes, I am able to print first line correctly. However under all cases
    last character of 2nd line onward is not getting displayed.
    Also last line is not getting displayed. I did every thing like using while instead of for loop etc.
    Kindly help.
    Regards,
    Gary
    Edited by: 945655 on Jul 10, 2012 11:39 PM

    String s = wdContext.currentContextElement().getExpense_Text();
         s = s.replaceAll("[\r\n]+", " ");
         char[] sAr = s.toCharArray();
         AbstractList RecepitsList7 = new Bapitrtext.Bapitrtext_List();;
         int start = 0; // start with
         int i = 72;
    while (i < sAr.length) {
                   Bapitrtext Recepits7 = new Bapitrtext();
                   Recepits7.setTextid("TEXT");
                   System.out.println(s.substring(start, i));
                   RecepitsList7.add(Recepits7);
                   start = i+1;
                   i += 72;
         input.setText(RecepitsList7);
    Edited by: 945655 on Jul 11, 2012 2:25 AM

  • Mapping between Sales Order-Schedule-Line and Delivery-item

    Hi together,
    I want to extend the Datasource 2LIS_12_VCITM (Delivery-number, -item, Order-number,-item is available) by Sales Order Schedule Line.
    Could not find any ERP table (VBEP and LIPS allow a mapping only on item level) for the mapping between Sales Order Schedule Line and Delivery item yet. The use of the extractor 2LIS_12_VCSCL for the extention (e.g. infoset) afterwards is no option.
    Thanks for your help in advance!!
    Assign full points!!
    Sven

    Hi Reddy,
    thanks for your answer.
    I know that I have to add this field.. but the problem is, how to fill this field. I don't know how to map the delivery-item with the schedule line-item.

  • HP officejet Pro L7590 Prints 1/2 of the text line on several lines of document

    I got an email for diagnosing the printer and I was prompted to install updated drivers and I did that and now when I print the test page I get several lines of text that only prints the top or bottom 1/2 of the letters across the page, I Printed a self test diagnostic Page and it printed everything in pink but it did not print 1/2 letters across the page like the test page,Then I printed a Print quality page and it did the same as the test page and it did the same as the test page, then I tried to calibrate the line feed thinking that may correct the problem but did not, What what can I do ????
    Irven
    This question was solved.
    View Solution.

    Hi mmcmret8,
    Thank you for your reply! It is possible the printheads might need to be changed, at this point I would recommend to please call our phone support at 800-474-6836. If you live outside the US/Canada Region, please click the link below to get the support number for your region. Country-language selector.
    Best regards!
    RnRMusicMan
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to say “Thanks” for helping!

  • Excise invoice getting split for every 2 line items in J1IS

    Dear Experts,
    While doing J1IS - Excise invoice getting split for every 2 line items.
    can anybody help me.
    regards,
    sri ram

    Hi,
    Please check the maximum number of line items per excise invoice under customizing
    logistics general->Tax on goods movement->India->Basic settings->Maintain excise registration->check for EI items.
    I think it is defined as 2.
    Regards,
    Krishna A S V

  • Several line in a cell

    is it possible to create several line in one cell in a table?

    it's nothing to do with wrapping text, i just want to create multiple line in one cell,
    i want to create
    cell1   cell2     cell3
    ab       ab1     1
              ab2     
              ab3     
    but..... ab1, ab2, and ab3 in one cell

  • FS that updates several lines in the table-part

    Hi!
    I use 2005A B1..
    Can i make FS that updates several lines in the table-part of the marketing doc? For example, i press Shift+F2 in the "Tax Code" cell of the 1st row of the doc, the rest of the lines in the table will have "Tax Code" also updated?
    Regards,
    David

    Hi,
    You can do this using formatted searches.  Please try the following:
    1.  Create a UDF on the 'Marketing Document - Title' called 'VATCODE'
    2.  Add a FS to the UDF with the following query
    SELECT T0.\[Code\] FROM OVTG T0
    3.  Add the formatted search to the Tax Code field in the lines with the following query
    SELECT $\[ORDR.U_VATCODE\]
    The key thing is when setting up the FS at line level you need to set it so that it Auto Refreshes 'When Field Changes' and not 'When Exiting Altered Column'.  The column will be the VATCODE UDF you set up earlier.
    Now if you add a few lines to your order and then select the VAT Code in your UDF by pressing Shift F2 then it will copy down to all the lines.  The only issue is that it will not automatically copy down to any lines added after you have selected the VATCODE UDF.
    I hope this helps.
    Regards,
    Adrian

  • OR ('|') in regular expressions (e.g. split a String into lines)

    Which match gets used when you use OR ('|') to specify multiple possible matches in a regex, and there are multiple matches among the supplied patterns? The first one (in the order written) which matches? Or the one which matches the most characters?
    To make this concrete, suppose that you want to split a String into lines, where the line delimiters are the same as the [line terminators used by Java regex|http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html#lt] :
         A newline (line feed) character ('\n'),
         A carriage-return character followed immediately by a newline character ("\r\n"),
         A standalone carriage-return character ('\r'),
         A next-line character ('\u0085'),
         A line-separator character ('\u2028'), or
         A paragraph-separator character ('\u2029)
    This problem has [been considered before|http://forums.sun.com/thread.jspa?forumID=4&threadID=464846] .
    If we ignore the idiotic microsoft two char \r\n sequence, then no problem; the Java code would be:
    String[] lines = s.split("[\\n\\r\\u0085\\u2028\\u2029]");How do we add support for \r\n? If we try
    String[] lines = s.split("[\\n\\r\\u0085\\u2028\\u2029]|\\r\\n");which pattern of the compound (OR) regex gets used if both match? The
    [\\n\\r\\u0085\\u2028\\u2029]or the
    \\r\\n?
    For instance, if the above code is called when
    s = "a\r\nb";and if the first pattern
    [\\n\\r\\u0085\\u2028\\u2029]is used for the match when the \r is encountered, then the tokens will be
    "a", "", "b"
    because there is an empty String between the \r and following \n. On the other hand, if the rule is use the pattern which matches the most characters, then the
    \\r\\n
    pattern will match that entire \r\n and the tokens will be
    "a", "b"
    which is what you want.
    On my particular box, using jdk 1.6.0_17, if I run this code
    String s = "a\r\nb";
    String[] lines = s.split("[\\n\\r\\u0085\\u2028\\u2029]|\\r\\n");
    System.out.print(lines.length + " lines: ");
    for (String line : lines) System.out.print(" \"" + line + "\"");
    System.out.println();
    if (true) return;the answer that I get is
    3 lines:  "a" "" "b"So it seems like the first listed pattern is used, if it matches.
    Therefore, to get the desired behavior, it seems like I should use
    "\\r\\n|[\\n\\r\\u0085\\u2028\\u2029]"instead as the pattern, since that will ensure that the 2 char sequence is first tried for matches. Indeed, if change the above code to use this pattern, it generates the desired output
    2 lines:  "a" "b"But what has me worried is that I cannot find any documentation concerning this "first pattern of an OR" rule. This means that maybe the Java regex engine could change in the future, which is worrisome.
    The only bulletproof way that I know of to do line splitting is the complicated regex
    "(?:(?<=\\r)\\n)" + "|" + "(?:\\r(?!\\n))" + "|" + "(?:\\r\\n)" + "|" + "\\u0085" + "|" + "\\u2028" + "|" + "\\u2029"Here, I use negative lookbehind and lookahead in the first two patterns to guarantee that they never match on the end or start of a \r\n, but only on isolated \n and \r chars. Thus, no matter which order the patterns above are applied by the regex engine, it will work correctly. I also used non-capturing groups
    (?:X)
    to avoid memory wastage (since I am only interested in grouping, and not capturing).
    Is the above complicated regex the only reliable way to do line splitting?

    bbatman wrote:
    Which match gets used when you use OR ('|') to specify multiple possible matches in a regex, and there are multiple matches among the supplied patterns? The first one (in the order written) which matches? Or the one which matches the most characters?
    The longest match wins, normally. Except for alternation (or) as can be read from the innocent sentence
    The Pattern engine performs traditional NFA-based matching with ordered alternation as occurs in Perl 5.
    in the javadocs. More information can be found in Friedl's book, the relevant page of which google books shows at
    [http://books.google.de/books?id=GX3w_18-JegC&pg=PA175&lpg=PA175&dq=regular+expression+%22ordered+alternation%22&source=bl&ots=PHqgNmlnM-&sig=OcDjANZKl0VpJY0igVxkQ3LXplg&hl=de&ei=Dcg7S43NIcSi_AbX-83EDQ&sa=X&oi=book_result&ct=result&resnum=1&ved=0CA0Q6AEwAA#v=onepage&q=&f=false|http://books.google.de/books?id=GX3w_18-JegC&pg=PA175&lpg=PA175&dq=regular+expression+%22ordered+alternation%22&source=bl&ots=PHqgNmlnM-&sig=OcDjANZKl0VpJY0igVxkQ3LXplg&hl=de&ei=Dcg7S43NIcSi_AbX-83EDQ&sa=X&oi=book_result&ct=result&resnum=1&ved=0CA0Q6AEwAA#v=onepage&q=&f=false]
    If this link does not survive, search google for
    regular expression "ordered alternation"
    My first hit went right into Friedl's book.
    Harald.

  • How to comment several lines in single go in LSMW?

    Hi,
    How to comment several lines in single go in LSMW? in SE38 we can select the code and CTRL+< . But in LSMW this will not work out. So how to comment several lines in single go?
    Regards
    Sreekanth

    Sreekanth,
    I've worked with LSMW for awhile but never found an easier way.  The editor is old so you won't even see multiple comment command.  I figure that you can select a block and cut it and put on se38 and do the comment from there then paste it back into lsmw.
    Good luck.
    Tai

  • Group several lines in different ports

    Experts:
    I used the Labview andI met a problem by group several lines in different ports. For example, I had 11 address lines, there are 8 in port C and 3 in port D. I want to group them into a group. I used the group configration and group write function to write signal to those lines. But it seems didn't work. Plese gave me some suggestion. Thanks!
    --Ying

    Typcially, when you group multiple ports together the port or channel size should be multiple of 8. This means that if you want to group 11 lines together, you will have to group port C and D, a total of 16 lines together. When you read from those 16 lines, you can ignore the upper 5 bits of data. When you write to those 16 lines, you can write zero to the upper 5 bits.

  • Printing web pages prints several lines of info on second sheet

    when i print a web page it always prints superfluos info on several lines of second sheet of paper i.e., site name and date and some other info. is this a margins issue or????

    This web printing utility may offer some help:
    http://www8.hp.com/us/en/partner/microsoft/bing-bar-for-hp/smart-print-download.html?jumpid=reg_r100...
    007OHMSS
    I was a support engineer for HP.
    If the advice resolved the situation, please mark it as a solution. Thank you.

  • How to split batch to several sub-batch via 'MB1B'

    Hi, experts, i would like to split batch into several sub-batches via 'MB1B', is there relative move type?

    You can use 309 material to material transfer movement type. Transfer your stock to from Batch A to Batch B, C, D, E (in Receiving Batch Field) depends on the quantity you have.
    If It helps you, kindly give points.
    Regards,
    RM

  • How do I print Avery labels?  I can do the address only using address book, but I need to add several lines of additional information.

    How do I print Avery mailing labels?  I can do them using my address book, but I need to have several lines of additional info. on the label.  Thanks.

    You chose a group of addresses you want to print and then use command-P. You will get a drop down menu where you have to select the Avery number or size of labels. It's pretty rigid.
    I can't stand the limitations of the Contacts method of printing address labels. I don't want to waste a partial sheet if my selection doesn't come out even with the number of labels. I'd like to duplicate addresses which I use often to fill up the partial sheet. I like being creative with fonts, colors and even borders or images. Your ability to be creative with Contacts printing is severely limited.
    I've used Pay&Play's Label Printer Pro software for years. I originally paid MUCH more for this program. It's extremely versitle. Design one label and you can copy it to the rest of the labels in the drop down menu with one click. Chose how many of whichever lablel you want to duplicate with a simple cut and paste to fill up the page.
    I can vouch that it works perfectly with Mountain Lion, v 10.8.2.
    Here's the link to their direct download from their website for $6.95:
    http://www.payplaysoftware.com/download.html
    Or you can look up Label Printer Pro 7 on the app store and pay $9.99.
    No, I don't work for or have any ties to the company other than being a satisfied customer of a product which suits my needs perfectly.

  • Nokia maps does not work off line

    Nokia Maps doesn't work off line but Nokia Drive does on my Lumia 900). Anybody knows why?
    Solved!
    Go to Solution.

    Nokia Drive can use offline maps on WP7.x devices, not Nokia Maps 
    Click on the blue Star Icon below if my advice has helped you or press the 'Accept As Solution' link if I solved your problem..

Maybe you are looking for