Creating push button on ALV application toolbar

Hi Abapers,
I have created one ALV in HR module using function module 'display_basic_list'. now my requirement is to create a push button on ALV application tool bar so that when user clicks on this push button another list has to appear..
kindly gimme valid inputs which would help me.. Also provide me sample code...
Thanks in Advance,
Radhika.

Hi,
GO to SE41 copy the status STANDARD from the program SAPLKKBL..And give the status name and your program name...
Add your buttons..
In the parameter I_CALLBACK_PF_STATUS_SET give the form name 'PF_STATUS_SET'.
In the subroutine.
FORM PF_STATUS_SET.
SET PF-STATUS 'STATUS NAME THAT YOU GAVE IN SE41'.
ENDFORM.
For user command pass the parameter I_CALLBACK_USER_COMMAND with the user command subroutine name..
FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
IF R_UCOMM = ''.
ENDIF.
ENDFORM.
Example
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = lv_repid
I_CALLBACK_PF_STATUS_SET = 'PF_STATUS_SET'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
Thanks,
Naren

Similar Messages

  • Creating a push button in the application toolbar-----vvvv urgent...

    Hi,
    I have already created in the program.
    The addl. requirement is to create a pushbutton after displaying the output .
    Can anybody tell the procedure on how to create a pushbutton in the application toolbar.
    Plz send the relevant code also to download the output in to the excel sheet.
    Regards,
    Sree
    Edited by: sree on Feb 18, 2008 10:09 AM
    Edited by: sree on Feb 18, 2008 10:13 AM

    Sree,
      If you are using ALV report:
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
             EXPORTING
                  i_callback_program       = ws_repid
                  i_callback_pf_status_set = 'GUI_STAT1'
                  i_callback_user_command  = 'STAT'
                  is_layout                = gs_layout
                  it_fieldcat              = i_fieldcat[]
                  it_sort                  = wa_sort1
             TABLES
                  t_outtab                 = i_zaw_pol_plan.
    *--Setting Status of output screen
    FORM gui_stat1 USING rt_extab TYPE slis_t_extab.
    SET PF-STATUS 'STANDARD1' EXCLUDING rt_extab.
      SET TITLEBAR text-005.
    ENDFORM.
    Double click on status 'STANDARD1'.
    Expand the Application toolbar-->press ctrl+f1 for change mode -
    >add your  buutton name --> double click on name add text name button icon  --> save it.
    In classiccal report also Add set pf status
    same like above

  • Displaying a Push button in the application toolbar for an ALV report

    Hello everyone,
    Query:
    Is it possible to display a custom push button in the application tool bar while displaying an ALV report(1st one)?
    On pressing this custom push button will I be able to display another ALV report(2nd one) based on the selection made on the current ALV report(1st one)?

    Yes u can have pushbutton on application toolbar.
    You just have to use the new pf status in your report program.
    You should copy the 'STANDARD' GUI status from program SAPLKKBL using transaction SE90 >Programming SubObjects> Gui Status.
    Execute this transaction to get to next screen. select status using checkbox. click on GUI Status --> Copy.
    Enter your Z program name and the name you what for this status - you can keep it as 'STANDARD' to be simple.
    Then you can edit the new status to add or delete buttons. This will also bring in the standard SAP ALV functionality.
    Have a look at below code for using the new status.
    TYPE-POOLS: slis.
    DATA: i_qmel LIKE qmel OCCURS 0.
    data v_repid type repid.
    SELECT * FROM qmel INTO TABLE i_qmel.
    v_repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = v_repid
    I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
    I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
    i_structure_name = 'QMEL'
    TABLES
    t_outtab = i_qmel
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    form set_pf_status using rt_extab type slis_t_extab.
    set pf-status 'TEST'.
    endform.
    FORM user_command USING ucomm LIKE sy-ucomm
    selfield TYPE slis_selfield.
    data lv_ucomm type sy-ucomm.
    lv_ucomm
    = sy-ucomm.
    CASE lv_ucomm.
    WHEN 'BUTTON'. "Double Click line Item
    **Write ur functinality here
    endcase.
    endform.
    Also have a look at below links.
    http://www.sap-basis-abap.com/abap/add-button-to-alv-toolbar-with-reuse-alv-list-display.htm
    ALV report
    Best Regards,
    Vibha
    *Please mark all the helpful answers

  • Buttons on  ALV Application Toolbar

    Hi,
    I have added buttons on the Application Toolbar of the ALV (in the GUI status).
    There are a lot of buttons and due to lack of space some of the buttons go out of the screen.
    Need to know if there is a way to make these buttons scrolable or in a dorp down.
    Thanks for the help.
    Karen

    Hi Karen,
    I also faced the same issue but solved it using alternative solution.
    1) Go to PF-STATUS and create a MENU BAR.
    2) Give Appropriate NAME and inside it  write FUNCTION CODE given for buttons under "Code"
    3) Appropriate description under "Text"
    4) Save and activate.
    Now,  execute the report and even if the buttons are going out of screen, you have option to select the button from MENU BAR.
    This is the best solution for this problem as far as i know.
    Also, if you re-size your window ; the you will get tabs with drop down.
    I hope this will help you in solving your issue.
    Regards,
    Rahul Mahajan

  • Display of push button in the application tool bar in an ALV report

    Hello everyone,
    Query:
    Is it possible to display a custom push button in the application tool bar while displaying an ALV report(1st one)?
    On pressing this custom push button will I be able to display another ALV report(2nd one) based on the selection made on the current ALV report(1st one)?

    Hiii..
    I have written a sample code for You
    <b>"Call the below FunctionModule For Displaying The List
    " And see the bolded line in the Below FunctionModule
    " STANDARD_02 and USER_COMMAND are the subroutine Names</b>
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
       i_callback_program             = sy-repid
       <b>i_callback_pf_status_set       = 'STANDARD_02'</b>
      <b> i_callback_user_command       = 'USER_COMMAND '</b>
       i_structure_name               =  'ZST_SCARR'
       is_layout                      = is_layout
       it_fieldcat                    = gt_fieldcat[]
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      is_sel_hide                    = is_sel_hide
      I_DEFAULT                      = 'X'
      I_SAVE                         = ' '
      IS_VARIANT                     =
       it_events                      = e03_lt_events[]
      IT_EVENT_EXIT                  =
      is_print                       = t
      IS_REPREP_ID                   =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
      IR_SALV_LIST_ADAPTER           =
      IT_EXCEPT_QINFO                =
      I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
      TABLES
        t_outtab                       = it_scarr
    EXCEPTIONS
       program_error                  = 1
       OTHERS                         = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
       FORM PF_STATUS_SET
    <b>" Here Set A Button In Application Toolbar Using PF- Status</b>
    FORM standard_02 USING  extab TYPE slis_t_extab.
      SET PF-STATUS 'STANDA02' EXCLUDING extab.
    ENDFORM.                    "STANDARD_02
    *&      Form  USER_COMMAND
          text
         -->R_UCOMM    text
         -->RS_SELFIELDtext
    FORM user_command USING r_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
    <b> "menubutton with functioncode GOTO's Action</b>
        WHEN  'GOTO'.  
          READ TABLE it_scarr INDEX rs_selfield-tabindex. "cursorposit.
          IF sy-subrc = 0.
            WRITE:/ it_scarr-carrid,
                  /  it_scarr-carrname.
          ENDCASE.
    ENDFORM.                    "USER_COMMAND<b></b>
    Hope it helps..
    Regards,
    Simy

  • Push Button on Alv Grid display

    Hi experts,
       I strcuk in the middle of one program, i need to have push buttons on the output ALV Grid display, i have copied the standard status and used the same in the Function module for pf-status, iam able to get the output
    but my requirement is how to add the push buttons to the out put screen, as when iam clicking on status which i have copied iam unable to find where to add these push button in the application tool bar, iam unable to edit the push button can any body help me out, thanks in advance.

    Hello Madan
    I cannot help you with the FM-based ALV lists. However, for OO-based ALV grids (CL_GUI_ALV_GRID) I have a sample program that simulates radio buttons by using icons with hotspots.
    PROGRAM ZUS_SDN_BCALV_GRID_DEMO_2.
    * Based on: BCALV_GRID_DEMO.
    TYPE-POOLS: icon.
    TYPES: BEGIN OF ty_s_sflight.
    INCLUDE TYPE sflight.
    TYPES: button1    TYPE lvc_emphsz.
    TYPES: button2    TYPE lvc_emphsz.
    TYPES: button3    TYPE lvc_emphsz.
    TYPES: button4    TYPE lvc_emphsz.
    TYPES: END OF ty_s_sflight.
    DATA:
      gt_sflight    TYPE STANDARD TABLE OF ty_s_sflight,
      gt_fcat       TYPE lvc_t_fcat.
    DATA: ok_code LIKE sy-ucomm,
    *      gt_sflight TYPE TABLE OF sflight,
          g_container TYPE scrfname VALUE 'BCALV_GRID_DEMO_0100_CONT1',
          grid1  TYPE REF TO cl_gui_alv_grid,
          g_custom_container TYPE REF TO cl_gui_custom_container.
    *       CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
      PUBLIC SECTION.
        CLASS-DATA:
          md_cnt    TYPE i.
        CLASS-METHODS:
          handle_hotspot_click FOR EVENT hotspot_click OF cl_gui_alv_grid
            IMPORTING
              e_row_id
              e_column_id
              es_row_no
              sender.
    ENDCLASS.                    "lcl_eventhandler DEFINITION
    *       CLASS lcl_eventhandler IMPLEMENTATION
    CLASS lcl_eventhandler IMPLEMENTATION.
      METHOD handle_hotspot_click.
    * define local data
        FIELD-SYMBOLS:
          <ls_entry>    TYPE ty_s_sflight,
          <ld_fld>      TYPE ANY.
        READ TABLE gt_sflight ASSIGNING <ls_entry> INDEX es_row_no-row_id.
        CHECK ( <ls_entry> IS ASSIGNED ).
    *   Set all radio buttons "unselected"
        <ls_entry>-button1 =  icon_wd_radio_button_empty.
        <ls_entry>-button2 =  icon_wd_radio_button_empty.
        <ls_entry>-button3 =  icon_wd_radio_button_empty.
        <ls_entry>-button4 =  icon_wd_radio_button_empty.
        ASSIGN COMPONENT e_column_id-fieldname OF STRUCTURE <ls_entry>
                                                  TO <ld_fld>.
        IF ( <ld_fld> IS ASSIGNED ).
    *     Set selected radio button "selected".
          <ld_fld> = icon_wd_radio_button.
        ENDIF.
    *   Force PAI followed by refresh of table display in PBO
        CALL METHOD cl_gui_cfw=>set_new_ok_code
          EXPORTING
            new_code = 'DUMMY'
    *      IMPORTING
    *        RC       =
      ENDMETHOD.                    "handle_hotspot_click
    ENDCLASS.                    "lcl_eventhandler IMPLEMENTATION
    START-OF-SELECTION.
    *       MAIN                                                          *
      PERFORM select_data.
      CALL SCREEN 100.
    *       MODULE PBO OUTPUT                                             *
    MODULE pbo OUTPUT.
      SET PF-STATUS 'MAIN100'.
      IF g_custom_container IS INITIAL.
        CREATE OBJECT g_custom_container
               EXPORTING container_name = g_container.
        CREATE OBJECT grid1
               EXPORTING i_parent = g_custom_container.
        PERFORM build_fieldcatalog.
        CALL METHOD grid1->set_table_for_first_display
    *      EXPORTING
    *        i_structure_name = 'SFLIGHT'
          CHANGING
            it_fieldcatalog  = gt_fcat
            it_outtab        = gt_sflight.
    *   Set event handler for event TOOLBAR
        SET HANDLER:
          lcl_eventhandler=>handle_hotspot_click FOR grid1.
      else.
        CALL METHOD grid1->refresh_table_display
    *      EXPORTING
    *        IS_STABLE      =
    *        I_SOFT_REFRESH =
          EXCEPTIONS
            FINISHED       = 1
            others         = 2.
        IF sy-subrc <> 0.
    *     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
    ENDMODULE.                    "PBO OUTPUT
    *       MODULE PAI INPUT                                              *
    MODULE pai INPUT.
    *   to react on oi_custom_events:
      CALL METHOD cl_gui_cfw=>dispatch.
      CASE ok_code.
        WHEN 'EXIT'.
          PERFORM exit_program.
        WHEN OTHERS.
    *     do nothing
      ENDCASE.
      CLEAR ok_code.
    ENDMODULE.                    "PAI INPUT
    *       FORM EXIT_PROGRAM                                             *
    FORM exit_program.
    *  CALL METHOD G_CUSTOM_CONTAINER->FREE.
    *  CALL METHOD CL_GUI_CFW=>FLUSH.
      LEAVE PROGRAM.
    ENDFORM.                    "EXIT_PROGRAM
    *&      Form  BUILD_FIELDCATALOG
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM build_fieldcatalog .
    * define local data
      DATA:
        ls_fcat        TYPE lvc_s_fcat,
        ls_hype        TYPE lvc_s_hype.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
    *     I_BUFFER_ACTIVE              =
          i_structure_name             = 'LVC_S_FCAT'
    *     I_CLIENT_NEVER_DISPLAY       = 'X'
    *     I_BYPASSING_BUFFER           =
    *     I_INTERNAL_TABNAME           =
        CHANGING
          ct_fieldcat                  = gt_fcat
        EXCEPTIONS
          inconsistent_interface       = 1
          program_error                = 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.
      DELETE gt_fcat WHERE ( fieldname <> 'EMPHASIZE' ).
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
    *     I_BUFFER_ACTIVE              =
          i_structure_name             = 'SFLIGHT'
    *     I_CLIENT_NEVER_DISPLAY       = 'X'
    *     I_BYPASSING_BUFFER           =
    *     I_INTERNAL_TABNAME           =
        CHANGING
          ct_fieldcat                  = gt_fcat
        EXCEPTIONS
          inconsistent_interface       = 1
          program_error                = 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.
      READ TABLE gt_fcat INTO ls_fcat
           WITH KEY fieldname = 'EMPHASIZE'.
      IF ( syst-subrc = 0 ).
        DELETE gt_fcat INDEX syst-tabix.
      ENDIF.
      ls_fcat-fieldname = 'BUTTON4'.
      ls_fcat-icon    = 'X'.
      ls_fcat-hotspot = 'X'.
      INSERT ls_fcat INTO gt_fcat INDEX 4.
      ls_fcat-fieldname = 'BUTTON3'.
      INSERT ls_fcat INTO gt_fcat INDEX 4.
      ls_fcat-fieldname = 'BUTTON2'.
      INSERT ls_fcat INTO gt_fcat INDEX 4.
      ls_fcat-fieldname = 'BUTTON1'.
      INSERT ls_fcat INTO gt_fcat INDEX 4.
      LOOP AT gt_fcat INTO ls_fcat.
        ls_fcat-col_pos = syst-tabix.
        MODIFY gt_fcat FROM ls_fcat INDEX syst-tabix.
      ENDLOOP.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  SELECT_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM select_data .
    * define local data
      DATA:
        ls_sflight    TYPE ty_s_sflight.
      SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE gt_sflight.
      ls_sflight-button1 = icon_wd_radio_button.
      ls_sflight-button2 = icon_wd_radio_button_empty.
      ls_sflight-button3 = icon_wd_radio_button_empty.
      ls_sflight-button4 = icon_wd_radio_button_empty.
      MODIFY gt_sflight FROM ls_sflight
          TRANSPORTING button1 button2 button3 button4
        WHERE ( carrid IS NOT INITIAL ).
    ENDFORM.                    " SELECT_DATA
    Regards
    Uwe

  • How to give  push button in alv report  output

    hi,
    my requirement is that , i have to give push button in alv report output(item level) not in application toolbar, i am using reuse_alv_grid_display FM, can any body provide me sample code
    regards,
    siva kumar

    have a look at this thread, also has a sample report at the end from Uwe Schieferstein.
    [button on alv list|How to add and program a pushbutton on ALV grid line;
    seems not to work try this:
    How to add and program a pushbutton on ALV grid line
    Edited by: Micky Oestreich on May 15, 2008 10:20 PM

  • PUSH-BUTTON in ALV GRID

    How can we create a push-button in ALV-GRID.
    How will u handle a push-button in ALV.

    Hello,
    To add a push button and handle it,you have to define a local class and use the methods <b>handle_toolbar</b> and <b>handle_user_command</b>.Here is a sample code:
          CLASS lcl_eh DEFINITION
    CLASS lcl_eh DEFINITION.
      PUBLIC SECTION.
        DATA:
             <b>ls_toolbar  TYPE stb_button</b>.
        METHODS:
                <b>handle_toolbar</b>
                    FOR EVENT toolbar OF cl_gui_alv_grid
                        IMPORTING e_object e_interactive,
                <b>handle_user_command</b>
                    FOR EVENT user_command OF cl_gui_alv_grid
                        IMPORTING e_ucomm.
    ENDCLASS.                    "lcl_eh DEFINITION
    *Type referencing an object of the class
    <b>DATA: lo_obj TYPE REF TO lcl_eh.</b>
          CLASS lcl_eh IMPLEMENTATION
    CLASS lcl_eh IMPLEMENTATION.
    *METHOD:      HANDLE_TOOLBAR
    *DESCRIPTION: This method provides the necessary detail required to
                 create an extra button in the toolbar.
      METHOD <b>handle_toolbar.</b>
        CLEAR ls_toolbar.
        MOVE 'CREATE' TO ls_toolbar-function.
        MOVE 0 TO ls_toolbar-butn_type.
        MOVE 'CREATE' TO ls_toolbar-text.
        MOVE 'ICON_DETAIL' TO ls_toolbar-icon.
        MOVE 'CREATE' TO ls_toolbar-quickinfo.
        <b>APPEND ls_toolbar TO e_object->mt_toolbar.</b>
      ENDMETHOD.                    "handle_toolbar
    *METHOD:      HANDLE_USER_COMMAND
    *DESCRIPTION: This method is used to handle the push button
      <b>METHOD handle_user_command.</b>
    <b>    CASE e_ucomm.</b>
    <b>      WHEN 'CREATE'.</b>
    **logic
            ENDCASE.
    ENDMETHOD.
    ENDCLASS.
    Regards,
    Beejal
    **reward if this helps

  • Is it possible to deactivate a button on the application toolbar?

    Hello everybody!
    Is it possible to deactivate a button on the application toolbar from standard transaction like PA40?
    I'd want to do it using an user-exit.
    Thanks in advance.
    Cristian

    there is a push button on the std tool bar of pf-status 'Function code'.using that u can activate and deactivate teh function codes
    or
    Check this FM : RS_SET_SELSCREEN_STATUS
    sample code :
    DATA: BEGIN OF i_exc OCCURS 0,
    code LIKE sy-ucomm,
    END OF i_exc.
    DATA: ws_repid like sy-repid.
    CLEAR i_exc.
    i_exc-code = 'ONLI'.
    APPEND i_exc.
    MOVE: sy-repid TO ws_repid .
    CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
    EXPORTING
    p_status = ' '
    p_program = ws_repid
    TABLES
    p_exclude = i_exc.

  • Add Button with ALV  Standard Toolbar.

    Hi,
    Can any one tell me how to add user-defined button with ALV
    Standard toolbar? When I add Pf-status for alv output , standard alv toolbar is not displayed.
    Plz do needful.

    On the toolbar event of your alv grid, all the button as shown in the code below.
    FORM handle_toolbar USING i_object TYPE REF TO cl_alv_event_toolbar_set .
    DATA: ls_toolbar TYPE stb_button.
    CLEAR ls_toolbar.
    MOVE 'EXCH' TO ls_toolbar-function. "#EC NOTEXT
    MOVE 2 TO ls_toolbar-butn_type.
    MOVE icon_calculation TO ls_toolbar-icon.
    MOVE 'Payment in Other Currencies'(202) TO ls_toolbar-quickinfo.
    MOVE ' ' TO ls_toolbar-text.
    MOVE ' ' TO ls_toolbar-disabled. "#EC NOTEXT
    APPEND ls_toolbar TO i_object->mt_toolbar.
    ENDFORM
    CLASS lcl_event_handler DEFINITION .
    PUBLIC SECTION .
    METHODS:
    *To add new functional buttons to the ALV toolbar
    handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
    IMPORTING e_object e_interactive ,
    ENDCLASS.
    CLASS lcl_event_handler IMPLEMENTATION .
    *Handle Toolbar
    METHOD handle_toolbar.
    PERFORM handle_toolbar USING e_object e_interactive .
    ENDMETHOD .
    ENDCLASS.
    DATA gr_event_handler TYPE REF TO lcl_event_handler .
    *--Creating an instance for the event handler
    CREATE OBJECT gr_event_handler .
    *--Registering handler methods to handle ALV Grid events
    SET HANDLER gr_event_handler->handle_toolbar FOR gr_alvgrid .
    Hope this helps.
    Thanks,
    Balaji

  • How to enable print button appear on 'application toolbar'

    hi guys,
    may i know to enable print button appear on 'application toolbar' by using CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'?
    thanks.

    Hi,
    Create a PF status in SE41 with all the status which you required.
    Like save, exit, cancel and print.
    Then you include this staus in  the importing parameter
    ( I_CALLBACK_PF_STATUS_SET ) of Function module REUSE_ALV_GRID_DISPLAY.
    If you doesnt give any status also, by default you can seen the print option in status.
    Try with this and let me know

  • Push button in alv report

    Dear Experts,
             How to add pushbutton in alv report.....
    *& Report  ZTT_TEST_ALV
    REPORT  ZTT_TEST_ALV.
    *data declarations
    type-pools : SLIS.
    *  data : BEGIN OF wa_kna1,
    *                kunnr type kunnr,
    *                name1 type name1,
    *         end of wa_kna1,
    * it_kna1 like tABLE OF wa_kna1.
    data : begin of wa_mara,
      matnr type matnr,
      end of wa_mara,
      it_mara like table of wa_mara.
      data : it_fcat type slis_t_fieldcat_alv,
             wa_fcat like line of it_fcat.
    *selection screen
      SELECTION-SCREEN begin of block k with frame title text-001.
    *  select-OPTIONS : s_kunnr for wa_kna1-kunnr.
         select-OPTIONS : s_matnr for wa_mara-matnr.
      SELECTION-SCREEN end of block k.
    *select auery
    *SELECT kunnr name1 INTO table it_kna1 from kna1 where kunnr in s_kunnr.
    select matnr into table it_mara from mara where matnr in s_matnr.
    *for displaying fieldcatalog
      PERFORM fcat using '1' 'MATNR' 'material Number' 'C410' '20'.
    *  PERFORM fcat using '2' 'NAME1' 'Customer Name' 'C410' '36'.
    *for displaying output
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    *   I_INTERFACE_CHECK                 = ' '
    *   I_BYPASSING_BUFFER                = ' '
    *   I_BUFFER_ACTIVE                   = ' '
    *   I_CALLBACK_PROGRAM                = ' '
       I_CALLBACK_PF_STATUS_SET          = 'SET_PF_STATUS'
    *   I_CALLBACK_USER_COMMAND           = ' '
    *   I_CALLBACK_TOP_OF_PAGE            = ' '
    *   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *   I_CALLBACK_HTML_END_OF_LIST       = ' '
    *   I_STRUCTURE_NAME                  =
    *   I_BACKGROUND_ID                   = ' '
       I_GRID_TITLE                      = 'Report for Customer Details'
    *   I_GRID_SETTINGS                   =
    *   IS_LAYOUT                         =
       IT_FIELDCAT                       = it_fcat[]
    *   IT_EXCLUDING                      =
    *   IT_SPECIAL_GROUPS                 =
    *   IT_SORT                           =
    *   IT_FILTER                         =
    *   IS_SEL_HIDE                       =
    *   I_DEFAULT                         = 'X'
    *   I_SAVE                            = ' '
    *   IS_VARIANT                        =
    *   IT_EVENTS                         =
    *   IT_EVENT_EXIT                     =
    *   IS_PRINT                          =
    *   IS_REPREP_ID                      =
    *   I_SCREEN_START_COLUMN             = 0
    *   I_SCREEN_START_LINE               = 0
    *   I_SCREEN_END_COLUMN               = 0
    *   I_SCREEN_END_LINE                 = 0
    *   I_HTML_HEIGHT_TOP                 = 0
    *   I_HTML_HEIGHT_END                 = 0
    *   IT_ALV_GRAPHICS                   =
    *   IT_HYPERLINK                      =
    *   IT_ADD_FIELDCAT                   =
    *   IT_EXCEPT_QINFO                   =
    *   IR_SALV_FULLSCREEN_ADAPTER        =
    * IMPORTING
    *   E_EXIT_CAUSED_BY_CALLER           =
    *   ES_EXIT_CAUSED_BY_USER            =
      TABLES
        t_outtab                          = it_mara.
    * EXCEPTIONS
    *   PROGRAM_ERROR                     = 1
    *   OTHERS                            = 2
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    *CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
    *  EXPORTING
    ****   I_INTERFACE_CHECK              = ' '
    ****   I_CALLBACK_PROGRAM             =
    ****   I_CALLBACK_PF_STATUS_SET       = ' '
    ****   I_CALLBACK_USER_COMMAND        = ' '
    ****   IS_LAYOUT                      =
    *   IT_FIELDCAT                    = it_fcat
    ****   IT_EXCLUDING                   =
    ****   IT_SPECIAL_GROUPS              =
    ****   IT_SORT                        =
    ****   IT_FILTER                      =
    ****   IS_SEL_HIDE                    =
    ****   I_SCREEN_START_COLUMN          = 0
    ****   I_SCREEN_START_LINE            = 0
    ****   I_SCREEN_END_COLUMN            = 0
    ****   I_SCREEN_END_LINE              = 0
    ****   I_DEFAULT                      = 'X'
    ****   I_SAVE                         = ' '
    ****   IS_VARIANT                     =
    ****   IT_EVENTS                      =
    ****   IT_EVENT_EXIT                  =
    ***    i_tabname_header               =
    ***    i_tabname_item                 =
    ****   I_STRUCTURE_NAME_HEADER        =
    ****   I_STRUCTURE_NAME_ITEM          =
    ***    is_keyinfo                     =
    ****   IS_PRINT                       =
    ****   IS_REPREP_ID                   =
    ****   I_BYPASSING_BUFFER             =
    ****   I_BUFFER_ACTIVE                =
    ****   IR_SALV_HIERSEQ_ADAPTER        =
    ****   IT_EXCEPT_QINFO                =
    ****   I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
    **** IMPORTING
    ****   E_EXIT_CAUSED_BY_CALLER        =
    ****   ES_EXIT_CAUSED_BY_USER         =
    *  tables
    **    t_outtab_header                = it_
    *    t_outtab_item                  = it_kna1.
    **** EXCEPTIONS
    ****   PROGRAM_ERROR                  = 1
    ****   OTHERS                         = 2
    ***IF sy-subrc <> 0.
    **** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    ****         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ***ENDIF.
    *&      Form  FCAT
    *       text
    *      -->P_0052   text
    *      -->P_0053   text
    *      -->P_0054   text
    form FCAT  using    fp_col_pos
                        fp_fieldname
                        fp_seltext_m
                        fp_emphasize
                        fp_outputlen..
    wa_fcat-col_pos = fp_col_pos.
    wa_fcat-fieldname = fp_fieldname.
    wa_fcat-seltext_m = fp_seltext_m.
    wa_fcat-emphasize = fp_emphasize.
    wa_fcat-outputlen = fp_outputlen.
    append wa_fcat to it_fcat.
    clear : wa_fcat.
    endform.                    " FCAT
    FORM SET_PF_STATUS                                         .
    SET PF-STATUS 'ZNEWSTATUS' .
    "Copy of 'STANDARD' pf_status from fgroup SALV
    endform.
    i need one push button in alv output display.
    Thanks and Regards,
    Thirukumaran. R

    HI THIRU TRY FOLLOWING CODES:
    *& Report  ZSAMPLE
    REPORT  ZSAMPLE.
    TABLES:MARA.
    TYPE-POOLS: SLIS.
    TYPES:BEGIN OF TY_ITAB,
          MATNR LIKE MARA-MATNR,
          ERSDA LIKE MARA-ERSDA,
          END OF TY_ITAB.
    DATA:ITAB TYPE STANDARD TABLE OF TY_ITAB WITH HEADER LINE.
    DATA:FCAT TYPE SLIS_T_FIELDCAT_ALV,
              WA_FCAT TYPE SLIS_FIELDCAT_ALV,
              LAYOUT TYPE SLIS_LAYOUT_ALV,
              WA_LAYOUT TYPE SLIS_LAYOUT_ALV.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS:P_MATNR TYPE MARA-MATNR.
    SELECTION-SCREEN END OF BLOCK B1.
    START-OF-SELECTION.
      PERFORM FIELDCAT.
      LAYOUT-ZEBRA = 'X'.
      PERFORM OUTPUT.
    *&      Form  PF_STATUS
          text
         -->RT_EXTAB   text
    FORM PF_STATUS USING RT_EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'BUTT'.
    ENDFORM.                    "PF_STATUS
    *&      Form  PUSH_BUTT1
          text
         -->R_UCOMM      text
         -->RS_SELFIELD  text
    FORM GET USING R_UCOMM LIKE SY-UCOMM RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN 'GET'.
          IF SY-SUBRC EQ 0.
            CALL TRANSACTION 'SE11'.
          ELSE.
          ENDIF.
        WHEN 'EXIT' OR 'CANCEL' .
          LEAVE PROGRAM.
      ENDCASE.
    ENDFORM.                                                    "PUSH_BUTT1
    *&      Form  FIELDCAT
          text
    -->  p1        text
    <--  p2        text
    FORM FIELDCAT .
      WA_FCAT-SELTEXT_L = 'Select'.
      WA_FCAT-COL_POS = '1'.
      WA_FCAT-FIELDNAME = 'CHECK'.
      WA_FCAT-CHECKBOX = 'X'.
      WA_FCAT-TABNAME = 'ITAB'.
      WA_FCAT-OUTPUTLEN =  '4'.
      WA_FCAT-INPUT(1) = 'X'.
    WA_FCAT-EDIT_MASK(1) = 'X'.
      WA_FCAT-EDIT(1) = 'X'.
      APPEND WA_FCAT TO FCAT.
      CLEAR WA_FCAT.
      WA_FCAT-SELTEXT_L = 'Material Number'.
      WA_FCAT-COL_POS = '2'.
      WA_FCAT-FIELDNAME = 'MATNR'.
      WA_FCAT-TABNAME = 'ITAB'.
      WA_FCAT-OUTPUTLEN =  '18'.
      APPEND WA_FCAT TO FCAT.
      CLEAR WA_FCAT.
      WA_FCAT-SELTEXT_L = 'Date'.
      WA_FCAT-COL_POS = '3'.
      WA_FCAT-FIELDNAME = 'ERSDA'.
      WA_FCAT-TABNAME = 'ITAB'.
      WA_FCAT-OUTPUTLEN =  '8'.
      APPEND WA_FCAT TO FCAT.
      CLEAR WA_FCAT.
    ENDFORM.                    " FIELDCAT
    *&      Form  OUTPUT
          text
    -->  p1        text
    <--  p2        text
    FORM OUTPUT .
      SELECT MATNR ERSDA FROM MARA
        INTO TABLE ITAB
        WHERE MATNR EQ  P_MATNR.
      IF SY-SUBRC EQ 0.
        PERFORM GRID.
      ELSE.
        MESSAGE 'No Records Found' TYPE 'I'.
      ENDIF.
    ENDFORM.                    " OUTPUT
    *&      Form  GRID
          text
    -->  p1        text
    <--  p2        text
    FORM GRID .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
       I_CALLBACK_PROGRAM              = SY-REPID
       I_CALLBACK_PF_STATUS_SET        = 'PF_STATUS'
       I_CALLBACK_USER_COMMAND         = 'GET'
       IS_LAYOUT                         = LAYOUT
         IT_FIELDCAT                     = FCAT
       I_DEFAULT                         = 'X'
        TABLES
          T_OUTTAB                          = ITAB.
    ENDFORM.                    " GRID
    REGARDS,
    SAKTHIVEL.VT

  • 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

  • 'Create' Push button is not working in BDC and LSMW while uploading G/L master data

    Hello Experts:
    I am facing the following problem:
    While uploading G/L master data with the BDC program, 'create' push button is not working  even after executing following lines.
    PERFORM BDC_DYNPRO      USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                   '=ACC_CRE'.
    Create G/L account  screen is not coming in BDC. Please suggest me what to do.
    Thanks !!

    Re: 'Create' Push button is not working in BDC and LSMW while uploading G/L master data
    Re: 'Create' Push button is not working in BDC and LSMW while uploading G/L master data
    Hi Glen Anthony
    Thank you for the reply Glen Anthony please take a look at the following code.
    REPORT  ZFI_BDC_FS00
            NO STANDARD PAGE HEADING LINE-SIZE 255.
    *INCLUDE BDCRECX1.
    TYPES : BEGIN OF STR,
       BUKRS TYPE GLACCOUNT_SCREEN_KEY-BUKRS,        "Company Code
       SAKNR TYPE GLACCOUNT_SCREEN_KEY-SAKNR,        "G/L Account Number
       KTOKS TYPE GLACCOUNT_SCREEN_COA-KTOKS,        "G/L Account Group
       XPLACCT TYPE GLACCOUNT_SCREEN_COA-XPLACCT,    "P&L statement account
       XBILK TYPE GLACCOUNT_SCREEN_COA-XBILK,        "Indicator: Account is a balance sheet account?
       TXT20_ML TYPE GLACCOUNT_SCREEN_COA-TXT20_ML,  "G/L account short text
       TXT50_ML TYPE GLACCOUNT_SCREEN_COA-TXT50_ML,  "G/L account short text
       WAERS TYPE GLACCOUNT_SCREEN_CCODE-WAERS,      "Account currency
       XSALH TYPE GLACCOUNT_SCREEN_CCODE-XSALH,      "Indicator: Only Manage Balances in Local Currency
       MWSKZ TYPE GLACCOUNT_SCREEN_CCODE-MWSKZ,      "Tax Category in Account Master Record
       XMWNO TYPE GLACCOUNT_SCREEN_CCODE-XMWNO,      "Indicator: Tax code is not a required field
       MITKZ TYPE GLACCOUNT_SCREEN_CCODE-MITKZ,      "Account is reconciliation account
       XOPVW TYPE GLACCOUNT_SCREEN_CCODE-XOPVW,      "Indicator: Open item management?
       XKRES TYPE GLACCOUNT_SCREEN_CCODE-XKRES,      "Indicator: Can Line Items Be Displayed by Account?
       ZUAWA TYPE GLACCOUNT_SCREEN_CCODE-ZUAWA,      "Key for sorting according to assignment numbers
       FSTAG TYPE GLACCOUNT_SCREEN_CCODE-FSTAG,      "Field status group
       XINTB TYPE GLACCOUNT_SCREEN_CCODE-XINTB,      "Indicator: Is account only posted to automatically?
       END OF STR.
    DATA : ITAB TYPE TABLE OF STR WITH HEADER LINE,
            IT_BDCDATA TYPE TABLE OF BDCDATA WITH HEADER LINE,
            TXT(4096) TYPE C OCCURS 0,
            MSG TYPE STRING,
            COUNT(5) TYPE N.
    SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
       PARAMETERS : MY_FILE TYPE RLGRAP-FILENAME.
    SELECTION-SCREEN : END OF BLOCK B1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR MY_FILE.
    CALL FUNCTION 'F4_FILENAME'
      EXPORTING
        PROGRAM_NAME        = SYST-CPROG
        DYNPRO_NUMBER       = SYST-DYNNR
    *   FIELD_NAME          = ' '
      IMPORTING
        FILE_NAME           = MY_FILE
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
       EXPORTING
    *   I_FIELD_SEPERATOR          =
    *   I_LINE_HEADER              =
         I_TAB_RAW_DATA             = TXT
         I_FILENAME                 = MY_FILE
       TABLES
         I_TAB_CONVERTED_DATA       = ITAB[]
      EXCEPTIONS
        CONVERSION_FAILED          = 1
        OTHERS                     = 2
    IF SY-SUBRC <> 0.
    * IMPLEMENT SUITABLE ERROR HANDLING HERE
    ENDIF.
    START-OF-SELECTION.
    COUNT = 0.
    LOOP AT ITAB.
    *PERFORM OPEN_GROUP.
    REFRESH  IT_BDCDATA.
    PERFORM BDC_DYNPRO      USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                   'GLACCOUNT_SCREEN_KEY-BUKRS'.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                   '=ACC_CRE'.
    *PERFORM BDC_FIELD       USING 'BDC_CURSOR'
    *                              'GLACCOUNT_SCREEN_KEY-BUKRS'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_KEY-SAKNR'
                                   ITAB-SAKNR. "'5'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_KEY-BUKRS'
                                   ITAB-BUKRS. "'TATA'.
    PERFORM BDC_DYNPRO      USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                   '=2102_GROUP'.
    PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                   'GLACCOUNT_SCREEN_COA-KTOKS'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_COA-KTOKS'
                                   ITAB-KTOKS. "'GL'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_COA-XPLACCT'
                                   ITAB-XPLACCT. "'X'.
    PERFORM BDC_DYNPRO      USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                   '=2102_BS_PL'.
    PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                   'GLACCOUNT_SCREEN_COA-XBILK'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_COA-KTOKS'
                                   ITAB-KTOKS. "'GL'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_COA-XPLACCT'
                                   ITAB-XPLACCT. "''.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_COA-XBILK'
                                   ITAB-XBILK. "'X'.
    PERFORM BDC_DYNPRO      USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                   '=TAB02'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_COA-KTOKS'
                                   ITAB-KTOKS. "'GL'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_COA-XBILK'
                                   ITAB-XBILK. "'X'.
    PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                   'GLACCOUNT_SCREEN_COA-TXT50_ML'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_COA-TXT20_ML'
                                   ITAB-TXT20_ML. "'G/L ACCOUNT'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_COA-TXT50_ML'
                                   ITAB-TXT50_ML. "'G/L ACCOUNT'.
    PERFORM BDC_DYNPRO      USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                   '=TAB03'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_CCODE-WAERS'
                                   ITAB-WAERS. "'INR'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_CCODE-XSALH'
                                   ITAB-XSALH. "'X'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_CCODE-MWSKZ'
                                   ITAB-MWSKZ. "'*'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_CCODE-XMWNO'
                                   ITAB-XMWNO. "'X'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_CCODE-MITKZ'
                                   ITAB-MITKZ. "''.
    PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                   'GLACCOUNT_SCREEN_CCODE-ZUAWA'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_CCODE-XOPVW'
                                   ITAB-XOPVW. "'X'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_CCODE-XKRES'
                                   ITAB-XKRES. "'X'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_CCODE-ZUAWA'
                                   ITAB-ZUAWA. "'1'.
    PERFORM BDC_DYNPRO      USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                   '=SAVE'.
    PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                   'GLACCOUNT_SCREEN_CCODE-XINTB'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_CCODE-FSTAG'
                                   ITAB-FSTAG. "'G019'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_CCODE-XINTB'
                                   ITAB-XINTB. "'X'.
    *PERFORM BDC_TRANSACTION USING 'FS00'.
    CALL TRANSACTION 'FS00' USING IT_BDCDATA MODE 'E' UPDATE 'S'.
    COUNT = COUNT + 1.
    *PERFORM CLOSE_GROUP.
    ENDLOOP.
    CONCATENATE COUNT ' RECORDS UPDATED SUCCESSFULLY' INTO MSG.
    MESSAGE MSG TYPE 'I'.
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
       CLEAR IT_BDCDATA.
       IT_BDCDATA-PROGRAM  = PROGRAM.
       IT_BDCDATA-DYNPRO   = DYNPRO.
       IT_BDCDATA-DYNBEGIN = 'X'.
       APPEND IT_BDCDATA.
    ENDFORM.
    *        INSERT FIELD                                                  *
    FORM BDC_FIELD USING FNAM FVAL.
    *  IF FVAL <> NODATA.
         CLEAR IT_BDCDATA.
         IT_BDCDATA-FNAM = FNAM.
         IT_BDCDATA-FVAL = FVAL.
         APPEND IT_BDCDATA.
    *  ENDIF.
    ENDFORM.

  • How to show traffic lights on push button in ALV Grid?

    Hi Experts,
    I have an requirement where I have to show traffic lights on push button in ALV grid of a container. I am showing access sequence for each condition type in my grid. Now, if the access sequence contains 'PLANT', it should show 'green' on push button or else it should show 'red'. How I can I achieve this?
    Thanks in advance.

    Try This One.
    DATA: gs_fieldcat TYPE slis_fieldcat_alv,
              gt_fieldcat TYPE slis_t_fieldcat_alv,
              gs_layout   TYPE  slis_layout_alv.
    TYPES :BEGIN OF gty_temp,
                col(10) TYPE c,
               END OF gty_temp.
    DATA : gt_temp TYPE STANDARD TABLE OF gty_temp,
                gs_temp TYPE gty_temp.
       gs_temp-col  ='@0A@'. "ERROR RED LIGHT
           APPEND gs_temp TO   gt_temp.
        CLEAR GS_TEMP.
    gs_temp-col  = '@08@'." SUCCESS GREEN LIGHT
    APPEND gs_temp TO   gt_temp.
    CLAER GS_TEMP.
    gs_temp-col  = '@09@'. WARNING YELLOW LIGHT
    APPEND gs_temp TO   gt_temp.
    CLAER GS_TEMP.
    gs_fieldcat-fieldname   = ' COL'.
    gs_fieldcat-tabname   =  'GT_TEMP'.
    gs_fieldcat-seltext_m = 'ERROR'."
    APPEND gs_fieldcat TO gt_fieldcat.
    CLEAR gs_fieldcat.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program = 'ZPROG1' " PROGRAM NAME
         i_grid_title       = 'Details'
    *   is_layout          = gs_layout
         it_fieldcat        = gt_fieldcat
       TABLES
         t_outtab           = gt_temp.
    * EXCEPTIONS
    *   PROGRAM_ERROR                     = 1
    *   OTHERS                            = 2
    IF sy-subrc <> 0.
    * Implement suitable error handling here
    ENDIF.

Maybe you are looking for

  • Error deploying archive BPM jar to server

    am trying to deploying jar file after make .jpr file , and facing this error [11:58:01 AM] Error deploying archive sca_SalesQuoteToContractDemo_rev1.0.jar to partition "default" on server AdminServer [http://localhost:7001] [11:58:01 AM] HTTP error c

  • Movie not displaying in spry gallery

    Hi, I have a project which needs to displays movies instead of pictures gallery, I am using your code example. Do I need to add any other code or change code before this will display properly, its and intranet so I can't show just add the code as bel

  • Is there still a possible headphone socket fault in a "new" zen mic

    Hi i want to buy a zen micro 6gig...because of its great soundquality and price....the only thing that holds me back are reports about a headphone socket fault. But those reports are from march...so im wondering if there is still a "more-than-normal"

  • Snmp configuration on weblogic 10 has no effect

    SNMP in MMC(Mobile Management Center, A HP Product), use joesnmp.jar internal to send snmp trap generated by mmc app. This part works well in weblogic 10; snmp in weblogic , configured by weblogic console. In weblogic 8, we configure such items: Webl

  • Changing between the two different bookmark icons

    Hello... I am wondering if there's an easy (or not so easy) way to change a bookmark from one kind to the other kind. Specifically, when I combine PDFs, each source file ends up with one bookmark in the resultant PDF. These icons depict a "doubled bo