How we can   drill-down, sorting, traffic lights,  in ALV report

hi gurus ,
how we can   drill-down, sorting, traffic lights,  in ALV report .
please any one suggest that...
regards,
praveen

Check the sample code for drill-down, sorting, traffic lights,  in ALV report.
REPORT YMS_COLOURALV NO STANDARD PAGE HEADING.
TYPE-POOLS: SLIS, ICON.
DATA: FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA: BEGIN OF IMARA OCCURS 0,
LIGHT(4) TYPE C,
MATNR TYPE MARA-MATNR,
MTART TYPE MARA-MTART,
MAKTX TYPE MAKT-MAKTX,
COLOR_LINE(4) TYPE C,
TCOLOR TYPE SLIS_T_SPECIALCOL_ALV, "cell
END OF IMARA.
DATA: XCOLOR TYPE SLIS_SPECIALCOL_ALV.
START-OF-SELECTION.
PERFORM GET_DATA.
PERFORM WRITE_REPORT.
FORM GET_DATA.
WRITE ICON_GREEN_LIGHT AS ICON TO IMARA-LIGHT.
IMARA-MATNR = 'ABC'.
IMARA-MTART = 'ZCFG'.
IMARA-MAKTX = 'This is description for ABC'.
APPEND IMARA.
WRITE ICON_YELLOW_LIGHT AS ICON TO IMARA-LIGHT.
IMARA-MATNR = 'DEF'.
IMARA-MTART = 'ZCFG'.
IMARA-MAKTX = 'This is description for DEF'.
APPEND IMARA.
WRITE ICON_RED_LIGHT AS ICON TO IMARA-LIGHT.
IMARA-MATNR = 'GHI'.
IMARA-MTART = 'ZCFG'.
IMARA-MAKTX = 'This is description for GHI'.
APPEND IMARA.
LOOP AT IMARA.
IF SY-TABIX = 1.
IMARA-COLOR_LINE = 'C410'. " color line
ENDIF.
IF SY-TABIX = 2. " color CELL
CLEAR XCOLOR.
XCOLOR-FIELDNAME = 'MTART'.
XCOLOR-COLOR-COL = '3'.
XCOLOR-COLOR-INT = '1'. " Intensified on/off
XCOLOR-COLOR-INV = '0'.
APPEND XCOLOR TO IMARA-TCOLOR.
ENDIF.
MODIFY IMARA.
ENDLOOP.
ENDFORM. "get_data
FORM WRITE_REPORT.
DATA: LAYOUT TYPE SLIS_LAYOUT_ALV.
LAYOUT-COLTAB_FIELDNAME = 'TCOLOR'.
LAYOUT-INFO_FIELDNAME = 'COLOR_LINE'.
PERFORM BUILD_FIELD_CATALOG.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
IS_LAYOUT = LAYOUT
IT_FIELDCAT = FIELDCAT
TABLES
T_OUTTAB = IMARA.
ENDFORM. "write_report
FORM BUILD_FIELD_CATALOG.
DATA: FC_TMP TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE.
CLEAR: FIELDCAT. REFRESH: FIELDCAT.
CLEAR: FC_TMP.
FC_TMP-REPTEXT_DDIC = 'Status'.
FC_TMP-FIELDNAME = 'LIGHT'.
FC_TMP-TABNAME = 'IMARA'.
FC_TMP-OUTPUTLEN = '4'.
FC_TMP-ICON = 'X'.
APPEND FC_TMP TO FIELDCAT.
CLEAR: FC_TMP.
FC_TMP-REPTEXT_DDIC = 'Material Number'.
FC_TMP-FIELDNAME = 'MATNR'.
FC_TMP-TABNAME = 'IMARA'.
FC_TMP-OUTPUTLEN = '18'.
APPEND FC_TMP TO FIELDCAT.
CLEAR: FC_TMP.
FC_TMP-REPTEXT_DDIC = 'Material Type'.
FC_TMP-FIELDNAME = 'MTART'.
FC_TMP-TABNAME = 'IMARA'.
FC_TMP-OUTPUTLEN = '10'.
APPEND FC_TMP TO FIELDCAT.
CLEAR: FC_TMP.
FC_TMP-REPTEXT_DDIC = 'Material'.
FC_TMP-FIELDNAME = 'MAKTX'.
FC_TMP-TABNAME = 'IMARA'.
FC_TMP-OUTPUTLEN = '40'.
APPEND FC_TMP TO FIELDCAT.
ENDFORM. "build_field_catalog

