Pop-up alv

Hi,
I am getting an alv grid output....and when i double click on a field i want a POP UP GRID ALV to be shown on that same screen.....
Thanks in advance......

You have to capture the double click event in the alv grid, then call function 'POPUP_FOR_INFORMATION' or some related to make the popup.
To capture the event in the ALV:
CLASS lcl_event_handler DEFINITION .
  PUBLIC SECTION .
    DATA:  e_row_id    TYPE REF TO lvc_s_row.
    DATA:  e_column_id TYPE REF TO lvc_s_col.
    DATA:  es_row_no   TYPE lvc_s_roid.
    DATA:  es_col_id TYPE REF TO lvc_s_col.
*Double-click control
    METHODS handle_button_click
        FOR EVENT button_click OF cl_gui_alv_grid
            IMPORTING es_col_id es_row_no. " E_COLUMN_ID.
  PRIVATE SECTION.
ENDCLASS.                    "lcl_event_handler DEFINITION
CLASS lcl_event_handler IMPLEMENTATION .
*Handle Hotspot Click
  METHOD handle_hotspot_click .
    PERFORM handle_hotspot_click USING e_row_id e_column_id.
  ENDMETHOD .                    "handle_hotspot_click
*Handle Button Click
  METHOD handle_button_click .
    PERFORM handle_button_click USING es_col_id  es_row_no.
  ENDMETHOD .                    "handle_Button_click
ENDCLASS .                    "lcl_event_handler IMPLEMENTATION
Then the form to make the popup:
FORM handle_button_click  USING   es_col_id    TYPE lvc_s_col
                                  es_row_no    TYPE lvc_s_roid.
ENDFORM.                    " handle_double_click
Regards

