REUSE_ALV_GRID_DISPLAY lines seperation

Hi,
I am using FM REUSE_ALV_GRID_DISPLAY to display some records.
Now i got a requirement to print my grid with seperation between records (lines seperation).
How can i achieve this?
Regards
Yossi Rozenberg
*Points will be rewarded

hi check this..
REPORT ZPW_ALV_MULTIPLELINE .
  TYPE-POOLS SLIS .
  CONSTANTS : C_LEN TYPE I VALUE 20 .
  TYPES : BEGIN OF TY_T100          ,
          SPRSL TYPE T100-SPRSL   ,
          ARBGB TYPE T100-ARBGB   ,
          MSGNR TYPE T100-MSGNR   ,
          TEXT  TYPE T100-TEXT    ,
          FLINE TYPE T100-TEXT    ,
        END OF TY_T100            .
TYPES : BEGIN OF TY_WRD   ,
         TEXT TYPE CHAR20 ,
        END OF TY_WRD     .
DATA : IT_T100     TYPE TABLE OF TY_T100 ,
       IT_SENTENCE TYPE TABLE OF TY_WRD  ,
       WA_T100     TYPE TY_T100          ,
       WA_WORD     TYPE TY_WRD           ,
       V_REPID     TYPE SYST-REPID       ,
       V_TABIX     TYPE SYST-TABIX       .
       DATA : IT_FLD TYPE    SLIS_T_FIELDCAT_ALV ,
       IT_EVT TYPE SLIS_T_EVENT        ,
       WA_FLD TYPE SLIS_FIELDCAT_ALV   ,
       WA_EVT TYPE SLIS_ALV_EVENT      .
       INITIALIZATION .
       V_REPID = SY-REPID .
       START-OF-SELECTION .
Get data
  SELECT *
    INTO TABLE IT_T100
    FROM T100
   WHERE SPRSL = 'EN'
     AND ARBGB = '00' .
     LOOP AT IT_T100 INTO WA_T100 .
    V_TABIX = SY-TABIX .
    CLEAR : IT_SENTENCE .
    CALL FUNCTION 'RKD_WORD_WRAP'
         EXPORTING
              TEXTLINE  = WA_T100-TEXT
              OUTPUTLEN = C_LEN
         TABLES
              OUT_LINES = IT_SENTENCE.
              IF NOT IT_SENTENCE IS INITIAL .
          READ TABLE IT_SENTENCE INTO WA_WORD INDEX 1 .
          WA_T100-FLINE = WA_WORD-TEXT .
          MODIFY IT_T100 FROM WA_T100 INDEX V_TABIX .
       ENDIF.   ENDLOOP.
PREPARE FIELDCATELOG
   CLEAR WA_FLD .
  WA_FLD-FIELDNAME = 'SPRSL' .
  WA_FLD-REF_TABNAME = 'T100' .
  WA_FLD-REF_FIELDNAME = 'SPRSL' .
  APPEND WA_FLD TO IT_FLD .
  CLEAR WA_FLD .
  WA_FLD-FIELDNAME = 'ARBGB' .
  WA_FLD-REF_TABNAME = 'T100' .
  WA_FLD-REF_FIELDNAME = 'ARBGB' .
  APPEND WA_FLD TO IT_FLD .
  CLEAR WA_FLD .
  WA_FLD-FIELDNAME = 'MSGNR' .
  WA_FLD-REF_TABNAME = 'T100' .
  WA_FLD-REF_FIELDNAME = 'MSGNR' .
  APPEND WA_FLD TO IT_FLD .
  CLEAR WA_FLD .
  WA_FLD-FIELDNAME = 'FLINE' .
  WA_FLD-INTTYPE      = 'CHAR' .
  WA_FLD-OUTPUTLEN = 20 .
  WA_FLD-INTLEN    = 20.
  WA_FLD-SELTEXT_L = 'Text' .
  WA_FLD-DDICTXT = 'L' .
  APPEND WA_FLD TO IT_FLD .
GET EVENT.. WE WILL HANDLE BOFORE AND AFTER LINE OUTPUT
   CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       IMPORTING
            ET_EVENTS = IT_EVT.
            READ TABLE IT_EVT INTO WA_EVT
  WITH KEY NAME = SLIS_EV_AFTER_LINE_OUTPUT .
  WA_EVT-FORM = SLIS_EV_AFTER_LINE_OUTPUT .
  MODIFY IT_EVT FROM WA_EVT INDEX SY-TABIX .
  CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
            I_CALLBACK_PROGRAM = V_REPID
            IT_FIELDCAT        = IT_FLD
            IT_EVENTS          = IT_EVT
       TABLES
            T_OUTTAB           = IT_T100.
      FORM AFTER_LINE_OUTPUT                                        *