Similar Messages

  • How to print traffic lights in ALV reports

    hi how to print traffic lights on selection screen in alv reports

    HI,
    check below code
    TYPE-POOLS : icon.
    types:  BEGIN OF ty_display,
            status     TYPE icon-id,
            bukrs      TYPE bseg-bukrs,
            gjahr      TYPE bseg-gjahr,
            monat      TYPE monat,
            work_order TYPE z_work_order,
            glaccount  TYPE saknr,
            message    TYPE string,
          END OF ty_display.
    data : it_display     TYPE TABLE OF ty_display,
             wa_display TYPE ty_display.
    WRITE icon_led_green AS ICON TO wa_display-status.
            wa_display-gjahr = p_year.
            wa_display-bukrs = p_cc.
            wa_display-monat = p_period.
            wa_display-work_order = v_aufnr.
            wa_display-glaccount = wa_bseg-hkont.
        APPEND wa_display TO it_display.
    WRITE icon_led_red AS ICON TO wa_display-status.
              wa_display-gjahr      = p_year.
              wa_display-bukrs      = p_cc.
              wa_display-monat      = p_period.
              wa_display-work_order = v_aufnr.
              wa_display-glaccount  = wa_bseg-hkont.
              wa_display-message    = text-010.
              APPEND wa_display TO it_display.
    change the icon color based on your requirement and append it to the internal table which you have to display in ALV.
    reward points if it is helpful.
    Regards,
    Srilatha

  • How to run drill down reports

    now i am using 9ids
    Before dev 2.1 was used.
    now before we had provision to run drill reports
    by putting a button on report
    and using
    srw.run_report(); procedure ,in button action trigger.
    now in 9i what i observed there is no object button in reports.
    button has changed to text item and there is no such action trigger.
    how to run the report
    as reports are run from form by using
    web.show_document
    pls suggest.

    Hi Rajendra,
    Again prasanth here, As u said, there is no more push button in 9i and 10g, ok. so u can drill down reports by using hyperliks which is only way(according to me). some may suggest to include JSP buttons. But u can simply place any text item like 'click here to run report' and in the property inspector(i.e.property pallette) set the hyper link property with the desination of your file. It may be a weblink or may be local file path.
    example
    hyperlink: www.oracle.com/..or
    c:\temp\test.rdf
    or u can write a trigger for that text item:
    1)right clik the text item
    2)goto pl/sql editor
    3)put the code
    a varchar(30);
    begin
    a:=srw_run_report('<the report link you want')
    return(a);
    but before doing this make sure that the item type of tha t text item property should be pl/sql(this can be set in property pallete of that text item)
    I think this help you,
    Thanks and Regards
    Prasanth A.S.

  • How to configur Drill down on Bubble Chart

    Hi,
    Can anyone please hel me with examples - how to confihure drill down on bubble chart.
    that means,
    1) whenever the user clicking the bubbles - the pop up window should display some notes related to that bubble
    and also in another requirement
    2) whenever the user click the bubble - the pie chart should display the values related to that bubble.
    please help me on achieving the same..

    If the Bubble size is constant we can do this.But as you know Bubble sizes varies from once to one place..It will be tough scenario if you want to do it here..Instead take a label based menu and try to use dynamic visiblity .And show labels in there which contains the text for the respective labels..

  • How to use drill down hierarchy in column chart of BO OLAP edition tool?

    I had created hierarchy table in olap tool where i can drill down Zonewise then Regionwise then Customerwise but this technique is not possible in Graph of Olap tool ,so my question is how can aaply drill down method in graph?

    Hello Raul
    This is odd. Have a look at the screen shots below. I start at the top level "WORLD".
    I right-click on "WORLD" and choose "Expand". This gives me the second screen shot.
    I then right-click on "NORTH AMERICA" and choose "Expand". This gives me the third screenshot.
    As you can see, levels are expanded one-at-a-time. The only thing I can think of is that the BW query has been set up to drill down automatically to a particular level.
    Regards

  • How to perform drill-down on web besides in Runtime previewer?

    Hi, I tried to display my report on web browser. My reports contains drill-down fuctions(srw.run_report) which works great in Runtime previewer. However, when I tried to used Report Server 6i to delpoy my report on the web browser in html or pdf format, the drill-down function didn't work. Does anyone know how to do it? I appreciate any help. Thanks in advance.
    Joe

    Hi Rajendra,
    Again prasanth here, As u said, there is no more push button in 9i and 10g, ok. so u can drill down reports by using hyperliks which is only way(according to me). some may suggest to include JSP buttons. But u can simply place any text item like 'click here to run report' and in the property inspector(i.e.property pallette) set the hyper link property with the desination of your file. It may be a weblink or may be local file path.
    example
    hyperlink: www.oracle.com/..or
    c:\temp\test.rdf
    or u can write a trigger for that text item:
    1)right clik the text item
    2)goto pl/sql editor
    3)put the code
    a varchar(30);
    begin
    a:=srw_run_report('<the report link you want')
    return(a);
    but before doing this make sure that the item type of tha t text item property should be pl/sql(this can be set in property pallete of that text item)
    I think this help you,
    Thanks and Regards
    Prasanth A.S.

  • How to Enable Drill Down in WebI through Infoview

    Hello Experts,
    I have WebI report, I am running through Infoview and I see drill down option is disabled, can anybody help me how to enable drill down option.
    Thank you
    Ravi

    HI Ravi,
    Log on to CMC -> Application -> Right Click on Web Intelligence Rich Client -> Select your user -> Assign Security -> Advanced tab -> Select "Unassigned Rights" in Common Filter Settings -> Select Enable Drill Mode in Rights Name Column -> And assigned grant level to it.
    Hope this help.
    Regards,
    Rishit

  • How to create drill down report in sap query

    how to create drill down report in sap query ,

    hi,
    The pdf below gives the steps to create drill down report.
    http://www.sappoint.com/abap/eis.pdf
    also check.
    <a href="http://72.14.203.104/search?q=cache:k-SFYy_rjPIJ:www.hrexpertonline.com/archive/Volume%252003%2520(2">http://72.14.203.104/search?q=cache:k-SFYy_rjPIJ:www.hrexpertonline.com/archive/Volume%252003%2520(2</a>
    regs,
    jaga

  • How to use drill down option in Crystal Report

    Dear all,
            I want to know how to use drill down option in Crystal report 2008.  In below i have explained my screnario
    For example
       My scenario is.  In crystal report I have Purchase order like PO101,PO102.  Each purchase order have 5 line items.  If i drill down each purchase order it should display line item in crystal report. 
    Regards,
    Baskaran.

    hi,
    Create a Group on 'Purchase order'.
    Group Expert -> Select the Purchase Order and Click the arrow button such that it appears right side. Click ok.
    GH1 is inserted.
    Your detail section should include 'Line items' fields.
    Right Click 'Detail' section on left hand side,  Click 'Hide (Drill down Ok)'.
    Now you will see only 'Purchase order's in Group Headers.
    Now when you click on a particular order, you will see respective line items.
    Regards,
    Vamsee

  • How to enable drill down?

    Hi,
    I use BIEE 11.1.1.5.0. I can drill down by clicking column. But I made some changes to the repository recently. It doesn't support drill down now. Is it any additional config to enable drill down?
    Thanks

    Hi,
    Did you delete any dimension hierarchy in the rpd.Could you elaborate on the change?
    Rgds,
    Dpka

  • Display Traffic Lights in ALV TREE

    Hi,
    I have to display traffic light in ALV tree but i am not able to find out what parameter i should pass like in ALV grid where we can set is_layout (BCALV_GRID_04).
    Thanks in advance.
    Regards,
    Harsh

    Hi,
    Please take a look at my code below. Hope it suits your requirement.
    P.S. Please award points if it helps...
    *& Report ZMM_R_PO_TO_IPURCH_XI
    *& PROGRAM TYPE  : Report
    *& RICEF ID      :
    *& TITLE         : ZMM_R_PO_TO_IPURCH_XI
    *& SAP Module    : MM
    *& CREATION DATE : 02/06/2008
    *& AUTHOR        : Aris Hidalgo
    *& DESIGNER      : Aris Hidalgo
    *& DESCRIPTION   :
    *$**********************************************************************
    *$     CHANGE HISTORY
    *$----------------------------------------------------------------------
    *$   DATE        | T-Num      | Description                  | Reference
    **               |            |                              |
    *$**********************************************************************
    REPORT  zmm_r_po_to_ipurch_xi
            NO STANDARD PAGE HEADING
            MESSAGE-ID zmm.
    * Data Dictionary Table/s                      *
    TABLES: edidc.
    * SELECTION-SCREEN                             *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: s_credat FOR edidc-credat OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    PARAMETERS: rb_sum RADIOBUTTON GROUP grp1,
                rb_det RADIOBUTTON GROUP grp1.
    SELECTION-SCREEN END OF BLOCK b2.
    */ CLASS DEFINITION/S /*
    *       CLASS lcl_data_def DEFINITION
    CLASS lcl_data_def DEFINITION ABSTRACT.
      PUBLIC SECTION.
        TYPES: BEGIN OF t_edidc,
                docnum TYPE edidc-docnum,
                docrel TYPE edidc-docrel,
                status TYPE edidc-status,
                doctyp TYPE edidc-doctyp,
                direct TYPE edidc-direct,
                rcvpor TYPE edidc-rcvpor,
                rcvprt TYPE edidc-rcvprt,
                rcvprn TYPE edidc-rcvprn,
                rcvsad TYPE edidc-rcvsad,
                sndpor TYPE edidc-sndpor,
                sndprt TYPE edidc-sndprt,
                sndprn TYPE edidc-sndprn,
                sndsad TYPE edidc-sndsad,
                credat TYPE edidc-credat,
                cretim TYPE edidc-cretim,
                mestyp TYPE edidc-mestyp,
                idoctp TYPE edidc-idoctp,
               END OF t_edidc.
        TYPES: BEGIN OF t_output,
                exception TYPE char1,
                ebeln     TYPE ekko-ebeln,
                lifnr     TYPE lfa1-lifnr,
                name1     TYPE lfa1-name1,
                credat    TYPE edidc-credat,
                cretim    TYPE edidc-cretim,
               END OF t_output.
        TYPES: BEGIN OF t_ekko,
                ebeln TYPE ekko-ebeln,
                lifnr TYPE ekko-lifnr,
               END OF t_ekko.
        TYPES: BEGIN OF t_lfa1,
                lifnr TYPE lfa1-lifnr,
                name1 TYPE lfa1-name1,
               END OF t_lfa1.
        DATA: gt_edidc  TYPE STANDARD TABLE OF t_edidc,
              gt_output TYPE STANDARD TABLE OF t_output,
              wa_output LIKE LINE OF gt_output,
              gt_ekko   TYPE HASHED TABLE OF t_ekko
                        WITH UNIQUE KEY ebeln,
              gt_lfa1   TYPE HASHED TABLE OF t_lfa1
                        WITH UNIQUE KEY lifnr.
    ENDCLASS.                    "lcl_data_def DEFINITION
    CLASS lcl_alv_routines  DEFINITION DEFERRED.
    CLASS lcl_handle_events DEFINITION DEFERRED.
    *       CLASS lcl_get_data DEFINITION
    CLASS lcl_get_data DEFINITION INHERITING FROM lcl_data_def.
      PUBLIC SECTION.
        METHODS: get_idocs,
                 read_idocs,
                 process_data
                   IMPORTING
                     im_docnum TYPE edidc-docnum.
      PRIVATE SECTION.
        CONSTANTS: lc_mestyp     TYPE edidc-mestyp VALUE 'ZMARKETSITE_PURCHASE_ORDER',
                   lc_idoctp     TYPE edidc-idoctp VALUE 'ZMARKETSITE_PURCHASE_ORDER01',
                   lc_segnam     TYPE edid4-segnam VALUE 'ZMARKETSITE_ORDER_HEADER1'.
        CONSTANTS: lc_red        TYPE i VALUE 1,
                   lc_yellow     TYPE i VALUE 2,
                   lc_green      TYPE i VALUE 3.
        DATA: lv_stat_message    TYPE bdidocattr-message,
              o_lcl_alv_routines TYPE REF TO lcl_alv_routines.
        DATA: ls_idoc_control    TYPE edidc,
              lv_tot_data_recs   TYPE sy-dbcnt,                 "#EC NEEDED
              lv_tot_status_recs TYPE sy-dbcnt.                 "#EC NEEDED
        DATA: lt_edids TYPE STANDARD TABLE OF edids,
              lt_edidd TYPE STANDARD TABLE OF edidd.
    ENDCLASS.                    "lcl_get_data DEFINITION
    *       CLASS lcl_alv_routines DEFINITION
    CLASS lcl_alv_routines DEFINITION INHERITING FROM lcl_get_data.
      PUBLIC SECTION.
        DATA: lcl_table            TYPE REF TO cl_salv_table,
              lcl_container        TYPE REF TO cl_gui_custom_container,
              lcl_handle_events    TYPE REF TO lcl_handle_events,
              lcl_columns          TYPE REF TO cl_salv_columns_table,
              lcl_column           TYPE REF TO cl_salv_column_table,
              lcl_events2          TYPE REF TO cl_salv_events_table,
              lcl_display_settings TYPE REF TO cl_salv_display_settings,
              lcl_functions        TYPE REF TO cl_salv_functions_list,
              lcl_display          TYPE REF TO cl_salv_display_settings,
              lcl_aggregations     TYPE REF TO cl_salv_aggregations,
              lcl_sorts            TYPE REF TO cl_salv_sorts,
              lcl_content          TYPE REF TO cl_salv_form_element,
              lcl_header           TYPE REF TO cl_salv_form_header_info,
              ls_color             TYPE lvc_s_colo.
        DATA: lcl_grid            TYPE REF TO cl_salv_form_layout_grid,
              lcl_grid_1          TYPE REF TO cl_salv_form_layout_grid,
              lcl_grid_2          TYPE REF TO cl_salv_form_layout_grid,
              lcl_label           TYPE REF TO cl_salv_form_label,"#EC NEEDED
              lcl_text            TYPE REF TO cl_salv_form_text,
              gt_t247             TYPE STANDARD TABLE OF t247,
              wa_t247             LIKE LINE OF gt_t247,
              lv_text             TYPE string.
        METHODS: display_data
                   IMPORTING
                     im_output LIKE gt_output,
                 display_top_of_page.
      PRIVATE SECTION.
        DATA: lv_string TYPE string,
              lv_date1  TYPE c LENGTH 10,
              lv_time   TYPE c LENGTH 10,
              lv_title  TYPE string.
    ENDCLASS.                    "lcl_alv_routines DEFINITION
    *       CLASS lcl_handle_events DEFINITION
    CLASS lcl_handle_events DEFINITION.
      PUBLIC SECTION.
        METHODS:
          on_link_click FOR EVENT link_click OF cl_salv_events_table
            IMPORTING row column.
    ENDCLASS.                    "lcl_handle_events DEFINITION
    */ IMPLEMENTATION/S /*
    *       CLASS lcl_get_data IMPLEMENTATION
    CLASS lcl_get_data IMPLEMENTATION.
    * METHOD get_idocs
      METHOD get_idocs.
        CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
          EXPORTING
    *       PERCENTAGE       = 0
            text             = text-p01.
        SELECT docnum docrel status doctyp
               direct rcvpor rcvprt rcvprn
               rcvsad sndpor sndprt sndprn
               sndsad credat cretim mestyp
               idoctp
          FROM edidc
          INTO TABLE gt_edidc
         WHERE mestyp = lc_mestyp
           AND idoctp = lc_idoctp
           AND credat IN s_credat.
        IF gt_edidc[] IS NOT INITIAL.
    *     Get IDOC details
          CALL METHOD me->read_idocs.
        ENDIF.
      ENDMETHOD.                    "get_idocs
    * METHOD read_idocs
      METHOD read_idocs.
        CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
          EXPORTING
    *       PERCENTAGE       = 0
            text             = text-p02.
        FIELD-SYMBOLS: <fs_edidc>  LIKE LINE OF gt_edidc,
                       <fs_output> LIKE LINE OF gt_output,
                       <fs_ekko>   LIKE LINE OF gt_ekko,
                       <fs_lfa1>   LIKE LINE OF gt_lfa1.
        LOOP AT gt_edidc ASSIGNING <fs_edidc>.
          CLEAR ls_idoc_control.
          REFRESH: lt_edids, lt_edidd.
    *     Get status text of IDOC
          CALL FUNCTION 'IDOC_GET_MESSAGE_ATTRIBUTE'
            EXPORTING
              idoc_number  = <fs_edidc>-docnum
            IMPORTING
              idoc_message = lv_stat_message.
    *     Get IDOC details
          CALL FUNCTION 'IDOC_READ_COMPLETELY'
            EXPORTING
              document_number          = <fs_edidc>-docnum
            IMPORTING
              idoc_control             = ls_idoc_control
              number_of_data_records   = lv_tot_data_recs
              number_of_status_records = lv_tot_status_recs
            TABLES
              int_edids                = lt_edids
              int_edidd                = lt_edidd
            EXCEPTIONS
              document_not_exist       = 1
              document_number_invalid  = 2
              OTHERS                   = 3.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
    *     Pass data to output table
          CALL METHOD me->process_data
            EXPORTING
              im_docnum = <fs_edidc>-docnum.
        ENDLOOP.
        DELETE gt_output WHERE ebeln IS INITIAL.
        IF gt_output[] IS NOT INITIAL.
    *     Get vendor for fetched POs
          SELECT ebeln lifnr
            FROM ekko
            INTO TABLE gt_ekko
             FOR ALL ENTRIES IN gt_output
           WHERE ebeln = gt_output-ebeln.
          IF gt_ekko[] IS NOT INITIAL.
    *       Get name of vendors
            SELECT lifnr name1
              FROM lfa1
              INTO TABLE gt_lfa1
               FOR ALL ENTRIES IN gt_ekko
             WHERE lifnr = gt_ekko-lifnr.
          ENDIF.
    *     Pass vendor details to output table
          LOOP AT gt_output ASSIGNING <fs_output>.
            READ TABLE gt_ekko ASSIGNING <fs_ekko>
                               WITH TABLE KEY ebeln = <fs_output>-ebeln.
            IF sy-subrc = 0.
              READ TABLE gt_lfa1 ASSIGNING <fs_lfa1>
                                 WITH TABLE KEY lifnr = <fs_ekko>-lifnr.
              IF sy-subrc = 0.
                <fs_output>-lifnr = <fs_lfa1>-lifnr.
                <fs_output>-name1 = <fs_lfa1>-name1.
              ENDIF.
            ENDIF.
          ENDLOOP.
          CREATE OBJECT o_lcl_alv_routines.
          CALL METHOD o_lcl_alv_routines->display_data
            EXPORTING
              im_output = gt_output[].
        ENDIF.
      ENDMETHOD.                    "read_idocs
    * METHOD process_data
      METHOD process_data.
        FIELD-SYMBOLS: <fs_edidd> LIKE LINE OF lt_edidd.
        IF lv_stat_message CP 'ok' OR
           lv_stat_message CP 'positive'.
          wa_output-exception = lc_green.
        ELSEIF lv_stat_message CP 'error' OR
               lv_stat_message CP 'negative'.
          wa_output-exception = lc_red.
        ELSE.
          wa_output-exception = lc_yellow.
        ENDIF.
        READ TABLE lt_edidd ASSIGNING <fs_edidd>
                            WITH KEY docnum = im_docnum
                                     segnam = lc_segnam.
        IF sy-subrc = 0.
          wa_output-ebeln = <fs_edidd>-sdata+0(10).
        ENDIF.
        wa_output-credat = ls_idoc_control-credat.
        wa_output-cretim = ls_idoc_control-cretim.
        APPEND wa_output TO gt_output.
        CLEAR wa_output.
      ENDMETHOD.                    "process_data
    ENDCLASS.                    "lcl_get_data IMPLEMENTATION
    *       CLASS lcl_alv_routines IMPLEMENTATION
    CLASS lcl_alv_routines IMPLEMENTATION.
    * METHOD display_data
      METHOD display_data.
        CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
          EXPORTING
            percentage = 0
            text       = text-p03.
        gt_output[] = im_output[].
        TRY.
            cl_salv_table=>factory(
              EXPORTING
                list_display = ''
              IMPORTING
                r_salv_table = lcl_table
              CHANGING
                t_table      = gt_output ).
          CATCH cx_salv_msg.                                "#EC NO_HANDLER
        ENDTRY.
        lcl_functions = lcl_table->get_functions( ).
    *   Set all standard ALV functions
        lcl_functions->set_all( abap_true ).
        lcl_columns = lcl_table->get_columns( ).
        lcl_columns->set_optimize( '' ).
    *   Set display to striped pattern
        lcl_display = lcl_table->get_display_settings( ).
        lcl_display->set_striped_pattern( cl_salv_display_settings=>true ).
    */Sort columns
        TRY.
            lcl_sorts = lcl_table->get_sorts( ).
          CATCH cx_salv_not_found.                          "#EC NO_HANDLER
        ENDTRY.
        lcl_sorts->set_group_active( ).
        TRY.
            lcl_sorts->add_sort(
              columnname = 'EBELN'
              subtotal   = '' ).
          CATCH cx_salv_not_found cx_salv_existing cx_salv_data_error."#EC NO_HANDLER
        ENDTRY.
    */Set column names
        TRY.
            lcl_columns->set_exception_column( 'EXCEPTION' ).
          CATCH cx_salv_data_error.                         "#EC NO_HANDLER
        ENDTRY.
        TRY.
            lcl_column ?= lcl_columns->get_column( 'EXCEPTION' ).
            lcl_column->set_short_text( text-h01 ).
            lcl_column->set_medium_text( text-h01 ).
            lcl_column->set_long_text( text-h01 ).
            lcl_column->set_output_length( '6' ).
          CATCH cx_salv_not_found.                          "#EC NO_HANDLER
        ENDTRY.
        TRY.
            lcl_column ?= lcl_columns->get_column( 'EBELN' ).
            lcl_column->set_short_text( text-h02 ).
            lcl_column->set_medium_text( text-h02 ).
            lcl_column->set_long_text( text-h02 ).
            lcl_column->set_output_length( '9' ).
          CATCH cx_salv_not_found.                          "#EC NO_HANDLER
        ENDTRY.
        TRY.
            lcl_column ?= lcl_columns->get_column( 'LIFNR' ).
    *        lcl_column->set_short_text( text-h03 ).
            lcl_column->set_medium_text( text-h03 ).
            lcl_column->set_long_text( text-h03 ).
            lcl_column->set_output_length( '11' ).
          CATCH cx_salv_not_found.                          "#EC NO_HANDLER
        ENDTRY.
        TRY.
            lcl_column ?= lcl_columns->get_column( 'NAME1' ).
    *        lcl_column->set_short_text( text-h04 ).
    *        lcl_column->set_medium_text( text-h04 ).
            lcl_column->set_long_text( text-h04 ).
            lcl_column->set_output_length( '30' ).
          CATCH cx_salv_not_found.                          "#EC NO_HANDLER
        ENDTRY.
        TRY.
            lcl_column ?= lcl_columns->get_column( 'CREDAT' ).
    *        lcl_column->set_short_text( text-h05 ).
    *        lcl_column->set_medium_text( text-h05 ).
            lcl_column->set_long_text( text-h05 ).
            lcl_column->set_output_length( '13' ).
          CATCH cx_salv_not_found.                          "#EC NO_HANDLER
        ENDTRY.
        TRY.
            lcl_column ?= lcl_columns->get_column( 'CRETIM' ).
    *        lcl_column->set_short_text( text-h06 ).
    *        lcl_column->set_medium_text( text-h06 ).
            lcl_column->set_long_text( text-h06 ).
            lcl_column->set_output_length( '13' ).
          CATCH cx_salv_not_found.                          "#EC NO_HANDLER
        ENDTRY.
    */Set aggregations
    *    TRY.
    *        lcl_aggregations = lcl_table->get_aggregations( ).
    *      CATCH cx_salv_not_found.                          "#EC NO_HANDLER
    *    ENDTRY.
    *    TRY.
    *        lcl_aggregations->add_aggregation( '' ).
    *      CATCH cx_salv_not_found cx_salv_data_error cx_salv_existing."#EC NO_HANDLER
    *    ENDTRY.
    */Hide columns
    *    TRY.
    *        lcl_column ?= lcl_columns->get_column( 'DESCRIPT' ).
    *        lcl_column->set_visible( if_salv_c_bool_sap=>false ).
    *      CATCH cx_salv_not_found.                          "#EC NO_HANDLER
    *    ENDTRY.
    */Display top of page
        CALL METHOD me->display_top_of_page.
        lcl_table->set_top_of_list( lcl_content ).
    */Handle ALV events
        lcl_events2 = lcl_table->get_event( ).
        CREATE OBJECT lcl_handle_events.
        SET HANDLER lcl_handle_events->on_link_click FOR lcl_events2.
        lcl_display_settings = lcl_table->get_display_settings( ).
        lcl_table->display( ).
      ENDMETHOD.                    "display_data
    * METHOD display_top_of_page
      METHOD display_top_of_page.
        CREATE OBJECT lcl_grid.
        lv_title = text-t01.
        lcl_grid->create_header_information(
                    row     = 1
                    column  = 1
                    text    = lv_title
                    tooltip = lv_title ).
        lcl_grid->add_row( ).
        lcl_grid_1 = lcl_grid->create_grid(
                       row    = 3
                       column = 1 ).
        CLEAR lv_string.
        CONCATENATE: sy-datum+4(2) '/' sy-datum+6(2) '/' sy-datum+0(4)
               INTO lv_date1.
        CONCATENATE: text-t02 lv_date1
               INTO lv_string
          SEPARATED BY space.
        lcl_label = lcl_grid_1->create_label(
                      row     = 1
                      column  = 1
                      text    = lv_string
                      tooltip = lv_string ).
        CLEAR lv_string.
        CONCATENATE: sy-uzeit+0(2) ':' sy-uzeit+2(2) ':' sy-uzeit+4(2)
               INTO lv_time.
        CONCATENATE: text-t03 lv_time
               INTO lv_string
          SEPARATED BY space.
        lcl_label = lcl_grid_1->create_label(
                      row     = 2
                      column  = 1
                      text    = lv_string
                      tooltip = lv_string ).
        lcl_content = lcl_grid.
      ENDMETHOD.                    "display_top_of_page
    ENDCLASS.                    "lcl_alv_routines IMPLEMENTATION
    *       CLASS lcl_handle_events IMPLEMENTATION
    CLASS lcl_handle_events IMPLEMENTATION.
    * METHOD on_link_click
      METHOD on_link_click.
      ENDMETHOD.                    "on_link_click
    ENDCLASS.                    "lcl_handle_events IMPLEMENTATION
    * START-OF-SELECTION                           *
    START-OF-SELECTION.
      DATA: o_lcl_get_data TYPE REF TO lcl_get_data.
      CREATE OBJECT o_lcl_get_data.
      CALL METHOD o_lcl_get_data->get_idocs.

  • Custom traffic lighting with Interactive Reporting

    Has anyone written a custom javascript solution for cell-based traffic lighting in Interactive Reports? It does not appear that the object model gives access to cell-level properties in either the pivot or OLAPquery objects although spotlighting can be applied to individual columns and rows.

    Oh yes, understand perfectly what you want, sighing...
    I planned to write another blog post about reporting partial scores, but since Posterous closed down in March, I am not blogging any more, just paying to keep the old posts online on demand of a lot of users. There are several reasons for that, which I will not explain but it is mainly because I feel really exploited.
    Two possiblities:
    Using the mastery widget of InfoSemantics (but limited to SWF-output)
    Using JavaScript
    Lilybiri

  • Traffic Lights in ALV Tree

    Hi Experts ,
    Could you suggest if we can use traffic lights in ALV tree Display and if possible  program(T-code ) you have gone thorugh.
    I already checked BCALV_TREE_06 , its totally different just showing icons .
    Regards,
    Karan
    Edited by: Karan_Chowdary on Dec 24, 2011 7:28 AM

    First in your output table for ALV.. add the light coloum.
    for example:
    DATA: BEGIN OF IMARA OCCURS 0,
    LIGHT(4) TYPE C,
    MATNR TYPE MARA-MATNR,
    MTART TYPE MARA-MTART,
    MAKTX TYPE MAKT-MAKTX,
    COLOR_LINE(4) TYPE C,
    TCOLOR TYPE SLIS_T_SPECIALCOL_ALV, "cell
    END OF IMARA.
    Then in the get data section, you have to put if-else class and upate that column as follows
    WRITE ICON_GREEN_LIGHT AS ICON TO IMARA-LIGHT.
    The use that light column in the catalog section
    Regards,
    Venkat

  • Traffice light  in ALV

    hi experts
    i have itab having a field status and its data ( 'open' , 'complete')
    pls explain the needed steps to be followed for setting the traffic light in ALV.
    open --red light
    complete -- green light.
    pls, explain me the step by step procedure.
    thanks in advance.
    Regards
    Rajaram

    Hi Raja,
    Try this source coode and you can able to do it.
    call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_callback_top_of_page   = 'TOP-OF-PAGE' 
                i_callback_html_end_of_list = 'END_OF_LIST_HTML'
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
                i_save                  = 'X'
           tables
                t_outtab                = it_ekko
           exceptions
                program_error           = 1
                others                  = 2.
    *&      Form  end_of_list_html
          output at the end of the list - not in printed output       *
    FORM end_of_list_html USING end TYPE REF TO cl_dd_document.
      DATA: ls_text TYPE sdydo_text_element,
            l_grid     TYPE REF TO cl_gui_alv_grid,
            f(14) TYPE c VALUE 'SET_ROW_HEIGHT'.
      ls_text = 'Footer title'.
    adds and icon (red triangle)
      CALL METHOD end->add_icon
        EXPORTING
          sap_icon = 'ICON_MESSAGE_ERROR_SMALL'.
    adds test (via variable)
      CALL METHOD end->add_text
        EXPORTING
          text         = ls_text
          sap_emphasis = 'strong'.
    adds new line (start new line)
      CALL METHOD end->new_line.
    display text(bold)
      CALL METHOD end->add_text
        EXPORTING
          text         = 'Bold text'
          sap_emphasis = 'strong'.
    adds new line (start new line)
      CALL METHOD end->new_line.
    display text(normal)
      CALL METHOD end->add_text
        EXPORTING
          text         = 'Normal text'.
    adds new line (start new line)
      CALL METHOD end->new_line.
    display text(bold)
      CALL METHOD end->add_text
        EXPORTING
          text         = 'Yellow triangle'
          sap_emphasis = 'strong'.
    adds and icon (yellow triangle)
      CALL METHOD end->add_icon
        EXPORTING
          sap_icon = 'ICON_LED_YELLOW'.
    display text(normal)
      CALL METHOD end->add_text
        EXPORTING
          text         = 'More text'.
    *set height of this section
      CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
        IMPORTING
          e_grid = l_grid.
      CALL METHOD l_grid->parent->parent->(f)
        EXPORTING
          id     = 3
          height = 14.
    ENDFORM. "end_of_list_html.
    Regards,
    Ameer Baba.

  • How can we place a push button in ALV  report

    hi
    could anybody inform me
    how can we place a push button in ALV  report
    thanx
    regards
    kals.

    Hi kals.
    please have a look at demoprogram
    SALV_DEMO_TABLE_FUNCTIONS
    BCALV_GRID_05
    Regards
    Bernd

