Interactive report – column heading in multiple rows

I am using interactive report. My question to the expert/guru’s is: - How do I change column heading into multiple row with text wrap.
For example:- My column heading is
Is Employee Trained ? -------> (single row display)
I want to make it display like
Is Employee
Trained ? ------> (Multi row display)
Sagar

Hi,
What you could do is, disable the download csv function from IR (Interactive Report Attributes--> Search Bar-- Uncheck Download) and in the region header create a link and redirect it to another page which will have the csv report output.
e.g. <a href="#"  onclick="javascript:redirect('f?p=&APP_ID.:3:&SESSION.::&DEBUG.:3::');"" >Download Report </a>
Here I am redirecting the link to Page 3. On Page 3 create a sql report with the same query and make report template to csv. Thanks,
Manish

Similar Messages

  • Interactive Report Column Heading Filters using LIKE instead of =

    Still on APEX 3.1
    I have an inter active report with a column Like Below
    select case when trunc(c.resp_contact_dt, 'MM') = trunc(sysdate, 'MM') or trunc(c.oth_contact_dt, 'MM') = trunc(sysdate, 'MM') then '<img src="/i/contact_2_green.png" alt="RESP A: ' || to_char(c.resp_attempt_dt, 'MM/DD/YYYY') || ' C:' || to_char(c.resp_contact_dt, 'MM/DD/YYYY') ||'
    ' || 'OTH A: ' || to_char(c.oth_attempt_dt, 'MM/DD/YYYY') || ' C:' || to_char(c.oth_contact_dt, 'MM/DD/YYYY') || '">'
    when trunc(c.resp_attempt_dt, 'MM') = trunc(sysdate, 'MM') or trunc(c.oth_attempt_dt, 'MM') = trunc(sysdate, 'MM') then '<img src="/i/contact_2_yellow.png" alt="RESP A: ' || to_char(c.resp_attempt_dt, 'MM/DD/YYYY') || ' C:' || to_char(c.resp_contact_dt, 'MM/DD/YYYY') ||'
    ' || 'OTH A: ' || to_char(c.oth_attempt_dt, 'MM/DD/YYYY') || ' C:' || to_char(c.oth_contact_dt, 'MM/DD/YYYY') || '">'
    else '<img src="/i/contact_1_red.png" alt="RESP A: ' || to_char(c.resp_attempt_dt, 'MM/DD/YYYY') || ' C:' || to_char(c.resp_contact_dt, 'MM/DD/YYYY') ||'
    ' || 'OTH A: ' || to_char(c.oth_attempt_dt, 'MM/DD/YYYY') || ' C:' || to_char(c.oth_contact_dt, 'MM/DD/YYYY') || '">' end as Contact,
    This column header has an User defined LOV
    select '%green%' d,
    '<img src="/i/contact_2_green.png">' r from dual
    Union select '%red%' d,
    '<img src="/i/contact_1_red.png">' r from dual
    union select '%yellow%' d,
    '<img src="/i/contact_2_yellow.png">' r from dual
    When user select my Red image from the column header link
    the filter generates where contact = '%red%' This fails
    Is there a way to generate the filter contact like '%red%' without the user having to change it to like.
    Is this possible in 4.0?

    I am assuming Because of the crickets either I am doing my SQL to incorrectly and there is a better way to return get a popup with a changing image into an interactive report
    or
    There is no way to do what I am trying

  • Remove interactive report column heading underline

    Dear
    while developing the interactive report, all the column headings are underline in default. it is possible to just remove the underline and all the remaining functionality (sorting and braking) remain the same.
    i have also tried
    <style type="text/css">
    .apexir_WORKSHEET_DATA th div {text-decoration:none}
    </style>
    in the page HTML header, but got no result.
    kindly guide.
    Regards,
    Muhammad Usman

    Hi,
    Try add to page HTML header
    &lt;style type="text/css">
    table.apexir_WORKSHEET_DATA th div {text-decoration:none!important}
    &lt;/style>Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0

  • ALV column header with multiple rows and ALV column header span

    How could I have in an ALV a column header on several lines and/or a column header that spans on multiple columns?
    i.e. I would like to have in an ALV two columns, each with it's own distinct header and additionally another column header for both of the columns, that spans across both columns. How could I program this?

    Hi,
    follow below mentioned code
    SET THE LABEL OF THE COLUMN
    DATA: hr_weeknum TYPE REF TO cl_salv_wd_column_header.
    CALL METHOD lr_weeknum->get_header
    RECEIVING
    value = hr_weeknum.
    CALL METHOD lr_weeknum->set_resizable
    EXPORTING
    value = abap_false.
    hr_weeknum->set_prop_ddic_binding_field(
    property = if_salv_wd_c_ddic_binding=>bind_prop_text
    value = if_salv_wd_c_ddic_binding=>ddic_bind_none ).
    set the text of the column
    CALL METHOD hr_weeknum->set_text
    EXPORTING
    value = 'C Form'.
    Regards,
    Srini.

  • Report column header

    Hi frinds.
    How can I put report column header in two rows?
    ex.
    Family common services
    1
    2
    1
    I want it to be like this
    Family
    common services
    1
    2
    1
    thanks

    Alaakh,
    Just add an HTML &lt;br/&gt; in your 'Report Attributes > Column Attributes > Header'.
    So this should be:
    Family&lt;br/&gt;common services
    Anthony
    http://anthonyrayner.blogspot.com

  • Interactive Report Column Headings and Row Height

    I am using the div style="width:350px;" method to control the width of columns in various interactive reports. That works fine except for the following:
    1. When creating filters, the <div...> stuff shows up along with the actual column heading, thus confusing some end users
    2. Even when I uncheck the "Use same text for single row view" checkbox and then provide a simple single row view label, the <div> stuff still shows up on the single row view
    Does anyone have a better solution?
    Also, does anyone know of a way to limit the row height within an interactive report row? I have some columns of data that contain a large amount of HTML data and I'd like to be able to limit the number of rows that show on the report.
    Is Oracle planning to provide some better control over the Interactive Report columns in another version? The Interactive Report is such a huge improvement in usability in APEX - it would be great to take it to another level by providing some better control over column width and row height.
    Edited by: DaleB on Jun 18, 2009 8:54 AM
    Edited by: DaleB on Jun 18, 2009 8:54 AM

    Dale,
    Unfortunately we don't have much we can use to do what you would like. I would have said it's impossible until version 4 but you could actually do something similar to what Roel has done. His trick is in the edit button. He changed the edit button to use an "onload" call to a JavaScript process. You could do the same but call a process that goes across the rows and styles each column. Now because you don't have a way to identify the column (can't use the order because the end user could change it) you'll have to write the code to look at the top row first and then style the appropriate column. As far as I can tell, this would be quite difficult and inefficient. Having said that if you need it that bad and would like some help with it, put up an example application on apex.oracle.com and provide the workspace/username/password and I'll take a look.
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • Interactive report column filters to display differently than column values

    Greetings...
    We use images a lot in our interactive reports to provide a visual representation to a status, or something locked for update, or what-have-you. By default, when a user clicks the column heading of a column which contains images, the drop-down list that shows up displays the actual images, which is nice for the user to identify exactly which thing they want to filter on. The problem is when the user selects on of the options in the filtering drop-down, the resulting condition that is displayed under the interactive report search bar is the HTML code of the image. I'd like something else to display there because showing the user the HTML code is atrocious.
    I didn't think what I want is possible, but then I came across the Page Locks page within ApEx (page 4000:291 in ApEx 4.0.1) which displays a list of all the pages of an application and whether they are locked or not. It also allows you to bulk lock or bulk unlock a bunch of pages. That page uses an interactive report with a column called "Status" which contains images that represent whether the page is locked or not. When you click the "Status" column heading to filter, instead of seeing the images of an open and closed lock, you see the words "Page Locked" and "Page Unlocked." And even better... when you select on of them, the condition that is displayed to the user is very user-friendly.
    Can someone tell me how this is done so I can replicate it in my own apps?
    Shane.

    Why not create the IR using the text you require e.g. 'Lock', 'Unlock' and then use JQuery to replace the text in the report with the image you want. All the filters should then show the plain text and the report will display the image. e.g.
    http://apex.oracle.com/pls/apex/f?p=46801:1
    Here's what I did:
    Firstly make sure the IR has a region template.
    Then create a Dynamic Action with the following attributes:
    1. Advanced
    2. Event: After Refresh
    3. Selection Type: Region
    4. Region: [select the IR Region]
    5. Action: Execute JS Code
    6. Fire on page load: [checked]
    7. Code:
    $('td [headers="TEST"]').each(function(index) {
      if ($(this).text() == 'Lock') {
        $(this).empty().html('<img src="/i/htmldb/icons/locked_small.gif" alt="Lock" />');
      else {
        $(this).empty().html('<img src="/i/htmldb/icons/unlocked_small.gif" alt="Unlock" />');
    });Where TEST is the column name.
    That's it, this may also be of interest:
    http://simonhunt.blogspot.com/2011/10/adjusting-interactive-report-column.html
    I hope it helps
    Shunt

  • How to display data in interactive report column without colons (:)

    Dear Apex gurus,
    I'm a newbie and have just created an Apex application from a spreadsheet. I've created a named list of values and used it in a checkbox against a field in the default page 3 Create form.
    When I've selected multiple values in my check box in the form, the data in the interactive report appears as one line with colons separating the selected values like this: Dog:Cat:Bird
    What I would like is to have the data appear in the interactive report column as a multi-line list like this:
    Dog
    Cat
    Bird
    I can work around this by modifying the SQL code in the Region Source of the Region Definition of the report (Default Page 1 interactive report) to replace the colons with <br>
    SELECT replace("PETS_CHOSEN",':','<br>') "PETS_CHOSEN", FROM "MYAPP" Note: this doesn't format properly in the posting. I replace the colon with a html br
    This works, but seems to be a hack to me. I am guessing that I've missed a simple option setting somewhere, but I can't find it.
    The other problem with this solution is that when I export the report to Excel, what is exported is Dog<br>Cat<br>Bird, which is seems worse than colons.
    Thanks,
    - Morgan
    Edited by: mnrussel on 16-Feb-2009 04:13

    Hi Morgan,
    I think you have at least two choices:
    1 - Replace the colons with ', ' (comma and space) - sort of reasonable on screen and in an export
    2 - Create a second page that has the same report but uses the "export: csv" template. Create a manual link to this page to replace the standard Export link. When such report pages are requested, they download immediately instead of displaying. You can, therefore, use commas in this one and &lt;br&gt; tags in the on-screen report version
    Andy
    ps - To display tags in a post, use &amp;lt; for &lt; and &amp;gt; for &gt;

  • Make interactive report column nowrap

    How do I make one of the interactive report column nowrap? In the standard report, I can add "white-space:nowrap" to column formatting, but IR does not have this option.

    Hi,
    Regular reports typically use different class name and other attributes for headings/data cells.
    In some cases, the TD tag that contains the data uses the "headers" attribute containing the column name or alias. Many browsers can use this for styling.
    For example: [http://apex.oracle.com/pls/otn/f?p=267:114]
    In the region's Region Header, I have:
    &lt;style type="text/css"&gt;
    td[headers=ENAME] {background-color:red}
    #ENAME {background-color:yellow}
    &lt;/style&gt;I've used the background-color style to make it obvious, but other styling can be used if required. On this report, the column heading uses the column name/alias for the ID, so I've also used #ENAME to style that as well.
    Andy

  • How To Concatenate Column Values from Multiple Rows into a Single Column?

    How do I create a SQL query that will concatenate column values from multiple rows into a single column?
    Last First Code
    Lesand Danny 1
    Lesand Danny 2
    Lesand Danny 3
    Benedi Eric 7
    Benedi Eric 14
    Result should look like:
    Last First Codes
    Lesand Danny 1,2,3
    Benedi Eric 7,14
    Thanks,
    David Johnson

    Starting with Oracle 9i
    select last, first, substr(max(sys_connect_by_path(code,',')),2) codes
    from
    (select last, first, code, row_number() over(partition by last, first order by code) rn
    from a)
    connect by last = prior last and first = prior first and prior rn = rn -1
    start with rn = 1
    group by last, first
    LAST       FIRST      CODES                                                                                                                                                                                                  
    Lesand         Danny          1,2,3
    Benedi         Eric           7,14Regards
    Dmytro

  • Passing parameter from interactive report column link to new page

    I'm very simply trying to pass the value of the column link to the where clause on the next page.
    Interactive Report on P2 has column link fid alias in sql query.
    I read somewhere to refer prefix the interactive report column with IR ??
    So I have item name P2_FID, value #FID#. Anyway, I've tried a kazillion things.
    Created a hidden item with same source value... sigh.
    Is there a syntax to refer to a report column link, rather than an item_id in a region where clause?
    Is there a simple direct way to do this?
    Thanks,
    Pamela
    -----pls/apex/f?p=163:1:2746459963336955::NO::P2_FID:119

    Thank you Varad...
    Unfortunately, I am still getting no data found. (and there IS data).
    a) Do you mean in the link column section of the report attributes? that is done: item 1 name= IR_P2_FID, value = #FID#
    b) Do you mean my changing my hidden page item to ir_p2_fid with its source value as #FID# ? also done.
    Do I need this hidden item?, and if not how do I refer to link in the where clause of the called page's sql region?
    3) Where Fishery_id = :IR_P2_FID
    Where Fishery_id = &IR_P2_FID
    Thanks again!
    Pamela

  • Interactive Report column visible but cannot filter

    I have a complex interactive report running on Oracle 10gR1 using Apex 3.1
    When I display the report, all the desired columns are visible. However, when I try to do a filter on a particular column it does not appear in the column filter list even though it is visible in the Select Column list. All the other report columns are available in the filter list.
    The specific column is the result of a join and a substitution within the SQL select. The problem column is 'file_nm'. I've bolded the line in the script below.
    Any suggestions?
    Thanks,
    George
    Here's the IR sql:
    WITH joined_data AS
    ( SELECT a.fdno fdno
    , a.site_abbrv_cd site
    , a.season
    , a.find_id
    , a.dig_ctgy_cd dig_ctgy
    , a.find_ctgy_cd find_ctgy
    , a.materials_qstnbl_ind matl_qstnbl
    , a.color
    , a.field_obj_type_nbr field_type_nbr
    , a.is_inscribed_ind is_inscribed
    , a.display_seq_nbr seq_nbr
    , n.img_file_nm file_nm
    , h.material_descr
    , g.general_matl_ind primary
    , g.specific_matl_ind secondary
    , i.keyword
    , i.kw_cls
    , i.lvl_nbr
    , j.kw_descr
    , b.site_subdiv_type_cd AS type
    , b.site_subdiv_nm AS nm
    , CONCAT(b.sq_h_coord, CONCAT(b.sq_v_coord,
    CONCAT(':', b.locus_nbr))) AS locus
    FROM find a
    LEFT OUTER JOIN ref_item_assoc m ON a.find_id = m.obj_id
    AND m.deflt_dsply_img_ind = 'Y'
    LEFT OUTER JOIN digital_img n ON m.ref_item_id = n.ref_item_id
    LEFT OUTER JOIN find_site_subdiv ab ON a.find_id = ab.find_id
    LEFT OUTER JOIN site_subdiv b ON ab.site_subdiv_id = b.site_subdiv_id
    LEFT OUTER JOIN keyword_assocn i ON a.find_id = i.obj_id
    LEFT OUTER JOIN keyword j ON i.keyword = j.keyword
    AND i.kw_cls = j.kw_cls
    LEFT OUTER JOIN material_find g ON a.find_id = g.find_id
    LEFT OUTER JOIN material h ON g.material_cd = h.material_cd
    SELECT site
    , find_id
    , season
    , fdno
    , matl_qstnbl
    , CASE WHEN color IS NOT NULL THEN color ELSE 'No entry' END AS color
    , CASE WHEN field_type_nbr IS NOT NULL THEN field_type_nbr ELSE 'No entry' END As Field_type_nbr
    , is_inscribed
    , seq_nbr
    *, MAX (CASE WHEN file_nm IS NOT NULL THEN 'Y' ELSE 'N' END) AS file_nm*
    , MAX (CASE WHEN type = 'AR' THEN nm ELSE 'No entry' END) AS Area
    , MAX (CASE WHEN type = 'AL' THEN nm ELSE 'No entry' END) AS A_Level
    , MAX (CASE WHEN type = 'LO' THEN locus ELSE 'No entry' END) AS Locus
    , MAX (CASE WHEN kw_cls = 'FI_CTGY' THEN kw_descr ELSE 'No entry' END) AS find_ctgy
    , MAX (CASE WHEN kw_cls = 'FI_DIGCTGY' THEN kw_descr ELSE 'No entry' END) AS dig_ctgy
    , MAX (CASE WHEN primary = 'Y' THEN material_descr END) AS Primary
    , MAX (CASE WHEN secondary = 'Y' THEN material_descr END) AS Secondary
    , MAX (CASE WHEN (kw_cls = 'FI_DESCR' AND lvl_nbr = 1) THEN keyword ELSE 'No entry' END) AS descr1
    , MAX (CASE WHEN (kw_cls = 'FI_DESCR' AND lvl_nbr = 2) THEN keyword ELSE 'No entry' END) AS descr2
    , MAX (CASE WHEN (kw_cls = 'FI_DESCR' AND lvl_nbr = 3) THEN keyword ELSE 'No entry' END) AS descr3
    , MAX (CASE WHEN (kw_cls = 'FI_DESCRN' AND lvl_nbr = 1) THEN keyword ELSE 'No entry' END) AS DescrN_1
    , MAX (CASE WHEN (kw_cls = 'FI_DESCRN' AND lvl_nbr = 2) THEN keyword ELSE 'No entry' END) AS DescrN_2
    , MAX (CASE WHEN (kw_cls = 'FI_DESCRN' AND lvl_nbr = 3) THEN keyword ELSE 'No entry' END) AS DescrN_3
    , MAX (CASE WHEN (kw_cls = 'FI_DESCRN' AND lvl_nbr = 4) THEN keyword ELSE 'No entry' END) AS DescrN_4
    , MAX (CASE WHEN (kw_cls = 'FI_DESCRN' AND lvl_nbr = 5) THEN keyword ELSE 'No entry' END) AS DescrN_5
    , MAX (CASE WHEN (kw_cls = 'FI_DESCRN' AND lvl_nbr = 6) THEN keyword ELSE 'No entry' END) AS DescrN_6
    , MAX (CASE WHEN (kw_cls = 'FI_DESCRN' AND lvl_nbr = 7) THEN keyword ELSE 'No entry' END) AS DescrN_7
    , MAX (CASE WHEN (kw_cls = 'FI_DESCRN' AND lvl_nbr = 8) THEN keyword ELSE 'No entry' END) AS DescrN_8
    , MAX (CASE WHEN (kw_cls = 'ARCH_CNTXT' AND keyword IS NOT NULL) THEN keyword ELSE 'No entry' END) as arch_cntxt
    FROM joined_data
    GROUP BY site, find_id, season, fdno, matl_qstnbl, color, field_type_nbr, is_inscribed, seq_nbr
    ORDER BY seq_nbr

    Look at the interactive report Column Attribute, Allow Users to Filter check box might not be checked for this column. Thanks.
    --Manish                                                                                                                                                                                                                                                                                       

  • How to display the column header in two rows?

    Hi Experts,
    I am using ALV_LIST_DISPLAY i neeed to display the column header in two rows.. How can i do that?
    Ex: purchase order i  need to display "purchase" in one row and "order" in second row.
    Thanks in advance,
    Sarath.j

    REPORT zpwtest .
    TYPE-POOLS slis .
    DATA : layout TYPE slis_layout_alv .
    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 .
      READ TABLE it_evt INTO wa_evt
      WITH KEY name = slis_ev_top_of_page .
      wa_evt-form = slis_ev_top_of_page .
      MODIFY it_evt FROM wa_evt INDEX sy-tabix .
      layout-no_colhead = 'X' .
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
           EXPORTING
                i_callback_program = v_repid
                it_fieldcat        = it_fld
                is_layout          = layout
                it_events          = it_evt
           TABLES
                t_outtab           = it_t100.
    *       FORM top_of_page                                              *
    FORM top_of_page .
        uline .
        WRITE: / sy-vline     ,
               10 sy-vline    ,
               11 'line1'     ,
               31 sy-vline    ,
               37 sy-vline    ,
               58 sy-vline    .
        WRITE: / sy-vline     ,
               10 sy-vline    ,
               11 'line2'     ,
               31 sy-vline    ,
               37 sy-vline    ,
               58 sy-vline    .
        WRITE: / sy-vline     ,
               10 sy-vline    ,
               11 'line3'     ,
               31 sy-vline    ,
               37 sy-vline    ,
               58 sy-vline    .
    ENDFORM.
    *       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 .

  • How  to resize the column header according to row data

    Hi,
    How can i resize the column header according to row date .. means if data is small header should be small and vice versa ,...
    Any help is appreciated .. Snippet will be more helpful .
    Thanks,
    Shekhar

    Oxley (binkley) blogged about this: http://binkley.blogspot.com/2006/01/getting-jtable-columns-widths-to-fit.html
    Christian Ullenboom | tutego

  • Concatenate a column value across multiple rows - PDW

    We are using PDW based on SQL2014. We require an efficient logic on how to concatenate a column value across multiple rows. We have the following table
    T1
    (CompanyID, StateCD)
    Having following rows:
    1              NY
    1              NJ
    1              CT
    2              MA
    2              NJ
    2              VA
    3              FL
    3              CA
    We need a code snippet which will return following result set:
    1                    
    CT,NJ,NY
    2                    
    MA,NJ,VA
    3                    
    CA,FL
    We have tried built-in function STUFF with FOR XML PATH clause and it is not supported in PDW. So, we need a fast alternative.

    Hi Try this:
    SELECT * INTO #ABC
    FROM 
    SELECT 1 AS ID,'NY' AS NAME
    UNION 
    SELECT 1 AS ID,'NJ' AS NAME
    UNION 
    SELECT 1 AS ID,'CT' AS NAME
    UNION 
    SELECT 2 AS ID,'MA' AS NAME
    UNION 
    SELECT 2 AS ID,'NJ' AS NAME
    UNION 
    SELECT 2 AS ID,'VA' AS NAME
    UNION 
    SELECT 3 AS ID,'FL' AS NAME
    UNION 
    SELECT 3 AS ID,'CA' AS NAME
    )A
    CREATE TABLE ##CDB (ID INT, NAME NVARCHAR(800)) 
    DECLARE @TMP VARCHAR(MAX), 
            @V_MIN INT,
    @V_MAX INT,
    @V_COUNT INT
    SELECT @V_MIN=MIN(ID),@V_MAX=MAX(ID) FROM #ABC 
    SET @V_COUNT=@V_MIN
    WHILE @V_COUNT<=@V_MAX
    BEGIN
    SET @TMP = '' SELECT @TMP = @TMP + CONVERT(VARCHAR,NAME) + ', ' FROM #ABC 
    WHERE ID=@V_COUNT
    INSERT INTO ##CDB (ID, NAME) SELECT @V_COUNT AS ID ,CAST(SUBSTRING(@TMP, 0, LEN(@TMP)) AS VARCHAR(8000)) AS NAME 
    SET @V_COUNT=@V_COUNT+1
    END
    SELECT * FROM ##CDB
    OR
    SELECT * INTO #ABC
    FROM 
    SELECT 1 AS ID,'NY' AS NAME
    UNION 
    SELECT 1 AS ID,'NJ' AS NAME
    UNION 
    SELECT 1 AS ID,'CT' AS NAME
    UNION 
    SELECT 2 AS ID,'MA' AS NAME
    UNION 
    SELECT 2 AS ID,'NJ' AS NAME
    UNION 
    SELECT 2 AS ID,'VA' AS NAME
    UNION 
    SELECT 3 AS ID,'FL' AS NAME
    UNION 
    SELECT 3 AS ID,'CA' AS NAME
    UNION 
    SELECT 5 AS ID,'LG' AS NAME
    UNION 
    SELECT 5 AS ID,'AP' AS NAME
    )A
    CREATE TABLE ##CDB (ID INT, NAME NVARCHAR(800)) 
    DECLARE @TMP VARCHAR(MAX), 
            @V_MIN INT,
    @V_MAX INT,
    @V_COUNT INT
    SELECT @V_MIN=MIN(ID),@V_MAX=MAX(ID) FROM #ABC 
    SET @V_COUNT=@V_MIN
    WHILE @V_COUNT<=@V_MAX
    BEGIN
    SET @TMP = '' SELECT @TMP = @TMP + CONVERT(VARCHAR,NAME) + ', ' FROM #ABC 
    WHERE ID=@V_COUNT
    SELECT @V_COUNT AS ID ,CAST(SUBSTRING(@TMP, 0, LEN(@TMP)) AS VARCHAR(8000)) AS NAME INTO #TEMP 
    INSERT INTO ##CDB (ID, NAME) SELECT ID, NAME FROM #TEMP WHERE NAME<>''
    DROP TABLE #TEMP
    SET @V_COUNT=@V_COUNT+1
    END
    SELECT * FROM ##CDB
    Thanks Shiven:) If Answer is Helpful, Please Vote

Maybe you are looking for