FORM AFTER_LINE_OUTPUT   USING RS_LINEINFO TYPE SLIS_LINEINFO .
CLEAR : IT_SENTENCE ,   WA_T100     .
    READ TABLE IT_T100 INTO WA_T100 INDEX
RS_LINEINFO-TABINDEX .
   CHECK SY-SUBRC = 0 .
   CALL FUNCTION 'RKD_WORD_WRAP'
       EXPORTING
            TEXTLINE  = WA_T100-TEXT
            OUTPUTLEN = C_LEN
       TABLES
            OUT_LINES = IT_SENTENCE.
DESCRIBE TABLE IT_SENTENCE lINES V_TABIX .
   CHECK V_TABIX > 1 .
   LOOP AT IT_SENTENCE INTO WA_WORD FROM 2 .
    WRITE: / SY-VLINE     ,
           10 SY-VLINE    ,
           31 SY-VLINE    ,
           37 SY-VLINE    ,
           38 WA_WORD-TEXT ,
           58 SY-VLINE .
           ENDLOOP.
           ENDFORM .

Similar Messages

  • Horizontal Line seperator

    In the details I need to add horizontal lines between each row. How can I, apart from drawing a line explicitly.
    The purpose is to draw a table that fits the data perfectly.

    Now I am having extra lines in the 2nd page..when I move the Detail B section up..then the first page has extra lines..oh its not working perfectly
    I just want something simple like this..within a table..and the Column names are in the Page HEader and the rest of them in details.
    FirstName     LastName     DOB
    Mike     J     1964-11-10
    Lewis      Hamilton     1981-09-08
    Jenson     Button     1979-02-02
    Thats a simple str8 forward and mostly used format I guess..is it so difficult in crystal reports.
    Edited by: BA Posts on Nov 11, 2009 9:19 PM

  • Help! Line seperator problem of JTextarea

    Hi, I have a text file which has 3 lines of text
    aaa
    bbb
    ccc
    I wanna dislay them in a JTextarea in 3 lines accordingly. I've done:
    String s;
    while((s = reader.readLine()) != null){
    textArea.appendText(s+"\n");
    System.out.println(s);}
    but still one line
    aaabbbccc
    in the textarea. What shall I do? Any help would be greatly appreciated.

    Hey,
    There are couple of ways to achieve what you are trying to do.
    The easiest way is,
    StringBuffer sb=new StringBuffer("<HTML>");
    String s=null;
    JTextArea tArea= new JTextArea;
    while((s = reader.readLine()) != null){
    sb.append(s);
    sb.append("<BR>");
    sb.append("</HTML>")
    tArea.setText(sb.toString());
    thanx,
    Chidda

  • How to select ID into one line seperated by delimiter ','

    Hi,
    I have two tables, PROJECT and BUGS. One project has some bugs. I want to realize this,
    PROJECT BUGS
    2202 5853973,5853997,5856329
    I wrote this PLSQL,
    select b.PROJECT_ID, SYS_CONNECT_BY_PATH(b.BUG_ID, ',')
    from BUGS b
    where PROJECT_ID=2202
    CONNECT BY PRIOR b.BUG_ID = b.PROJECT_ID
    and following is the result,
    2202 ,5853973
    2202 ,5853997
    2202 ,5856329
    I need your help.
    Best regards and thank you,
    Qiang.

    This...?
    sql>select * from bugs;
    BUG PROJECT 
    586523  2202 
    586789  2202 
    585789  2202 
    sql>
    select project, ltrim(max(sys_connect_by_path(bug,',')),',') bugs
    from (select bug,project,row_number() over (order by bug) n
         from bugs
         where project = 2202)
    group by project
    start with n = 1
    connect by prior n = n-1;
    PROJECT BUGS 
    2202  585789,586523,586789
    Message was edited by:
            jeneesh                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • BufferedReader and new line character

    Hi,
    Java doc of BufferedReaders' readLine method says
    Read a line of text. A line is considered to be terminated by any one of a line feed ('\n'), a carriage return ('\r'), or a carriage return followed immediately by a linefeed.
    And the returned string does not contain \r or \n characters. Is it possible to get the the character encountered by BufferedReader which caused the the line to end. (Wether it is \r , \n or \r\n). Or is possible to stop buffered reader from looking out for all \r, \n and \r\n and make it look only for \n.
    Best regards,
    Chamal.

    Hi,
    I want add the line seperator character back to the returned string.
    For example if there was \r then I want to add a \r back to the returned string by readLine method.
    Chamal.

  • How to display the multiple lines text in a single - String, StringBuffer

    Hi,
    I have a textarea field named Decription which contains more than one line seperated by new line.I need to display those five lines in a single text without breaking. Is it possible? I am getting ArrayIndexOutOfBoundsException while i reached to the end of the line. Plz help me how to align the below code so that i can display the lines as a single line in my excel sheet.
                        if(op.getDescription()!=null)
                            String[] oppDescs = op.getDescription().split("\n");
                            StringBuffer sb = new StringBuffer();
                            for(int i1=0; i<=oppDescs.length-1;++i1)
                                *writeFile(sb.append(oppDescs[i1]), valueWriter);*
                         } else {
                            writeFile(op.getDescription(), valueWriter);
    private void writeFile(java.lang.Object value,PrintWriter valueWriter)
            if(value!=null)
                valueWriter.print(value);   
        }Thanks and Regards

    previous was java1.5
    heres a 1.1 - 1.4 version
    String[] oppDescs = op.getDescription().split("\n");
    StringBuffer sb = new StringBuffer();
    for(int i = 0; i < oppDescs.length : i++){
      sb.append(oppDescs);
    sb.append( '\t' );
    writeFile(sb.toString(), valueWriter );Edited by: simon_orange on 31-Oct-2008 13:02                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Add a line break using OAF personalisation.

    Hi All,
    I added a new checkbox in the button bar region for disclaimer purposes as per a client requirement. This checkbox is now sitting in the same line as the rest of other buttons. I want to add a line seperator between the checkbox text and buttons for cosmetic reasons. I tried using spacer option but that just pushes the buttons far and creates a horizontal space bar. Any idea what else can be done?
    Regards,
    Archie.

    Hi Kali,
    The page is FinalReviewPG.xml under /oracle/apps/ap/oie/entry/summary/webui/FinalReviewPG 120.1
    I tried creating it under: Page Button Bar: Actions Region where I already have a checkbox created with a custom text. I created a seperator in this region and reordered the button bar items to have the seperator between the newly created check box and the existing buttons.
    Hope this helps. Thanks a lot for all your effort kali.

  • Insert and retrieve new line character in DB2

    Hi,
    I have a requirement in my project where I need to generate flat files to be sent to the bank for validation and for each record type in the flat file, I want to have a line separator inserted in the file. Now, the line seperator is configurable as a system option as per customers needs which is stored in the database (we are using DB2). Even though, I inserted '\n' (New line character) in the system option as a line separator, while retrieving from database through JDBC and appending to the flat file, it is not recognizing it as a new line character and simply appends '\n\ in the flat file.
    Please suggest any solution for this.

    >
    Why with notepad I don't see 1 record per line? how to solve this problem?
    Hi,
    this is the problem, seems so clear.
    To use wordpad as standard editor is not an answer, neither for me, nor for other people who receives mail.
    No solution is a better answer.
    Best Regards
    Fabio Boni
    Edited by: Fabio Boni on Sep 6, 2010 10:46 AM
    Edited by: Fabio Boni on Sep 6, 2010 10:47 AM

  • Horizontal line in disclaimer

    Anyone know how to format disclaimer text to include a horizontal line?  
    I would like to have a line seperating the disclaimer text from the body of the email.              

    Hi Messenger,
    you can add a horzontal line with the tag in the code view in the disclaimer editor. Like this:
    This is the disclaimer
    Note that this is only possible only on AsyncOS 7.5 and newer, older versions won't support adding HTML tags.
    Hope that helps,
    Andreas

  • Multiple Audio Lines

    hi all,
    Are there any open source projects out there that will show us ways to implement multiple audio lines and allow manipulation of each audio line seperately? e.g volume, pan etc??
    Is anyone working on a project that they would post??
    I have been working on a project which has 8 tracks, i have it playing the 8 tracks of audio but i am simply calling the same play function 8 times with a different file name each time. I use the play method described in the JavaAlmanac.
    If anyone has a project in development or otherwise, i would be very grateful if they would be able to post it here!! I'm sure it will be of benefit to them aswell as everyone else.
    cheers,
    RC

    hello again everyone,
    As no one made any replys to this topic, i will now show you what i have ended up doing to create my multiple track audio sequencer.
    Its not the best in terms of "smart code" but it works, and since i have a deadline for this project, i am happy to get it working no matter what way the code is structured.
    i simply used this file
    import java.awt.*;
    import javax.sound.sampled.*;
    import java.io.*;
    public class AudioTrack0Handler
         boolean mute = false;
         String fileName;
         int loop;
         Clip clip;
         public void play(String file, int loops )
                   fileName = file;
                   loop = loops;
                   try{
                   System.out.println("Play method called file..." + fileName);
                   AudioInputStream stream = AudioSystem.getAudioInputStream(new File("C:\\java\\code\\Audio\\" + fileName ));
                   //AudioInputStream stream = AudioSystem.getAudioInputStream(new File("1.wav"));
                   // At present, ALAW and ULAW encodings must be converted
                   // to PCM_SIGNED before it can be played
                   AudioFormat format = stream.getFormat();
                   if (format.getEncoding() != AudioFormat.Encoding.PCM_SIGNED) {
                        format = new AudioFormat(
                                  AudioFormat.Encoding.PCM_SIGNED,
                                  format.getSampleRate(),
                                  format.getSampleSizeInBits()*2,
                                  format.getChannels(),
                                  format.getFrameSize()*2,
                                  format.getFrameRate(),
                                  true);        // big endian
                        stream = AudioSystem.getAudioInputStream(format, stream);
                   // Create the clip
                   DataLine.Info info= new DataLine.Info(
                        Clip.class, stream.getFormat(), ((int)stream.getFrameLength()*format.getFrameSize()));
                   clip = (Clip) AudioSystem.getLine(info);
                   clip.open(stream);
                   // Start playing
                   clip.loop(loop);
                   //clip.stop();
                   } catch (IOException e) { e.printStackTrace();
                   } catch (LineUnavailableException e) {  e.printStackTrace();
                   } catch (UnsupportedAudioFileException e) { e.printStackTrace();}
         public void stopAudio()
              clip.stop();
              clip.flush();
         public void muteAudio()
              /*Control[] ctrl = clip.getControls();
              for (int i=0; i < ctrl.length; i++)
                   System.out.println(ctrl);
              FloatControl gainControl = (FloatControl)clip.getControl(FloatControl.Type.MASTER_GAIN);
              //double gain = .5D; // number between 0 and 1 (loudest)
              //float dB = (float)(Math.log(gain)/Math.log(10.0)*20.0);
              switch((int)gainControl.getValue())
                             case 0:
                             gainControl.setValue(-80);
                             break;
                             case -80:
                             gainControl.setValue(0);
                             break;
    and created it eight times for 8 audio tracks. i call each track seperately when i need to access the methods. With the stop method and mute method, it also allows me to stop all tracks or mute/unmute individual ones during playback.
    In parts This is a primitve way of doing it (i think) but it will remain here as a guide for anyone who finds it!
    cheers,
    RC

  • How to change to new line?

    the follow is part of my codes:
    FileOutputStream fos = new FileOutputStream("seperate.txt");
    DataOutputStream dos = new DataOutputStream(fos);
    dos.writeChars("the one that i will not love any more has occupied this line");
    dos.writeChars("\n");
    dos.writeChars("\n i want to stand on a new line!! ");
    dos.wrietChars("and embrace a fresh sun tomorrow!");
    fos.close(); dos.close();
    in the output file - seperate.txt, all the "\n" do not work, that is all the Strings stand on just one line.
    how to seperate them?
    thanks a lot more!

    the follow is part of my codes:
    FileOutputStream fos = new
    FileOutputStream("seperate.txt");
    DataOutputStream dos = new DataOutputStream(fos);
    dos.writeChars("the one that i will not love any
    y more has occupied this line");
    dos.writeChars("\n");
    dos.writeChars("\n i want to stand on a new line!!
    dos.wrietChars("and embrace a fresh sun
    n tomorrow!");
    fos.close(); dos.close();
    in the output file - seperate.txt, all the "\n" do not
    work, that is all the Strings stand on just one line.
    how to seperate them? You get the line seperator with:
    System.getProperty("line.separator");
    >
    thanks a lot more!Hope it helps

  • BOX character at the end of line when file transferred from SAP to  WINDOWS

    Hi,
    We have a file interface program which creates a comma seperated '.txt' file in application server. Once it is created in application server in provided path an UNIX script runs which transfers this file from SAP application server to a network drive in WINDOWS platform. This file looks fine  when opened through WINSCP from SAP application server but when checked the file in network drive opened with note pad, it found each line come at the end of another line seperated by 'BOX' character.
    If we opened the file in word pad instead of note pad it looks fine.
    If any one of you have any idea to resolve this issue it will be a great help.
    Thanks,
    Ranadev

    Hi Ranadev,
    This happens because when you transfer the file to the Windows platform using the UNIX script it removes uses only a newline character at the end of each line instead of the Windows platform standard which is carriage return/newline.  The Notepad program displays this character alone as the box that you see.  If you want to verify take the same program and convert to Windows format using Notepad++ and you'll see that the same file then displays properly in Notepad.
    Regards,
    Ryan Crosby

  • What is the function with (line,",")

    I have three integer in a line seperated by two ","
    1, 3, 4
    the last one 4 without "," when use
    new StringTokenizer st = new StringTokenizer(line,";");
    and
    s=st.nextToken();
    the 1 and 3 can be reached but the 4 can not be reached can anybody give me explanation?
    thanks

    what you need to do is give the tokenizer ", " (with a space after the comma).
    It's probably not the tokenizer that burps, but the Integer.parseInt. Whenever you try to convert a string to a number, you should provide a trap for potential exception as follows:
    try {
    int i=Integer.parseInt(myString,10); // make sure presence of leading zero not interpreted as an octal
    catch (NumberFormatException exception) {System.out.println("err"); i=0;} // or something
    V.V.

  • Multiple schedule lines as and whhen mat is available

    Dear Friends I have a requirement where in I want schedule line to be genrated in sales order for one item as and when qty is avaliable and we run an avail check
    for ex
    There is a need for 20 bags 10 is available   after a few days so 2 schedule lines one stating del not possible n req del date and 2nd stating stating when its available the remaining 20 is ava 30 days from now .........so when its available i want that schedule line seperately ...........how do i get the third schedule line
    Right now even if 10 is avalibale it gives me 1 schedule line stating 20  20  0 (confirmed qty)
    Please let m eknw how i could get new schedule lines  as and when the mat is available
    regards
    madddy

    Of course MR Reazzudin
    well this is a ticket that i have received the customer wants schedule lines to be generated for a material automatically everytime it is in stock..currently even if there is a part of the items are aavailable it shows one schedule line with confrd qty as zero
    i mean if the order is for 10 and if 2 are ava rite now
    there should be aschedule line for 2 first and then wheneger further qty is available there is should be a new schedule line
    I myself am not very clear wit the whole process in background
    further information that i can provide is schedule line used is ZCP
    Req class and type is ZCS made to order stock.
    Thnk u for your time.

  • Trying to put a line feed in setToolTipText

    Is it possible to place a character return or line feed in the ToolTipText? I have tried everything that was recommended in other posts but nothing works. \n, \n\r, System.getProperty("line.seperator"), etc. If someone could tell me whether or not it is possible, I would really appreciate it.

    I tried the HTML tags, but they didn't work either.
    Thanks for the responses. Are you sure? I would have expected that to work. I guess you know you have to put <html> at the start of the string.
    E.g. "<html>Line one<br>line two.</html>"
    The </html> at then end is optional, but the <html> at the start is required. Maybe post the code you used???
    Regards,
    Tim

Maybe you are looking for

  • H/T make it so a contact can no longer see convers...

    my private conversation with said "contact" is sharing our conversation with other people. i need a way that will not just delete what i see as our history, but the history for the "contact". actually i would rather keep the history for myself, but b

  • How can I give free coupons for my paid app ?

    Hi everybody, A friend of mine asked me to promote his new app (he's a developper of course ...) I had this great idea to give some free coupons to some people to promote my app (just give 300 free coupons to people who might be interested). I don't

  • How do I get rid of recording "skips"?

    Whenever I attemp to record a real instrument - mostly guitar - I invariably get at least one or two (sometimes many more) "skips." Usually these are loud digital spikes that cut out enough information to throw the part out of sync with the rest of t

  • DCR Server Error LMS 4.0

    Hi, Dear Expert. first of all i apologies that my English is not good. i am using Microsoft Windows Server 2003 Enterprise Edition SP1 and using CiscoWorks LAN Management Solution Version 4.0 when i click on discovery button in inventory menu. then i

  • I installed the latest Firefox nd now all my menus are in a foreign language, so I can't find the setting I need to change.

    I can't read what the menus and so forth say, so i can't find the right setting to change the language. I tried re-installing again but it did it again.