Maybe you are looking for

  • Error message with Vista and 7.2: Windows-No Disk Exception Processing Mess

    I just got a new Dell computer with Windows Vista and I am trying to put iTunes on it. I can install it fine from the original CD, and then I am prompted to update it to 7.2. After updating, this is the message that I get: Windows-No Disk, Exception

  • App store in iphone looks stretched

    i have an iphone 4 and ipad 3rd gen. Sometimes when i use the app store. The app store in iphone looks like an ipad version ( stretched like ipads) . Bigger icons and need to pan to see the apps. The app store in iPad looks like a iphone version . sm

  • Error in SFTP  File Adapter

    Hi, The file is not picking from the source by SFTP Adapter. I cant see MsgID in the RWB at communication channel monitoring. If I see Logs, I cant find any error Info. Is there any area to find out the problem in XI about this SFTP adapter.. The ada

  • Quicktime Pro VS Sorenson Squeeze which is better for uploading to YouTube?

    I'm thinking of buying Quicktime Pro or Sorenson Squeeze - which is better for uploading to YouTube? Which would give my video better quality? Also, with regard to Sorenson Squeeze: The website says these are its requirements - could someone explain

  • Why do some keyboard shortcuts just stop working?

    Since upgrading to Lion, some of my keyboard shortcuts - especially one for Mail - just stops working now and then and the only thing I can figure out to fix it is to restart the macbook. The main one I've had trouble with is ⌘+ enter to send a messa