Similar Messages

  • Regarding POP-UP ALV..

    Hi..
    How can display the data in POP-UP using ALV.
    If I clicked on purchase order number , then I want to display Item data in POP-UP ALV.
    Which function module I can use.
    If any one is having sample code.
    Please send me.
    Regards
    Sandeep.

    sandeep,
    Step 1:
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program      = ws_repid
                i_callback_user_command = 'USER_COMMAND'
                is_layout               = gs_layout
                it_fieldcat             = i_fcat
           TABLES
                t_outtab                = i_final.
    FORM user_command USING r_ucomm LIKE sy-ucomm
                                            rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
        WHEN '&IC1'.
          READ TABLE i_final INTO i_final INDEX rs_selfield-
                                                                          tabindex.
          Here you will get the seleted  po number in internal table
    i_final.
    based on i_final-purchase order number
    select   item data into one more internal table
    and again declare  field catelog for your popup.
    and use again  below FM
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program      = ws_repid
                i_callback_user_command = 'USER_COMMAND'
                is_layout               = gs_layout
                it_fieldcat             = i_fcat
           TABLES
                t_outtab                = new_internal table item data.
    Don't forget to reward if useful.....
      ENDCASE.
    ENDFORM.                    "user_command

  • Close Pop Up alv

    Hi,
    I have a popup which has a ALV grid control. My requirement is that when i click on the button "X" positioned on the top of page at right(CLOSE), popup should be close.
    Part of code
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program      = gv_gd_repid
                i_callback_pf_status_set = 'SET_STATUS_101'  "status
                i_callback_user_command = 'USER_COMMAND'
                i_grid_title           = ''
                i_callback_html_end_of_list = 'END_OF_LIST_HTML'
                is_layout               = gv_gd_layout
                it_fieldcat             = gv_fieldcatalog[]
                i_screen_start_column = 5
                i_screen_start_line   = 5
                i_screen_end_column   = 100
                i_screen_end_line     = 20
                it_event_exit           = it_event_exit[]
    Thanks in advance.
    Salvatore

    Hi,
    Check the below code.....
    DATA gt_outtab TYPE TABLE OF mara.
    SELECT * FROM mara INTO TABLE gt_outtab UP TO 20 ROWS.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_structure_name      = 'MARA'
        i_screen_start_column = 10
        i_screen_start_line   = 5
        i_screen_end_column   = 80
        i_screen_end_line     = 15
      TABLES
        t_outtab              = gt_outtab
      EXCEPTIONS
        program_error         = 1
        OTHERS                = 2.
    Cheers,
    Jose.

  • Triggerring ALV-pop up

    Hi all,
             How to trigger a pop-up alv report upono double click  on a row  in a report developed using OO ALV.
    Do i need to trigger any method and call fm REUSE ALV POP UP? Please help!
    Helpful answers will be rewarded.
    Thanks,
    Sandeep

    Hi Sandeep,
                      This might help:
    User selects infotypes from a pop up alv .The details of
    *infotypes selected are displayed in a ALV dialog box.
    REPORT ZALV_POPDIALOG.
    *Type pools for ALV declarations
    TYPE-POOLS : slis.
    *Internal table and wa declarations for T582A.
    DATA : it_t582a TYPE STANDARD TABLE OF t582a INITIAL SIZE 0,
           wa_t582a TYPE t582a.
    *Internal table and wa declarations for T582S.
    DATA : it_text TYPE STANDARD TABLE OF t582s,
           wa_text TYPE t582s.
    *Structure declaration for output
    TYPES : BEGIN OF ty_output,
            infty TYPE infty,
            zeitb TYPE dzeitb,
            itext TYPE intxt,
            pnnnn TYPE pnnnn_d,
            dname TYPE dianm,
            namst TYPE namst,
            edynr TYPE edynp,
            ldynr TYPE ldynp,
            stypt TYPE stypt,
            sytxt TYPE sytxt,
            zbtab TYPE dzbtab,
            checkbox(1),
            END OF ty_output.
    *Internal table and work area declaration for output in pop up
    DATA : it_output TYPE STANDARD TABLE OF ty_output INITIAL SIZE 0,
           wa_output TYPE ty_output.
    *Internal table and workarea declaration for alv dialog display
    DATA : it_display TYPE STANDARD TABLE OF ty_output INITIAL SIZE 0,
           wa_display TYPE ty_output.
    *data declarations for ALV
    DATA:ls_fieldcat TYPE slis_fieldcat_alv,
        lt_fieldcat TYPE slis_t_fieldcat_alv,
        ls_fieldcatlog TYPE slis_fieldcat_alv,
        lt_fieldcatlog TYPE slis_t_fieldcat_alv,
        lt_layout TYPE slis_layout_alv.
    *Initialization event
    INITIALIZATION.
    *Start of selection event
    START-OF-SELECTION.
    *Select to fetch all the infotypes and details in sap system
      SELECT *
             FROM t582a
             INTO CORRESPONDING FIELDS OF TABLE it_t582a.
    *Select to fetch the infotypes text
      IF it_t582a[] IS NOT INITIAL.
        SELECT * FROM t582s INTO CORRESPONDING FIELDS OF TABLE it_text
        FOR ALL ENTRIES IN it_t582a WHERE infty = it_t582a-infty
        AND sprsl = 'E'.
      ENDIF.
    *Appending the selected values to the output table
      LOOP AT it_t582a INTO wa_t582a.
        wa_output-infty = wa_t582a-infty.
        wa_output-zeitb = wa_t582a-zeitb.
        wa_output-pnnnn = wa_t582a-pnnnn.
        wa_output-dname = wa_t582a-dname.
        wa_output-namst = wa_t582a-namst.
        wa_output-edynr = wa_t582a-edynr.
        wa_output-ldynr = wa_t582a-ldynr.
        wa_output-stypt = wa_t582a-stypt.
        wa_output-sytxt = wa_t582a-sytxt.
        wa_output-zbtab = wa_t582a-zbtab.
        READ TABLE it_text INTO wa_text WITH KEY infty = wa_t582a-infty.
        wa_output-itext = wa_text-itext.
        APPEND wa_output TO it_output.
        CLEAR wa_output.
      ENDLOOP.
    *Subroutine to display the pop up values.
      PERFORM popup_display.
    *Subroutine to display the ALV dialog display
      PERFORM alv_output.
         Form  popup_display
    FORM popup_display.
    *field catalogue for pop up
      CLEAR ls_fieldcat.
      ls_fieldcat-row_pos   = '1'.
      ls_fieldcat-col_pos   = '1'.
      ls_fieldcat-fieldname = 'CHECKBOX'.
      ls_fieldcat-tabname   = 'IT_OUTPUT'.
      ls_fieldcat-seltext_m = 'SELECT'.
      APPEND ls_fieldcat TO lt_fieldcat.
      CLEAR ls_fieldcat.
      ls_fieldcat-row_pos   = '1'.
      ls_fieldcat-col_pos   = '2'.
      ls_fieldcat-fieldname = 'ITEXT'.
      ls_fieldcat-tabname   = 'IT_OUTPUT'.
      ls_fieldcat-seltext_m = 'DESCRIPTION'.
      ls_fieldcat-outputlen = 50.
      APPEND ls_fieldcat TO lt_fieldcat.
    Display data in a POPUP
      CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
        EXPORTING
          i_zebra              = 'X'
          it_fieldcat          = lt_fieldcat
          i_tabname            = 'IT_OUTPUT'
          i_checkbox_fieldname = 'CHECKBOX'
        TABLES
          t_outtab             = it_output.
    *Appending the selected infotypes only to internal table
      LOOP AT it_output INTO wa_output WHERE checkbox = 'X'.
        wa_display-itext = wa_output-itext.
        wa_display-infty = wa_output-infty.
        wa_display-zeitb = wa_output-zeitb.
        wa_display-pnnnn = wa_output-pnnnn.
        wa_display-dname = wa_output-dname.
        wa_display-namst = wa_output-namst.
        wa_display-edynr = wa_output-edynr.
        wa_display-ldynr = wa_output-ldynr.
        wa_display-sytxt = wa_output-sytxt.
        wa_display-stypt = wa_output-stypt.
        wa_display-zbtab = wa_output-zbtab.
        APPEND wa_display TO it_display.
        CLEAR wa_display.
      ENDLOOP.
    ENDFORM.                               " popup_display
    *&      Form  alv_output
    FORM alv_output .
    *fieldcatalogue for ALV dialog
      PERFORM build_fieldcat.
    *Layout for ALV dialog
      PERFORM build_layout.
    **ALV dialog output
      PERFORM alv.
    ENDFORM.                    " alv_output
    *&      Form  build_fieldcat
    FORM build_fieldcat .
    *fieldcatalogue for alv dialog
      CLEAR ls_fieldcatlog.
      ls_fieldcatlog-row_pos   = '1'.
      ls_fieldcatlog-col_pos   = '1'.
      ls_fieldcatlog-fieldname = 'INFTY'.
      ls_fieldcatlog-tabname   = 'IT_DISPLAY'.
      ls_fieldcatlog-seltext_m = 'Infotype'.
      APPEND ls_fieldcatlog TO lt_fieldcatlog.
      CLEAR ls_fieldcatlog.
      ls_fieldcatlog-row_pos   = '1'.
      ls_fieldcatlog-col_pos   = '2'.
      ls_fieldcatlog-fieldname = 'ITEXT'.
      ls_fieldcatlog-tabname   = 'IT_DISPLAY'.
      ls_fieldcatlog-seltext_m = 'Description'.
      APPEND ls_fieldcatlog TO lt_fieldcatlog.
      CLEAR ls_fieldcatlog.
      ls_fieldcatlog-row_pos   = '1'.
      ls_fieldcatlog-col_pos   = '3'.
      ls_fieldcatlog-fieldname = 'ZEITB'.
      ls_fieldcatlog-tabname   = 'IT_DISPLAY'.
      ls_fieldcatlog-seltext_m = 'TimeConstraint'.
      APPEND ls_fieldcatlog TO lt_fieldcatlog.
      CLEAR ls_fieldcatlog.
      ls_fieldcatlog-row_pos   = '1'.
      ls_fieldcatlog-col_pos   = '4'.
      ls_fieldcatlog-fieldname = 'PNNNN'.
      ls_fieldcatlog-tabname   = 'IT_DISPLAY'.
      ls_fieldcatlog-seltext_m = 'Structure'.
      APPEND ls_fieldcatlog TO lt_fieldcatlog.
      CLEAR ls_fieldcatlog.
      ls_fieldcatlog-row_pos   = '1'.
      ls_fieldcatlog-col_pos   = '5'.
      ls_fieldcatlog-fieldname = 'DNAME'.
      ls_fieldcatlog-tabname   = 'IT_DISPLAY'.
      ls_fieldcatlog-seltext_m = 'DialogModule'.
      APPEND ls_fieldcatlog TO lt_fieldcatlog.
      CLEAR ls_fieldcatlog.
      ls_fieldcatlog-row_pos   = '1'.
      ls_fieldcatlog-col_pos   = '6'.
      ls_fieldcatlog-fieldname = 'NAMST'.
      ls_fieldcatlog-tabname   = 'IT_DISPLAY'.
      ls_fieldcatlog-seltext_m = 'Subtypefield'.
      APPEND ls_fieldcatlog TO lt_fieldcatlog.
      CLEAR ls_fieldcatlog.
      ls_fieldcatlog-row_pos   = '1'.
      ls_fieldcatlog-col_pos   = '7'.
      ls_fieldcatlog-fieldname = 'EDYNR'.
      ls_fieldcatlog-tabname   = 'IT_DISPLAY'.
      ls_fieldcatlog-seltext_m = 'Singlescreenno'.
      APPEND ls_fieldcatlog TO lt_fieldcatlog.
      CLEAR ls_fieldcatlog.
      ls_fieldcatlog-row_pos   = '1'.
      ls_fieldcatlog-col_pos   = '8'.
      ls_fieldcatlog-fieldname = 'LDYNR'.
      ls_fieldcatlog-tabname   = 'IT_DISPLAY'.
      ls_fieldcatlog-seltext_m = 'Listscreenno'.
      APPEND ls_fieldcatlog TO lt_fieldcatlog.
      CLEAR ls_fieldcatlog.
      ls_fieldcatlog-row_pos   = '1'.
      ls_fieldcatlog-col_pos   = '9'.
      ls_fieldcatlog-fieldname = 'STYPT'.
      ls_fieldcatlog-tabname   = 'IT_DISPLAY'.
      ls_fieldcatlog-seltext_m = 'SubtypTable'.
      APPEND ls_fieldcatlog TO lt_fieldcatlog.
      CLEAR ls_fieldcatlog.
      ls_fieldcatlog-row_pos   = '1'.
      ls_fieldcatlog-col_pos   = '10'.
      ls_fieldcatlog-fieldname = 'SYTXT'.
      ls_fieldcatlog-tabname   = 'IT_DISPLAY'.
      ls_fieldcatlog-seltext_m = 'Subtyptexttable'.
      APPEND ls_fieldcatlog TO lt_fieldcatlog.
      CLEAR ls_fieldcatlog.
      ls_fieldcatlog-row_pos   = '1'.
      ls_fieldcatlog-col_pos   = '11'.
      ls_fieldcatlog-fieldname = 'ZBTAB'.
      ls_fieldcatlog-tabname   = 'IT_DISPLAY'.
      ls_fieldcatlog-seltext_m = 'SubtypeTCTable'.
      APPEND ls_fieldcatlog TO lt_fieldcatlog.
    ENDFORM.                    " build_fieldcat
    *&      Form  build_layout
    *Layout for ALV dialog
    FORM build_layout .
      lt_layout-zebra = 'X'.
      lt_layout-colwidth_optimize = 'X'.
    ENDFORM.                    " build_layout
    *&      Form  alv
    *Alv dialog output.
    FORM alv .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program    = sy-repid
          i_grid_title          = 'INFOTYPE DETAILS'
          is_layout             = lt_layout
          it_fieldcat           = lt_fieldcatlog
          i_screen_start_column = 10
          i_screen_start_line   = 20
          i_screen_end_column   = 100
          i_screen_end_line     = 40
        TABLES
          t_outtab              = it_display
        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.
    ENDFORM.                    " alv

  • ALV grid to list processing and GUI status

    Hi,
    In a customized program the report output is in ALV grid which is interactive. On selecting a record and pressing SAVE button a BAPI runs in background. In order to display BAPI error message the leave to list-processing has been used. But GUI status is not working in list display and can not exit or go back from here to main selection screen.
    when try to see program name & screen no it displays
    Program - SAPLKKBL
    Menu - STANDARD_FULLSCREEN
    pls advise how to go back from list to main screen or ALV output.
    thanks
    anya

    Hi Anya,
    As per my understanding, this is your prog flow:
    *Main ALV Display.
    *Select record.
    *Click on Button SAVE.
    *Handle Event.
    *Call BAPI for processing based on selection.
    Now at this point why dont you colect the error messages from the BAPI, and display it in a POP-UP ALV display?
    You need not e very much worried about the PF status and all. Also this POP-UP will be placed on the MAIN ALV. So when you close the POP-UP it will come back to the main ALV.
    By this when you press the BACK button of the main ALV, it will take you back to the selection scree.
    Please let me know if i am missing something.
    ags

  • How to make column editable in Normal ALV report

    Hi experts,
                       I Have one push button In ALV tool bar like Fields to be change..when i click this..i need to get one pop up with all fields which is having in Filedcatalog..so i need to doule click on any field which i want to be midified..then in ALV that particular entire  column should be editable.Can anybody please help me what is procedure to get pop up with fields..
    Thanks & regards,
    Veena..

    here is the required code
    type-pools: slis.
    types: BEGIN OF TY_MKPF,
            MBLNR TYPE MKPF-MBLNR,
            MJAHR TYPE MKPF-MJAHR,
            VGART TYPE MKPF-VGART,
            BLART TYPE MKPF-BLART,
            BLAUM TYPE MKPF-BLAUM,
          END OF TY_MKPF.
    TYPES:         BEGIN OF TY_WA, "STRUCTURE FOR POP UP ALV
                   CHECK TYPE C,
                   FIELDNAME TYPE DFIES-FIELDNAME,
                   FIELDTEXT TYPE DFIES-FIELDTEXT,
    END OF TY_WA.
    data: lt_mkpf type table of ty_mkpf,
          ls_mkpf type mkpf,
          IT TYPE TABLE OF TY_WA,  "INTERNAL TABLE FOR POP UP ALV
          WA TYPE TY_WA,           "WA FOR POP UP ALV
          IT_FCATP TYPE SLIS_T_FIELDCAT_ALV, "FCAT FOR POP UP ALV
          WA_FCATP LIKE LINE OF IT_FCATP, "WA FOR POP UP ALV
          ok_code type sy-ucomm,
          lt_fcat type lvc_t_fcat,
          ls_fcat type lvc_s_fcat.
    data: o_alv type ref to cl_gui_alv_grid,
          o_doc type ref to cl_gui_docking_container.
    start-of-selection.
    select  MBLNR
            MJAHR
            VGART
            BLART
            BLAUM
    into corresponding fields of table lt_mkpf from mkpf up to 100 rows.
    *---create fieldcatalog
    clear ls_fcat.
    ls_FCAT-FIELDNAME = 'MBLNR'.
    *WA_FCAT-TABNAME = WA-TABNAME.
    ls_FCAT-REF_TABLE = 'MPKPF'.
    ls_FCAT-REF_FIELD = 'MBLNR'.
    APPEND ls_FCAT TO lT_FCAT.
    clear ls_fcat.
    ls_FCAT-FIELDNAME = 'MJAHR'.
    *WA_FCAT-TABNAME = WA-TABNAME.
    ls_FCAT-REF_TABLE = 'MPKPF'.
    ls_FCAT-REF_FIELD = 'MJAHR'.
    APPEND ls_FCAT TO lT_FCAT.
    clear ls_fcat.
    ls_FCAT-FIELDNAME = 'VGART'.
    *WA_FCAT-TABNAME = WA-TABNAME.
    ls_FCAT-REF_TABLE = 'MPKPF'.
    ls_FCAT-REF_FIELD = 'VGART'.
    APPEND ls_FCAT TO lT_FCAT.
    clear ls_fcat.
    ls_FCAT-FIELDNAME = 'BLART'.
    *WA_FCAT-TABNAME = WA-TABNAME.
    ls_FCAT-REF_TABLE = 'MPKPF'.
    ls_FCAT-REF_FIELD = 'BLART'.
    APPEND ls_FCAT TO lT_FCAT.
    clear ls_fcat.
    ls_FCAT-FIELDNAME = 'BLAUM'.
    *WA_FCAT-TABNAME = WA-TABNAME.
    ls_FCAT-REF_TABLE = 'MPKPF'.
    ls_FCAT-REF_FIELD = 'BLAUM'.
    APPEND ls_FCAT TO lT_FCAT.
    *---collect the field names of alv in a itab
    clear wa.
    WA-FIELDNAME = 'MBLNR'.
    WA-FIELDTEXT = 'Number of Material Document'.
    APPEND WA TO IT.
    clear wa.
    WA-FIELDNAME = 'MJAHR'.
    WA-FIELDTEXT = 'fiscical year'.
    APPEND WA TO IT.
    clear wa.
    WA-FIELDNAME = 'VGART'.
    WA-FIELDTEXT = 'Transaction/Event Type'.
    APPEND WA TO IT.
    clear wa.
    WA-FIELDNAME = 'BLART'.
    WA-FIELDTEXT = 'Document Type'.
    APPEND WA TO IT.
    clear wa.
    WA-FIELDNAME = 'BLAUM'.
    WA-FIELDTEXT = 'Document type of revaluation document'.
    APPEND WA TO IT.
    *----------create field catalog
    CLEAR WA_FCATP.
    WA_FCATP-FIELDNAME = 'CHECK'.
    WA_FCATP-SELTEXT_M = 'Selection Field'.
    WA_FCATP-TABNAME = 'IT'.
    APPEND WA_FCATP TO IT_FCATP.
    CLEAR WA_FCATP.
    WA_FCATP-FIELDNAME = 'FIELDNAME'.
    WA_FCATP-TABNAME = 'IT'.
    WA_FCATP-REF_TABNAME = 'DFIES'.   "CHECK IN SE11 TYPE GROUP SLIS
    WA_FCATP-REF_FIELDNAME = 'FIELDNAME'. "CHECK IN SE11 TYPE GROUPB u201CSLIS
    APPEND WA_FCATP TO IT_FCATP.
    CLEAR WA_FCATP.
    WA_FCATP-FIELDNAME = 'FIELDTEXT'.
    WA_FCATP-TABNAME = 'IT'.
    WA_FCATP-REF_TABNAME = 'DFIES'.   "CHECK IN SE11 TYPE GROUP SLIS
    WA_FCATP-REF_FIELDNAME = 'FIELDNAME'.  "CHECK IN SE11 TYPE GROUPB SLIS
    APPEND WA_FCATP TO IT_FCATP.
    CLEAR WA_FCATP.
    call screen 100.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS '100'.
    *  SET TITLEBAR 'xxx'.
      if o_doc is not bound.
    CREATE OBJECT O_DOC
      EXPORTING
        RATIO                       = 95.
    CREATE OBJECT O_ALV
      EXPORTING
        I_PARENT          = o_doc.
      endif.
    CALL METHOD O_ALV->SET_TABLE_FOR_FIRST_DISPLAY
      CHANGING
        IT_OUTTAB                     = lt_mkpf
        IT_FIELDCATALOG               = lt_fcat.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE USER_COMMAND_0100 INPUT.
    CASE OK_CODE.
    WHEN 'BACK'.
    CLEAR :O_ALV,
           O_DOC.
    LEAVE TO SCREEN 0.
    when 'CHNG'.
    CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
      EXPORTING
       I_TITLE                       = 'select fields to make it editable'
       I_ZEBRA                       = 'X'
       I_CHECKBOX_FIELDNAME          = 'CHECK'
        I_TABNAME                     = 'IT'
       IT_FIELDCAT                   = IT_FCATP
      TABLES
        T_OUTTAB                      = it.
    loop at it into wa where check = 'X'.
    *---change fieldcatalog dynamacally
    case wa-fieldname.
    when 'MBLNR'.
    read table lt_fcat into ls_fcat with key fieldname = wa-fieldname.
    if sy-subrc = 0.
    ls_fcat-edit = 'X'.
    endif.
    when 'MJAHR'.
    read table lt_fcat into ls_fcat with key fieldname = wa-fieldname.
    if sy-subrc = 0.
    ls_fcat-edit = 'X'.
    endif.
    when 'VGART'.
    read table lt_fcat into ls_fcat with key fieldname = wa-fieldname.
    if sy-subrc = 0.
    ls_fcat-edit = 'X'.
    endif.
    when 'BLART'.
    read table lt_fcat into ls_fcat with key fieldname = wa-fieldname.
    if sy-subrc = 0.
    ls_fcat-edit = 'X'.
    endif.
    when 'BLAUM'.
    read table lt_fcat into ls_fcat with key fieldname = wa-fieldname.
    if sy-subrc = 0.
    ls_fcat-edit = 'X'.
    endif.
    endcase.
    modify lt_fcat from ls_fcat index sy-tabix transporting edit.
    clear ls_fcat.
    endloop.
    *---change fieldcatalog dynamically
    CALL METHOD O_ALV->SET_FRONTEND_FIELDCATALOG
      EXPORTING
        IT_FIELDCATALOG = lt_fcat
    *CALL METHOD O_ALV->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.
    ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    Edited by: zjason on Dec 29, 2010 7:47 AM
    Edited by: zjason on Dec 29, 2010 7:52 AM
    Edited by: zjason on Dec 29, 2010 7:54 AM

  • Regarding ALV Functions

    Hi,
        How i have to use the following function in ALV report.
         1. REUSE_ALV_VARIANT_DEFAULT_GET
         2. REUSE_ALV_VARIANT_F4
         3. REUSE_ALV_VARIANT_EXISTENCE
         4. REUSE_ALV_EVENTS_GET 
         5. REUSE_ALV_POPUP_TO_SELECT
    If any body help me i am very thankful to you people.
    Regards,
    Raghu.

    You should look at the BCALV examples for these functions in your system. You can even do a where used list and find out how exactly are these functions used.
    First 3 functions deal with the layout varaints that the user can store for the report.
    4th one will return all the events associated with a ALV.
    Last one, will show the data as a pop up ALV grid from which user can select the data.
    Regards,
    Ravi
    Note - Please mark the helpful answers

  • Module Pool - Pop-Up Input Screen

    Hi Experts,
      I have this scenario:
         I have a table control and two radio buttons say R1 and R2.
         R1 -> Single
    First Requirement-> When R2 is clicked, a button to its adjacent position should become visible and activated.
    Second Requirement-> When the above button is clicked, a new table control should get displayed as a pop-up window type, and user can enter more data or more rows.
    Please share code
    Thanks
    Chandan

    Hi Chandan,
    double click on the radoi button and create a function code for the radio button.
    In rhe PBO write the code for function code..
    case sy-ucomm.
    when 'Function for radio button1'.
            table-control-1-invisible = 'X'.   "table control1 invisible is set to 'X" then the table control is not cisible on the screen.
    table-control-2-invisible = ' '.   "Table control 2 is visible on the screen.
    when 'Function for radio button2'.
           table-control-2-invisible = 'X'.   "table control2 invisible
            table-control-1-invisible = ' '.   "Table control 1 is visible on the screen.
    endcase.
    if you need pop with alv format to diaply data use this fm ..but iw will allow you to selct and not to edit..
    CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
        EXPORTING
          i_title               = 'Batch Number Selection'
          i_selection           = 'X'
          i_screen_start_column = 5
          i_screen_start_line   = 5
          i_screen_end_column   = 70
          i_screen_end_line     = 20
          i_tabname             = 'T_BATCH'
          it_fieldcat           = gt_fieldcat_drd[]                  "field catalog for internal table
        IMPORTING
          es_selfield           = gc_selfield            "if you select field on the pop-up the selcted field and index is captured
        TABLES
          t_outtab              = t_batch                 "internal Table values want to show on the POP-Up
        EXCEPTIONS
          program_error         = 1
          OTHERS                = 2.
      IF sy-subrc <> 0.
      ENDIF.
    Regards,
    Prabhudas

  • Call ALV gid inside Method using class

    Hi all,
    I have created one method in my ZClass, in that i need to write code for display a pop-up(ALV) that should contain the internal table records. Also if i double click a cell in that popup then a transaction(say ztest) should be called..
    How to do this inside the method?
    Thanks,
    Ranjith C.

    Hi,
    You can call screen in you class and assign the custum container to the screen, using cl_gui_alv_grid class assing created object to container and create fields catlog and internal table with data to display in alv. call the method set_table_for_first_display to display data.
    You can also used the method get_selected_rows to read current selected line data can use call transaction.
    For more details you can used the pakage slis there are may program are avaible to resolve your problem.

  • How to configure a custom link in ESS for LTA?

    I have a requirement to display a pop-up alv report, once user click on a link "Leave_Details" in ESS. I am able to display pop-up alv but background screen is empty as its a separate WD application however I want that as soon as user selects any row from that popup alv it should be fetched and displayed on the LTA screen of Portal. It seems link is not configured so its displaying blank background screen while for other standard links this screen is displayed.
    Kindly help in this how we can display a custom link in ESS and after fetching any single record it should be closed and single row would be displayed in LTA screen.
    Here the background ESS screen is blank for custom link displaying this pop-up alv.
    For other standard links ESS screen is displaying.

    Hi Samuli,
    Thanks for your reply however here I am not asking how to create popup, it has already created however my question is, how to configure the link used to display that popup alv?
    As shown in the screen as soon as user clicks on the given link shown in below screenshot  this popup is displayed,
    and after clicking on this link, below screen is displayed
    Here background screen is empty whereas it should display the ESS screen in the background, so as soon as user select any row from the popup alv, i'll pass the data into ESS screen using BADI.
    Kindly revert with possible solution.

  • Customer contact ( VAP1 )  add pager number with BDC

    hi ,
        While creating Customer Contact for Pager number entry there is a POP alv , from where Pager need to be selected . while recording BDC it doesnt copy that Okcodes for the POP UP ALV  .
       So how to Add Pager number for mass upload .
    Ashok

    This has been noted by a few people, must have been either a mistake or Blackberry's way of cutting down on the drug trade. Do drug dealers even use pagers anymore? Just kidding!
    I would call the issue into your Carrier's Blackberry support team so that it gets officially recognized and fixed in a future release.
    As a workaround for now I can suggest moving the pager numbers to any other type of telephone field.
    -: DrewRead :-
    Can't find an app on Blackberry World yet? Tweet the developer and ask when they will #GetWithBB10 !!
    "Like it" if you like it.

  • Need help : SUBMIT program

    Hi all,
    I am developing a custom prgram which filters the billing documents.
    These docments are submitted to another Standard SAP program which
    processes them and displays the output in POP UP ALV format.
    I am submitting the documents using SUBMIT exporting list to memory and return
    but the list is initial since it is an ALV output.
    Please suggest as to what has to be done to capture the output in my custom program

    Hi Rajinder,
    Its good that you have used Submit with Exporting List to memory and Return and I am sure that you must have populated the input parameters of the standard report bt defining the selection table and declaring its type as rparams.
    After you return to the custom report from the SAP standard with the internal table,you have to use Inporting List to Memory as the list is still in the ABAP memory ID.
    After importing,you can use ALV Function Module and display it.
    If the scenario is such that the SAP standard report is used to display the ALV,then you should only use Submit with the selection table as theri is no point in returning to your custom report once the ALV gets populated and displayed in a Pop Up window.
    Simply use Submit with the selection table without even Return and Exportng List to memory.
    In case you have any further clarifications,do let me know.
    Regards,
    Puneet Jhari.

  • Suppress the pop dialog box in ALV report

    Hi Gurus,
    I have developed an ALV report where we can edit the data and save to data base.
    For a field, it checks the value on value table and displays a pop with error "This value does not exsit". Automatically.
    I have not written an validation for this field.
    When i try to close the dialoge box it does not close.

    Hi,
    What the field reference you have given, there is check table which it is validating for the field, check it there might be a check table.
    Regards,
    Madhukar Shetty

  • Delete the entry from dropdown list in the pop up window in ALV report

    Hi All,
    I have a requirement in the ALV interactive report ZMM_IMPL .If we enter selection screen parameters its displaying the first screen.If we click on 'Goods Issue' tab ,it display the pop up window for Requirement Pick list with Batch number ,Storage location and Quantity.Here we have F4 option for batch number(MCH1-CHARG) and we could see all batches (with stock and without stock) in the drop down.
    Now my requirement is i would need to delete the non stock batches from drop down values.
    Ex:we clich F4 in batch number field(CHARG) ,could see 4 batches Test1 ,Test2 ,Test3 and Test4 .Here Test1 ,Test2 are Batch stock and other two are Non stock batches. We could see all these batches (with and without stock) in MCHB table.Now i would need to delete non stock batches(Batch with zero qty (MCHB-CLABS = 0) from drop down.
    Any idea on this.
    Regards,
    Rpn

    Hi,
    User wants to appear only batches with stock value in the drop down .Here Batches test1, test2 , test3 have stock but  test4  has no stock value. Now the requirement is  if stock does not exist in any of those batches it should not appear in the drop down and propose batches based on quantity.
    Batch stock value can be seen through transaction MB52  and could see only Test1.Test2 and Test3.
    They have arleady code in the program for F4 help to Batch number as following,
      CLEAR: lips.
      REFRESH: gt_lips.
      lips-vbeln = f_vbeln.
      lips-posnr = f_posnr.
      lips-matnr = f_matnr.
      lips-werks = f_werks.
      lips-lfimg = f_bdmng.  "store the requirement quantity for display
      lips-pstyv = f_res_del.  "use to store RES or DEL      "DV1K919143
      CALL SCREEN '0100' STARTING AT 10 2.
    for the ok code to be BT_SAVE all the validation are complete
      IF g_ok_code NE 'BT_SAVE'.
        f_answer = 'A'.
      ENDIF.
    The logic for screen '0100' as follows
    PROCESS BEFORE OUTPUT.
    *&spwizard: pbo flow logic for tablecontrol 'TC_LIPS'
      module TC_LIPS_change_tc_attr.
    *&spwizard: module TC_LIPS_change_col_attr.
      loop at   GT_LIPS
           into GS_LIPS
           with control TC_LIPS
           cursor TC_LIPS-current_line.
        module TC_LIPS_get_lines.
    *&spwizard:   module TC_LIPS_change_field_attr
      endloop.
      MODULE STATUS_0100.
    PROCESS AFTER INPUT.
    *&spwizard: pai flow logic for tablecontrol 'TC_LIPS'
      loop at GT_LIPS.
        chain.
          field GS_LIPS-CHARG.
          field GS_LIPS-LGORT.
          field GS_LIPS-LFIMG.
          module TC_LIPS_modify on chain-request.
        endchain.
        field GS_LIPS-SELKZ
          module TC_LIPS_mark on request.
      endloop.
      module TC_LIPS_user_command.
    *&spwizard: module TC_LIPS_change_tc_attr.
    *&spwizard: module TC_LIPS_change_col_attr.
    MODULE USER_COMMAND_0100.
    MODULE USER_COMMAND_EXIT_0100 AT EXIT-COMMAND.
    process on value-request.
      field gs_lips-charg module lips-charg_values.
    Logic for F4 help as following
    DATA: mc_object LIKE dd23l-mconame,
             help_lips LIKE lips.
       DATA: dseltab LIKE dselc OCCURS 10 WITH HEADER LINE.
       DATA: lf_shlpname LIKE dd30v-shlpname,
             lx_shlp TYPE shlp_descr_t,
             ls_interface LIKE ddshiface,
             lf_rc LIKE sy-subrc,
             lt_retvalues LIKE ddshretval OCCURS 0,
             ls_retvalue LIKE ddshretval.
       help_lips = lips.
       IF NOT help_lips-matnr IS INITIAL.
         CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
           EXPORTING
             input        = help_lips-matnr
           IMPORTING
             output       = help_lips-matnr
           EXCEPTIONS
             length_error = 1
             OTHERS       = 2.
         IF sy-subrc <> 0.
        exit.                        "Ignore conversion errors "50A
         ENDIF.
       ELSE.
         EXIT.
       ENDIF.
       SET PARAMETER ID 'MAT' FIELD help_lips-matnr.
       SET PARAMETER ID 'WRK' FIELD help_lips-werks.
      Export parameters to memory to enable search help via classes
       CLEAR dseltab.
       REFRESH dseltab.
       dseltab-fldname = 'MANDT'.
       MOVE sy-mandt TO dseltab-fldinh.
       APPEND dseltab.
       dseltab-fldname = 'MATNR'.
       MOVE help_lips-matnr TO dseltab-fldinh.
       APPEND dseltab.
       dseltab-fldname = 'WERKS'.
       MOVE help_lips-werks TO dseltab-fldinh.
       APPEND dseltab.
       dseltab-fldname = 'CHARG'.
       MOVE help_lips-charg TO dseltab-fldinh.
       APPEND dseltab.
       EXPORT dseltab TO MEMORY ID 'DSELTAB'.
      Get description for search help
       mc_object = 'MCH1'.
       lf_shlpname = mc_object.
       CALL FUNCTION 'F4IF_GET_SHLP_DESCR'
         EXPORTING
           shlpname = lf_shlpname
           shlptype = 'SH'
         IMPORTING
           shlp     = lx_shlp
         EXCEPTIONS
           OTHERS   = 1.
      Enable value copy from search help to dynpro field
       READ TABLE lx_shlp-interface INTO ls_interface
                                    WITH KEY shlpfield = 'CHARG'.
       ls_interface-valfield = 'X'.
       MODIFY lx_shlp-interface FROM ls_interface INDEX sy-tabix.
      Start search help dialog
       CALL FUNCTION 'F4IF_START_VALUE_REQUEST'
         EXPORTING
           shlp          = lx_shlp
         TABLES
           return_values = lt_retvalues
         EXCEPTIONS
           OTHERS        = 1.
       IF sy-subrc EQ 0.
         READ TABLE lt_retvalues INTO ls_retvalue
                                 WITH KEY fieldname = 'CHARG'.
         IF sy-subrc EQ 0.
           lips-charg = ls_retvalue-fieldval.
           gs_lips-charg = ls_retvalue-fieldval.
         ENDIF.
       ENDIF.
    How to delete entry from F4 help.Any idea?
    Regards,
    Reddy

  • ALV TOP-OF-PAGE not popping up

    Hi I am working on ALV and I am trying to use Top-of-page functionality but somehow it's not popping up when I am trying to execute my report and just empty space is showing at the top of report. Following is my code:
    perform data.
    perform build_field_catalog.
    perform top_of_page.
    perform display_alv.
    FORM TOP_OF_PAGE .
      data: t_header type slis_t_listheader,
            wa_header type slis_listheader,
            t_line like wa_header-info,
            ld_lines type i,
            ld_linesc(10) type c.
    Report Heading
      wa_header-typ  = 'H'.
      wa_header-info = 'TEST REPORT'.
      append wa_header to t_header.
      clear: wa_header.
    Date
      wa_header-typ  = 'S'.
      wa_header-key = 'Date: '.
      CONCATENATE  sy-datum+6(2) '.'
                   sy-datum+4(2) '.'
                   sy-datum(4) INTO wa_header-info.   "todays date
      append wa_header to t_header.
      clear: wa_header.
    Time
      wa_header-typ  = 'S'.
      wa_header-key = 'Time: '.
      CONCATENATE  sy-uzeit(2) ':'
                   sy-uzeit+2(2) ':'
                   sy-uzeit+4(2) INTO wa_header-info.   "System time
      append wa_header to t_header.
      clear: wa_header.
    Total No. of Records Selected
      describe table it_output lines ld_lines.
      ld_linesc = ld_lines.
      concatenate 'Total No. of Records Selected: ' ld_linesc
                        into t_line separated by space.
      wa_header-typ  = 'A'.
      wa_header-info = t_line.
      append wa_header to t_header.
      clear: wa_header, t_line.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = t_header.
    FORM DISPLAY_ALV_REPORT .
    call function 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program     = gd_repid
          i_callback_top_of_page = 'TOP-OF-PAGE'
          is_layout              = gd_layout
          it_fieldcat            = fieldcatalog[]
          i_save                 = 'A'
        TABLES
          t_outtab               = it_output
        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.
    ENDFORM.                    " DISPLAY_ALV_REPORT
    thanks,
    Rajeev
    ENDFORM.                    " TOP_OF_PAGE

    hi check this example..
    REPORT ZTUFI091 .
    *& Report ZDEMO_ALVGRID *
    *& Example of a simple ALV Grid Report *
    *& The basic requirement for this demo is to display a number of *
    *& fields from the EKKO table. *
    *REPORT zdemo_alvgrid .
    TABLES: ekko.
    type-pools: slis. "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
    ebeln TYPE ekpo-ebeln,
    ebelp TYPE ekpo-ebelp,
    statu TYPE ekpo-statu,
    aedat TYPE ekpo-aedat,
    matnr TYPE ekpo-matnr,
    menge TYPE ekpo-menge,
    meins TYPE ekpo-meins,
    netpr TYPE ekpo-netpr,
    peinh TYPE ekpo-peinh,
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
    wa_ekko TYPE t_ekko.
    *ALV data declarations
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
    gd_tab_group type slis_t_sp_group_alv,
    gd_layout type slis_layout_alv,
    gd_repid like sy-repid,
    gt_events type slis_t_event,
    gd_prntparams type slis_print_alv.
    *Start-of-selection.
    START-OF-SELECTION.
    perform data_retrieval.
    perform build_fieldcatalog.
    perform build_layout.
    perform build_events.
    perform build_print_params.
    perform display_alv_report.
    *& Form BUILD_FIELDCATALOG
    Build Fieldcatalog for ALV Report
    form build_fieldcatalog.
    There are a number of ways to create a fieldcat.
    For the purpose of this example i will build the fieldcatalog manualy
    by populating the internal table fields individually and then
    appending the rows. This method can be the most time consuming but can
    also allow you more control of the final product.
    Beware though, you need to ensure that all fields required are
    populated. When using some of functionality available via ALV, such as
    total. You may need to provide more information than if you were
    simply displaying the result
    I.e. Field type may be required in-order for
    the 'TOTAL' function to work.
    fieldcatalog-fieldname = 'EBELN'.
    fieldcatalog-seltext_m = 'Purchase Order'.
    fieldcatalog-col_pos = 0.
    fieldcatalog-outputlen = 10.
    fieldcatalog-emphasize = 'X'.
    fieldcatalog-key = 'X'.
    fieldcatalog-do_sum = 'X'.
    fieldcatalog-no_zero = 'X'.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'EBELP'.
    fieldcatalog-seltext_m = 'PO Item'.
    fieldcatalog-col_pos = 1.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'STATU'.
    fieldcatalog-seltext_m = 'Status'.
    fieldcatalog-col_pos = 2.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'AEDAT'.
    fieldcatalog-seltext_m = 'Item change date'.
    fieldcatalog-col_pos = 3.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'MATNR'.
    fieldcatalog-seltext_m = 'Material Number'.
    fieldcatalog-col_pos = 4.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'MENGE'.
    fieldcatalog-seltext_m = 'PO quantity'.
    fieldcatalog-col_pos = 5.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'MEINS'.
    fieldcatalog-seltext_m = 'Order Unit'.
    fieldcatalog-col_pos = 6.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'NETPR'.
    fieldcatalog-seltext_m = 'Net Price'.
    fieldcatalog-col_pos = 7.
    fieldcatalog-outputlen = 15.
    fieldcatalog-datatype = 'CURR'.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    fieldcatalog-fieldname = 'PEINH'.
    fieldcatalog-seltext_m = 'Price Unit'.
    fieldcatalog-col_pos = 8.
    append fieldcatalog to fieldcatalog.
    clear fieldcatalog.
    endform. " BUILD_FIELDCATALOG
    *& Form BUILD_LAYOUT
    Build layout for ALV grid report
    form build_layout.
    gd_layout-no_input = 'X'.
    gd_layout-colwidth_optimize = 'X'.
    gd_layout-totals_text = 'Totals'(201).
    gd_layout-totals_only = 'X'.
    gd_layout-f2code = 'DISP'. "Sets fcode for when double
    "click(press f2)
    gd_layout-zebra = 'X'.
    gd_layout-group_change_edit = 'X'.
    gd_layout-header_text = 'helllllo'.
    endform. " BUILD_LAYOUT
    *& Form DISPLAY_ALV_REPORT
    Display report using ALV grid
    form display_alv_report.
    gd_repid = sy-repid.
    call function 'REUSE_ALV_GRID_DISPLAY'
    exporting
    i_callback_program = gd_repid
    i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
    i_callback_user_command = 'USER_COMMAND'
    i_grid_title = outtext
    is_layout = gd_layout
    it_fieldcat = fieldcatalog[]
    it_special_groups = gd_tabgroup
    it_events = gt_events
    is_print = gd_prntparams
    i_save = 'X'
    is_variant = z_template
    tables
    t_outtab = it_ekko
    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.
    endform. " DISPLAY_ALV_REPORT
    *& Form DATA_RETRIEVAL
    Retrieve data form EKPO table and populate itab it_ekko
    form data_retrieval.
    select ebeln ebelp statu aedat matnr menge meins netpr peinh
    up to 10 rows
    from ekpo
    into table it_ekko.
    endform. " DATA_RETRIEVAL
    Form TOP-OF-PAGE *
    ALV Report Header *
    Form top-of-page.
    *ALV Header declarations
    data: t_header type slis_t_listheader,
    wa_header type slis_listheader,
    t_line like wa_header-info,
    ld_lines type i,
    ld_linesc(10) type c.
    Title
    wa_header-typ = 'H'.
    wa_header-info = 'EKKO Table Report'.
    append wa_header to t_header.
    clear wa_header.
    Date
    wa_header-typ = 'S'.
    wa_header-key = 'Date: '.
    CONCATENATE sy-datum+6(2) '.'
    sy-datum+4(2) '.'
    sy-datum(4) INTO wa_header-info. "todays date
    append wa_header to t_header.
    clear: wa_header.
    Total No. of Records Selected
    describe table it_ekko lines ld_lines.
    ld_linesc = ld_lines.
    concatenate 'Total No. of Records Selected: ' ld_linesc
    into t_line separated by space.
    wa_header-typ = 'A'.
    wa_header-info = t_line.
    append wa_header to t_header.
    clear: wa_header, t_line.
    call function 'REUSE_ALV_COMMENTARY_WRITE'
    exporting
    it_list_commentary = t_header.
    i_logo = 'Z_LOGO'.
    endform.
    FORM USER_COMMAND *
    --> R_UCOMM *
    --> RS_SELFIELD *
    FORM user_command USING r_ucomm LIKE sy-ucomm
    rs_selfield TYPE slis_selfield.
    Check function code
    CASE r_ucomm.
    WHEN '&IC1'.
    Check field clicked on within ALVgrid report
    IF rs_selfield-fieldname = 'EBELN'.
    Read data table, using index of row user clicked on
    READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
    Set parameter ID for transaction screen field
    SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
    Sxecute transaction ME23N, and skip initial data entry screen
    CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
    ENDIF.
    ENDCASE.
    ENDFORM.
    *& Form BUILD_EVENTS
    Build events table
    form build_events.
    data: ls_event type slis_alv_event.
    call function 'REUSE_ALV_EVENTS_GET'
    exporting
    i_list_type = 0
    importing
    et_events = gt_events[].
    read table gt_events with key name = slis_ev_end_of_page
    into ls_event.
    if sy-subrc = 0.
    move 'END_OF_PAGE' to ls_event-form.
    append ls_event to gt_events.
    endif.
    read table gt_events with key name = slis_ev_end_of_list
    into ls_event.
    if sy-subrc = 0.
    move 'END_OF_LIST' to ls_event-form.
    append ls_event to gt_events.
    endif.
    endform. " BUILD_EVENTS
    *& Form BUILD_PRINT_PARAMS
    Setup print parameters
    form build_print_params.
    gd_prntparams-reserve_lines = '3'. "Lines reserved for footer
    gd_prntparams-no_coverpage = 'X'.
    endform. " BUILD_PRINT_PARAMS
    *& Form END_OF_PAGE
    form END_OF_PAGE.
    data: listwidth type i,
    ld_pagepos(10) type c,
    ld_page(10) type c.
    write: sy-uline(50).
    skip.
    write:/40 'Page:', sy-pagno .
    endform.
    *& Form END_OF_LIST
    form END_OF_LIST.
    data: listwidth type i,
    ld_pagepos(10) type c,
    ld_page(10) type c.
    skip.
    write:/40 'Page:', sy-pagno .
    endform.
    regards,
    venkat

Maybe you are looking for