Navigate to ALV screen

Plz tell me from where to navigate to an ALV screen

Hi,
U can Navigate to ALV screen in Event <b>START_OF_SELECTION</b>.
After Collecting the data which u intended to display For ALV Screen.
Regards,
Ranjit Thakur.
<b>Please Mark The Helpful Answer.</b>

Similar Messages

  • Navigate to selection screen from ALV.

    Hi All,
    I am using ALV in my report which is editable alv. when i save after edit one more alv is generated with loggs. but when i click on back tab from application toolbar it navigate to previous alv. But i want to navigate to selection screen. so how to achive it.
    i have defined my own PF status and i tried following code which gives short dump.
    IF sy-ucomm = 'BACK'.
        SET SCREEN 1000.
        LEAVE TO SCREEN 1000.
      ENDIF.
    thanks ,
    Swarup.

    Hi Swarup,
    I have implemented the exact scenario, this is what you need to do.
    FORM f_alv_user_comm USING i_ucomm TYPE syucomm           
                              i_rs TYPE slis_selfield.
    *  Display ALV2 (This list shows the list blocked/unblocked customers)
        PERFORM f_display_alv2 CHANGING i_ucomm.
      IF i_ucomm EQ '&F03'.         " here you can use the back button code
    * Return to seletion screen
        LEAVE TO SCREEN 0.
      ENDIF.
    endform.
    In f_display_alv2 do like this :
    FORM f_display_alv2 CHANGING e_ucomm TYPE syucomm.
        CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
          EXPORTING
            i_bypassing_buffer = c_mark
            i_callback_program = w_repid
            is_layout          = lws_layout
            it_fieldcat        = int_fieldcat2[]
            it_events          = int_events_alv2
          TABLES
            t_outtab           = int_alv2_out
          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.
        ELSE.
          e_ucomm = '&F03'.                          " This will take the back button code
        ENDIF.
    endform.
    This is the right way to do it.
    Regards,
    Salil Sonam

  • How to capture changed data at ALV screen

    Hi ALV Experts,
    I am using Following method for ALV display :-
      CALL METHOD g_alv_grid_0200->set_table_for_first_display
        EXPORTING
          i_bypassing_buffer            = 'X'
          is_layout                          =
          it_toolbar_excluding          =
        CHANGING
          it_outtab                          =
          it_fieldcatalog                   =
      CALL METHOD g_alv_grid_0200->set_ready_for_input
        EXPORTING
          i_ready_for_input = '1'.
    Now I am changing few values in ALV screen and capturing through following Method :-
      CALL METHOD g_alv_grid_0200->check_changed_data
        IMPORTING
          e_valid = l_valid.
    THIS ABOVE METHOD STRANGELY CAPTURES CHANGES IN QUANTITY AND DATE FIELDS ONLY AND NOT IN CHARATER FIELDS.
    Can somebody suggest how to capture changes of character fields also.
    Thanks in Advance,
    Chandan

    Hi,
    Check whether the following logic helps.
    p_er_data_changed TYPE REF TO cl_alv_changed_data_protocol.
    DATA :
        lwa_mod_cell TYPE lvc_s_modi,
        lwa_mod      TYPE ty_mod.
    LOOP AT p_er_data_changed->mt_good_cells INTO lwa_mod_cell.
        lwa_mod-row  = lwa_mod_cell-row_id.
        APPEND lwa_mod TO i_mod.
    ENDLOOP.
    Regards,
    Lohitha

  • FBV0 transaction error messages in ALV screen

    hi all,
    In transaction FBV0 the error messages are coming in a completely seperate page. Even the success message with document number that used to come up at bottom of screen or Information box is also coming on the next ALV screen. How can I get rid of showing a complete new ALV screen with messages. It has happened after ECC6 upgrade.
    Thanks,
    FS

    Hello,
    See if this is coming for a single user or all the users.
    If this is for a single user you can see FB00 to check user settings.
    If this is happening with all the users, contact your basis administrator.
    Regards,
    Ravi

  • Restrict Height of Header in ALV screen

    Hi,
    I have created ALV Tree using custom container. Now i want to rstrict the Height of the top of page as top of page containes too many rows hence in the whole report only the Header is displayed.
    Can you tell me the method for to rstrict the Height of Header on Tree ALV screen.
    CREATE OBJECT l_custom_container
          EXPORTING
                container_name = l_tree_container_name
          EXCEPTIONS
                cntl_error                  = 1
                cntl_system_error           = 2
                create_error                = 3
                lifetime_error              = 4
                lifetime_dynpro_dynpro_link = 5.
        IF sy-subrc <> 0.
          MESSAGE e003 WITH 'ERROR'.                            "#EC NOTEXT
        ENDIF.
      ENDIF.
    create tree control
      CREATE OBJECT obj_tree1
        EXPORTING
            parent              = l_custom_container
            node_selection_mode = cl_gui_column_tree=>node_sel_mode_single
            item_selection      = 'X'
            no_html_header      = ''
            no_toolbar          = ''
        EXCEPTIONS
            cntl_error                   = 1
            cntl_system_error            = 2
            create_error                 = 3
            lifetime_error               = 4
            illegal_node_selection_mode  = 5
            failed                       = 6
            illegal_column_name          = 7.
      IF sy-subrc <> 0.
        MESSAGE e003 WITH 'ERROR'.                              "#EC NOTEXT
      ENDIF.
    create Hierarchy-header
      DATA l_hierarchy_header TYPE treev_hhdr.
      PERFORM ztest_buildhhead CHANGING l_hierarchy_header.
    create info-table for html-header
      DATA: lt_list_commentary TYPE slis_t_listheader.
      PERFORM f7800_build_comment CHANGING
                     lt_list_commentary.
    repid for saving variants
      DATA: ls_variant TYPE disvariant.
      ls_variant-report = sy-repid.
    create emty tree-control
      CALL METHOD obj_tree1->set_table_for_first_display
        EXPORTING
          is_hierarchy_header = l_hierarchy_header
          it_list_commentary  = lt_list_commentary
          i_background_id     = 'ALV_BACKGROUND'
          i_save              = 'A'
          is_variant          = ls_variant
        CHANGING
          it_outtab           = i_final2
          it_fieldcatalog     = i_fieldcat.      "table must be empty !!
    *&      Form  f7800_build_comment
          text
         <--P_LIT_LIST_COMMENTARY  text
    FORM f7800_build_comment  CHANGING  pt_list_commentary TYPE slis_t_listheader.
      DATA: lt_line  TYPE slis_listheader,
            lwa_date TYPE t_date .
      CLEAR lt_line.
    Heading
      lt_line-typ  = c_h.
      lt_line-info = 'Cash Position Report'(024).
      APPEND lt_line TO pt_list_commentary.
    Current Date
      CLEAR lt_line.
      lt_line-typ  = c_s.
      lt_line-key  = 'Date:'(022).
      lwa_date     =   sy-datum .
      CONCATENATE lwa_date-month '/' lwa_date-date '/' lwa_date-year
                                    INTO lt_line-info .
      CLEAR lwa_date .
      APPEND lt_line TO pt_list_commentary.
    Current Time
      lt_line-key  = 'Time:'(023).
      lt_line-info = sy-timlo.
      APPEND lt_line TO pt_list_commentary.
    Forest City Name
      CLEAR lt_line.
      lt_line-typ  = c_a.
      lt_line-info = 'Forest City'(021).
      APPEND lt_line TO pt_list_commentary.
    Selection Parameters
      CLEAR lt_line.
      lt_line-typ  = c_s.
      lt_line-key  = 'For Selection :'(010).
      APPEND lt_line TO pt_list_commentary.
      LOOP AT s_bukrs .
        CLEAR lt_line.
        lt_line-typ  = c_s.
        lt_line-key  = 'Facilitator Company Code :'(001).
        IF NOT s_bukrs-high IS INITIAL .
          CONCATENATE s_bukrs-low ' TO '  s_bukrs-high
                                    INTO lt_line-info
                                    SEPARATED BY space      .
        ELSE .
          lt_line-info = s_bukrs-low.
        ENDIF .
        APPEND lt_line TO pt_list_commentary.
      ENDLOOP .
      CLEAR lt_line.
      lt_line-typ  = c_s.
      lt_line-key  = 'Run Date :'(013).
      lwa_date = p_zfbdt .
      CONCATENATE lwa_date-month '/' lwa_date-date '/' lwa_date-year
                                    INTO lt_line-info .
      APPEND lt_line TO pt_list_commentary.
      LOOP AT s_prctr .
        CLEAR lt_line.
        lt_line-typ  = c_s.
        lt_line-key  = 'Profit Center :'(014).
        IF NOT s_prctr-high IS INITIAL .
          CONCATENATE s_prctr-low ' TO '  s_prctr-high
                                    INTO lt_line-info
                                    SEPARATED BY space .
        ELSE .
          lt_line-info = s_prctr-low .
        ENDIF.
        APPEND lt_line TO pt_list_commentary.
      ENDLOOP .
    ENDFORM.                    " f7800_build_comment
    Regards,
    Deepthi.

    Hi ,
    no_html_header      = 'X'
    Use this option to hide html header. Than use cl_gui_splitter to split screen into 2 parts.
    For the upper part of the screen , use cl_dd_document class to add your necessary top of page content. The other one contains alv tree.
    Set the height of splitter by thids method ;
    call method splitter->set_row_height
        exporting
          id     = 1
          height = 13.

  • Using textfield in screen to navigate to next screen.

    Hi experts,
      I am designing a screen in screen painter. There is a Text field in the screen which is double click enabled. Now i want to use this text field to navigate to next screen when it is double clicked. How to do it. Please help.
    Regards.
    Vaibhav Tiwari.

    Hi,
    In the Flow logic of your screen under the PAI Event in the default module user_command_xxxx INPUT , use case statement to check for the sy-ucomm value for the double-click event and check then check the GET cursor value, if it is the text field(double-clicked enabled textfield), then call whatever screen you want to.
    Reward points if this is useful!
    Thanks,
    Muthu

  • How to 'Exit' OO ALV screen type 'Model Dialog Box' using 'X' on the top?

    HI Experts,
    I have the below issue in my OO ALV screen type 'Model Dialog Box'...
    The main screen is OO ALV and displays rows of data,
    When select a line(row) and push any buttons
    ( u201CAdd Materialu201D, u201CAdd Binu201D, u201CModify Binu201D, u201CMove Materialu201D, u201CDisplay Batchesu201D)
    the program will take you to next screen and it is a u201CModal dialog boxu201D type.
    That screen has two buttons to exit ( u201CSAVEu201D and u201CCancelu201D ) on the bottom of the screen.
    User would like to exit the screen using u201CXu201D on the top line right corner.
    That u201CXu201D is not on for the u201CModal dialog boxu201D type screen.
    How do I add event to close that screen using u201CXu201D?
    Thanks in advance,
    John.

    data :GR_EVENT_HANDLER    TYPE REF TO LCL_EVENT_HANDLER,
           GR_DIALOG_CONTAINER TYPE REF TO CL_GUI_DIALOGBOX_CONTAINER,
    CLASS LCL_EVENT_HANDLER DEFINITION.
      PUBLIC SECTION.
        METHODS :
        HANDLE_USER_COMMAND FOR EVENT USER_COMMAND OF CL_GUI_ALV_GRID
        IMPORTING E_UCOMM,
        HANDLE_ON_DIALOGBOX_CLOSE FOR EVENT CLOSE OF CL_GUI_DIALOGBOX_CONTAINER
        IMPORTING SENDER,
    ENDCLASS.                    "lcl_event_handler DEFINITION
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
    METHOD HANDLE_USER_COMMAND.
      CASE E_UCOMM.
         WHEN 'DBCON'.
            PERFORM DIALOG_DISPLAY.
      ENDCASE.
      ENDMETHOD.                    "HANDLE_USER_COMMAND
      METHOD HANDLE_ON_DIALOGBOX_CLOSE.
        IF NOT SENDER IS INITIAL.
          CALL METHOD SENDER->FREE
            EXCEPTIONS
              OTHERS = 1.
          FREE GR_DIALOG_CONTAINER.
          CLEAR GR_DIALOG_CONTAINER.
        ENDIF.
      ENDMETHOD.                    "handle_on_dialogbox_close
    ENDCLASS.                    "lcl_event_handler IMPLEMENTATION
    FORM DIALOG_DISPLAY .
      DATA : L_TEXT(255),
                  L_LIN TYPE I.
      IF GR_DIALOG_CONTAINER IS INITIAL.
        CREATE OBJECT GR_DIALOG_CONTAINER
          EXPORTING
          PARENT                      =
            WIDTH                       = 400
            HEIGHT                      = 150
            STYLE                       = CL_GUI_CONTROL=>WS_SYSMENU
          REPID                       =
          dynnr                       = '100'
          LIFETIME                    = lifetime_default
            TOP                         = 100
            LEFT                        = 350
            CAPTION                     = 'Error Dialog Box'
          EXCEPTIONS
            CNTL_ERROR                  = 1
            CNTL_SYSTEM_ERROR           = 2
            CREATE_ERROR                = 3
            LIFETIME_ERROR              = 4
            LIFETIME_DYNPRO_DYNPRO_LINK = 5
            EVENT_ALREADY_REGISTERED    = 6
            ERROR_REGIST_EVENT          = 7
            OTHERS                      = 8.
      ENDIF.
      SET HANDLER GR_EVENT_HANDLER->HANDLE_ON_DIALOGBOX_CLOSE FOR GR_DIALOG_CONTAINER.
      REFRESH IG_INDEX_ROWS.
      CLEAR   WG_SELECTED_ROW.
      CALL METHOD GR_ALVGRID->GET_SELECTED_ROWS
        IMPORTING
          ET_INDEX_ROWS = IG_INDEX_ROWS.
      DESCRIBE TABLE IG_INDEX_ROWS LINES L_LIN.
      IF L_LIN GT 0.
        READ TABLE IG_INDEX_ROWS INTO WG_SELECTED_ROW INDEX 1.
        READ TABLE IG_SAL INTO WG_SAL INDEX WG_SELECTED_ROW-INDEX.
        CONCATENATE 'Item' WG_SAL-POSNR 'of Sales Order' WG_SAL-VBELN 'has been selected' INTO L_TEXT
                  SEPARATED BY SPACE.
      ELSE.
        L_TEXT = 'Enter Netvalue greater than 500'.
      ENDIF.
      CALL METHOD GR_HTMLD->ADD_GAP
        EXPORTING
          WIDTH = 1.
      CALL METHOD GR_HTMLD->ADD_TEXT
        EXPORTING
          TEXT = L_TEXT.
      CALL METHOD GR_HTMLD->NEW_LINE.
    Display the data
      CALL METHOD GR_HTMLD->DISPLAY_DOCUMENT
        EXPORTING
          PARENT = GR_DIALOG_CONTAINER.
    ENDFORM.                    " DIALOG_DISPLAY

  • How to do choose one record in alv screen from dyn_table ?

    Experts:  How to do choose one record in alv screen from <dyn_table> ?
    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
    RS_SELFIELD TYPE SLIS_SELFIELD.
    DATA: V_COUNT TYPE I.
    CLEAR: V_COUNT,<dyn_wa>.
    LOOP AT <dyn_table> INTO <dyn_wa>. "WHERE <?????> = 'X'.  I should how to do write ?
            V_COUNT = V_COUNT + 1.
    ENDLOOP.
      if not rs_selfield-tabindex eq 0 AND V_COUNT NE 0.
        IF R_UCOMM = '&CHANGE'.
          IF sy-subrc = 0.
            IF V_COUNT = 1.
              CALL SCREEN 100.
              perform dny_field_value_update.
              rs_selfield-refresh = 'X'.
            ENDIF.
          ENDIF.
        endif.
      endif.
    ENDFORM. "USER_COMMAND

    Anyways which version of SAP are you using ? As of SAPNW 7.0 Release 2 you can specify dynamic tokens with LOOP ... WHERE statement.
    My sap product is ecc5.0. Still thanks!
    Now I have solved it.
    FORM USER_COMMAND  USING R_UCOMM LIKE SY-UCOMM
                             RS_SELFIELD TYPE SLIS_SELFIELD.
      DATA: V_COUNT TYPE I.
      CLEAR:  V_COUNT,<dyn_wa>,IT_TOTAL.
      SY-INDEX = rs_selfield-tabindex.   
    READ TABLE <dyn_table> INTO <dyn_wa> INDEX SY-INDEX.
    ASSIGN COMPONENT 'KUNNR' OF STRUCTURE <DYN_WA> TO <dyn_field>.
      CONDENSE <DYN_FIELD> NO-GAPS.
      IT_TOTAL-KUNNR = <DYN_FIELD>.
      ASSIGN COMPONENT 'PLANTNO' OF STRUCTURE <DYN_WA> TO <dyn_field>.
      CONDENSE <DYN_FIELD> NO-GAPS.
      IT_TOTAL-MATNR = <DYN_FIELD>.
      ASSIGN COMPONENT 'CUSTOMERNO' OF STRUCTURE <DYN_WA> TO <dyn_field>.
       CONDENSE <DYN_FIELD> NO-GAPS.
      IT_TOTAL-CUSTOMERNO = <DYN_FIELD>.
      ASSIGN COMPONENT 'ZPERSON' OF STRUCTURE <DYN_WA> TO <dyn_field>.
      CONDENSE <DYN_FIELD> NO-GAPS.
      IT_TOTAL-ZPERSON = <DYN_FIELD>.
      IF SY-SUBRC = 0.
        "CHECK  <dyn_field> = 'X'.
        V_COUNT = V_COUNT + 1.
      ENDIF.
      if not rs_selfield-tabindex eq 0 AND V_COUNT NE 0.
        IF R_UCOMM = '&CHANGE'.
          IF sy-subrc = 0.
            IF V_COUNT = 1.
              CALL SCREEN 100.
              perform dny_field_value_update.
              rs_selfield-refresh = 'X'.
              "exit.
            ENDIF.
          ENDIF.
        endif.
      endif.
    Edited by: andy1982999 on Apr 2, 2010 8:42 AM

  • How to write code for page up and page down buttons on alv screen?

    Hi,
    Page up and page down buttons are not working in general alv report. Thease buttons are in disable mode. But is stnd. transactions (tcode : fbl5n)  these are enabled and working properly, but we can't debug this with /h
    How to write code for page up and page down buttons on alv screen?

    Poonam,
    On doing the screen debugging it took me over to    Include LSTXWFCC ,kindly check the below code.
    module cc_display.
      fcode = sy-ucomm(4).
      case sy-ucomm(4).
        when 'P--'.
          perform cc_firstpage.
        when 'P-'.
          perform cc_prevpage.
        when 'P+'.
          perform cc_nextpage.
        when 'P++'.
          perform cc_lastpage.
        when 'EX--'.
          perform cc_firstcopy.
        when 'EX-'.
          perform cc_prevcopy.
        when 'EX+'.
          perform cc_nextcopy.
        when 'EX++'.
          perform cc_lastcopy.
    I guess it can give you some lead.
    K.Kiran.

  • In Dialog module programing how to navigate to previous screens?

    I have a REPORT program which displays a ALV output with custom menu buttons along with the ALV buttons on the menu bar.
    Once the custom button is clicked the REPORT program calls a custom SCREEN 1 the screen is displayed to the user and the screen has a custom menu which has some custom buttons.
    if the user selects any button the user is taken to the next SCREEN 2 .
    My Problm is when the processing is finished on the SCREEN 2 i would like the system to retrurn back to report out put screen and NOT on SCREEN 1.
    If i use the bwlow code in SCREEN 2 - PAI event it just returns me back to SCREEN 1 and not to the report output screen.
    SET SCREEN 0.
    LEAVE SCREEN.
    What coding needs to be done to return me back to the REPORT output screen from SCREEN 2.

    Hi,
    there is also possibility to specify  LEAVE TO LIST-PROCESSING.
    Please check following link
    http://help.sap.com/saphelp_nw04/helpdata/en/10/e7dbde82ba11d295a40000e8353423/content.htm
    Regards,
      Karol
    Edited by: Karol Seman on Oct 29, 2008 9:39 PM

  • Add a parameter in an ALV screen

    Hi,
    I'd like to add a parameter in the screen of an ALV GRID (I use REUSE_ALV_GRID_DISPLAY NOT OO ALV): the target is having the alv grid  and this parameter in the same screen, so when I give a particular user command, I can read the input of the parameter and update the itab used by the alv.
    Is it possible to do it?
    Thanks in advance for your help.

    Hi Umby79,
    Since you are using the ALV functions I do not believe that this possible what you are asking for. The only way I can think of addressing this with ALV functions is to create your own user-command displaying a popup for the user to input the requested value and process the user-command with the value as such.
    Your requirement could only be addressed by using the ALV gui control framework, which works with containers in your own screens.
    Kind regards,
    Robert

  • Screen painter not working properly to edit an ALV screen

    Hi I am stuck with a problem, I want to edit a screen which is an ALV report screen and add a custom button to its toolbar. But the screen painter is not opening properly so that I can see the screen layout and add a button.
    Any help is greatly appreciated....

    HWat do u mean by the screen is displaying improperly? Is teh graphical layout not coming?
    If so, you have to contact your basis team. you need to get the latest Gui version, and you need a particular port to be opened.

  • Updating ALV Screen after getting New Out put  (  After BACK no old o/p )

    Hi All
    I have got a ALV output with check box in it and a post button on application toolbar. If I am clicking a row and clicking post button I am able to get new alv output wherein I am removing clicked row from newer output screen. ( I am doing by reexecuting REUSE_ALV_GRID_DISPLAY).
    However if I press BACK button on the output I am again going back to old screen where I get old row which I had clicked. Is there any way from where I'll be able to skip these screens ? Or is there any alternate way of dealing this ?
    Regards
    Amol

    Hi amol,
    1. on double-clicking the row,
      it will get deleted.
    2. On pressing back, it will come back to program.
    3. just copy paste.
    4.
    REPORT abc.
    TYPE-POOLS : slis.
    Data
    DATA : ITAB LIKE T001 OCCURS 0 WITH HEADER LINE.
    DATA : alvfc TYPE slis_t_fieldcat_alv.
    Select Data
    SELECT * FROM t001 INTO TABLE itab.
    *------- Field Catalogue
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
      EXPORTING
        i_program_name         = sy-repid
        i_internal_tabname     = 'ITAB'
        i_inclname             = sy-repid
      CHANGING
        ct_fieldcat            = alvfc
      EXCEPTIONS
        inconsistent_interface = 1
        program_error          = 2
        OTHERS                 = 3.
    Display
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
      EXPORTING
        it_fieldcat             = alvfc
        i_callback_program      = sy-repid "<-------Important
        i_callback_user_command = 'ITAB_USER_COMMAND' "<------ Important
      TABLES
        t_outtab                = itab
      EXCEPTIONS
        program_error           = 1
        OTHERS                  = 2.
    CALL BACK FORM
    FORM itab_user_command USING whatcomm TYPE sy-ucomm whatrow TYPE
    slis_selfield.
      <b>delete itab index whatrow-tabindex.
      whatrow-REFRESH = 'X'.</b>
    ENDFORM. "ITAB_user_command
    regards,
    amit m.

  • Regarding button on alv screen

    IN the alv grid output i hav to fix the button if user click that button the file has to downloaded how? using function code &ZDL

    Hello,
       The Download Functionality is provided by SAP Itself .There is no need for u to handle it explicitly.
    But for ur Functionality refer this
    *& Report  Z_82235_ALV_OOPS_PUSTBUTTON                                 *
    report  z_82235_alv_oops_pustbutton             .
    tables: mara.
    types: begin of t_mara,
             matnr type matnr,
             mtart type mtart,
             matkl type matkl,
             meins type meins,
           end of t_mara.
    data: gt_mara type standard table of t_mara,
          gs_mara like line of gt_mara.
    class lcl_event_receiver definition deferred.
    *-- Global Data defenation for ALV
    *---Alv Grid instance referance
    data : gr_alvgrid type ref to cl_gui_alv_grid,
           event_receiver type ref to lcl_event_receiver.
    *---Name of the custom control added on the screen
    data gc_custom_control_name type scrfname value 'CC_ALV'
    *---Custom container instance referance
    data: gr_ccontainer type ref to cl_gui_custom_container.
    *---Field catalog table
    data: gt_fieldcat type lvc_t_fcat,
          gs_fieldcat type lvc_s_fcat.
    *---Layout structure
    data: gs_layout type lvc_s_layo.
    data: g_repid like sy-repid.
    select matnr
           mtart
           matkl
           meins
           from mara into table gt_mara
           up to 25 rows.
    g_repid = sy-repid.
    include <icon>.
    * Predefine a local class for event handling to allow the
    * declaration of a reference variable before the class is defined.
    * Set initial dynpro
    set screen 100.
    * LOCAL CLASSES: Definition
    *===============================================================
    * class lcl_event_receiver: local class to
    *                         define and handle own functions.
    * Definition:
    * ~~~~~~~~~~~
    class lcl_event_receiver definition.
      public section.
        methods:
        handle_toolbar
            for event toolbar of cl_gui_alv_grid
                importing e_object e_interactive,
        handle_user_command
            for event user_command of cl_gui_alv_grid
                importing e_ucomm.
      private section.
    endclass.
    * lcl_event_receiver (Definition)
    *===============================================================
    * LOCAL CLASSES: Implementation
    *===============================================================
    * class lcl_event_receiver (Implementation)
    class lcl_event_receiver implementation.
      method handle_toolbar.
    * § 2.In event handler method for event TOOLBAR: Append own functions
    *   by using event parameter E_OBJECT.
        data: ls_toolbar  type stb_button.
    * E_OBJECT of event TOOLBAR is of type REF TO CL_ALV_EVENT_TOOLBAR_SET.
    * This class has got one attribute, namly MT_TOOLBAR, which
    * is a table of type TTB_BUTTON. One line of this table is
    * defined by the Structure STB_BUTTON (see data deklaration above).
    * A remark to the flag E_INTERACTIVE:
    * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    *         'e_interactive' is set, if this event is raised due to
    *         the call of 'set_toolbar_interactive' by the user.
    *         You can distinguish this way if the event was raised
    *         by yourself or by ALV
    *         (e.g. in method 'refresh_table_display').
    *         An application of this feature is still unknown... :-)
    * append a separator to normal toolbar
        clear ls_toolbar.
        move 3 to ls_toolbar-butn_type.
        append ls_toolbar to e_object->mt_toolbar.
    * append an icon to download
        clear ls_toolbar.
        ls_toolbar-function = 'DOWN'.
        ls_toolbar-icon = 'icon_generate'.
        ls_toolbar-quickinfo = 'DOWNLOAD FILE'.
        ls_toolbar-text = 'DOWNLOAD FILE'.
    *    MOVE ' ' TO ls_toolbar-disabled.
        append ls_toolbar to e_object->mt_toolbar.
      endmethod.
      method handle_user_command.
    * § 3.In event handler method for event USER_COMMAND: Query your
    *   function codes defined in step 2 and react accordingly.
        data: lt_rows type lvc_t_row.
        case e_ucomm.
          when 'DOWN'.
          call function 'GUI_DOWNLOAD'
            exporting
    *         BIN_FILESIZE                  =
              filename                      = 'D:a.txt'
    *         FILETYPE                      = 'ASC'
    *         APPEND                        = ' '
    *         WRITE_FIELD_SEPARATOR         = ' '
    *         HEADER                        = '00'
            tables
              data_tab                      = gt_mara
           exceptions
             file_write_error              = 1
             no_batch                      = 2
             gui_refuse_filetransfer       = 3
             invalid_type                  = 4
             no_authority                  = 5
             unknown_error                 = 6
             header_not_allowed            = 7
             separator_not_allowed         = 8
             filesize_not_allowed          = 9
             header_too_long               = 10
             dp_error_create               = 11
             dp_error_send                 = 12
             dp_error_write                = 13
             unknown_dp_error              = 14
             access_denied                 = 15
             dp_out_of_memory              = 16
             disk_full                     = 17
             dp_timeout                    = 18
             file_not_found                = 19
             dataprovider_exception        = 20
             control_flush_error           = 21
             others                        = 22
          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.
      endmethod.                           "handle_user_command
    endclass.
    * lcl_event_receiver (Implementation)
    *===================================================================
    * S T A R T - O F - S E L E C T I O N.
    start-of-selection.
      set screen '100'.
    *&      Module  display_alv  OUTPUT
    *       text
    module display_alv output.
      if gr_alvgrid is initial.
    *---Creating custom container instance
        create object gr_ccontainer
          exporting
            container_name              = gc_custom_control_name
          exceptions
            cntl_error                  = 1
            cntl_system_error           = 2
            create_error                = 3
            lifetime_error              = 4
            lifetime_dynpro_dynpro_link = 5
            others                      = 6
        if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        endif.
    *---Creating ALV gris instance
        create object gr_alvgrid
          exporting
            i_parent          = gr_ccontainer
            i_appl_events     = 'X'
          exceptions
            error_cntl_create = 1
            error_cntl_init   = 2
            error_cntl_link   = 3
            error_dp_create   = 4
            others            = 5
        if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        endif.
    *---Prepare field catalog
        perform prepare_field_catalog tables gt_fieldcat.
    *---Prepare layout
        perform prepare_layout changing gs_layout.
    *---Call ALV grid
        call method gr_alvgrid->set_table_for_first_display
          exporting
    *    I_BUFFER_ACTIVE               =
    *    I_BYPASSING_BUFFER            =
    *    I_CONSISTENCY_CHECK           =
    *    I_STRUCTURE_NAME              =
    *    IS_VARIANT                    =
    *    I_SAVE                        =
    *    I_DEFAULT                     = 'X'
            is_layout                     = gs_layout
    *    IS_PRINT                      =
    *    IT_SPECIAL_GROUPS             =
    *    IT_TOOLBAR_EXCLUDING          =
    *    IT_HYPERLINK                  =
    *    IT_ALV_GRAPHICS               =
    *    IT_EXCEPT_QINFO               =
          changing
            it_outtab                     = gt_mara[]
            it_fieldcatalog               = gt_fieldcat
    *    IT_SORT                       =
    *    IT_FILTER                     =
          exceptions
            invalid_parameter_combination = 1
            program_error                 = 2
            too_many_lines                = 3
            others                        = 4
        if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        endif.
    * ->Create Object to receive events and link them to handler methods.
    * When the ALV Control raises the event for the specified instance
    * the corresponding method is automatically called.
        create object event_receiver.
        set handler event_receiver->handle_user_command for gr_alvgrid.
        set handler event_receiver->handle_toolbar for gr_alvgrid.
    * § 4.Call method 'set_toolbar_interactive' to raise event TOOLBAR.
        call method gr_alvgrid->set_toolbar_interactive.
    *  endif.                               "IF grid1 IS INITIAL
    *  call method cl_gui_control=>set_focus exporting control = gr_alvgrid.
    *--- the instance is present
      else .
        call method gr_alvgrid->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.                 " display_alv  OUTPUT
    *&      Form  prepare_field_catalog
    *       text
    *      <--P_GT_FIELDCAT  text
    form prepare_field_catalog  tables gt_fieldcat.
      clear : gs_fieldcat.
      gs_fieldcat-fieldname = 'MATNR'.
      gs_fieldcat-col_pos   = 1.
      gs_fieldcat-emphasize = 'X'.
      gs_fieldcat-outputlen = 10.
      gs_fieldcat-coltext   = 'Material No'.
      gs_fieldcat-edit      = 'X'.
      append gs_fieldcat to gt_fieldcat.
      clear : gs_fieldcat.
      gs_fieldcat-fieldname = 'MTART'.
      gs_fieldcat-col_pos   = 2.
      gs_fieldcat-outputlen = 6.
      gs_fieldcat-coltext   = 'Material Type'.
      append gs_fieldcat to gt_fieldcat.
      clear : gs_fieldcat.
      gs_fieldcat-fieldname = 'MATKL'.
      gs_fieldcat-col_pos   = 3.
      gs_fieldcat-outputlen = 5.
      gs_fieldcat-coltext   = 'Material Grp'.
      append gs_fieldcat to gt_fieldcat.
      clear : gs_fieldcat.
      gs_fieldcat-fieldname = 'MEINS'.
      gs_fieldcat-col_pos   = 4.
      gs_fieldcat-outputlen = 4.
      gs_fieldcat-coltext   = 'Unit'.
      append gs_fieldcat to gt_fieldcat.
    endform.                    " prepare_field_catalog
    *&      Form  prepare_layout
    *       text
    *      <--P_GS_LAYOUT  text
    form prepare_layout  changing p_gs_layout type lvc_s_layo.
      p_gs_layout-zebra = 'X'.
      p_gs_layout-grid_title = 'Material'.
      p_gs_layout-smalltitle = 'X'.
    endform.                    " prepare_layout
    *&      Module  STATUS_0100  OUTPUT
    *       text
    module status_0100 output.
      set pf-status 'STATUS1'.
    *  SET TITLEBAR 'xxx'.
    endmodule.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    module user_command_0100 input.
      case sy-ucomm.
        when 'BACK' or 'UP' or 'CANCEL'.
          leave program.
            when '&DETAIL'.
          leave program.
      endcase.
    endmodule.                 " USER_COMMAND_0100  INPUT
    Regards,
    Deepu.K

  • Unable to navigate from one screen.

    Hi All,
    I am new to this customization in Oracle Identity Manager Self service control.
    I have to create a new tab in OIM Self service console from which it should navigate to a popup screen.
    I gone through some code as given below. Due to this I am able to go see the file name in url but the screen is blank without any data on screen.
    adf-config.xml:
    <?xml version="1.0" encoding="UTF-8" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
    <view id="test1">
    <page>/examples/Test1.jspx</page>
    </view>
    <view id="test2">
    <page>/examples/Test2.jspx</page>
    </view>
    <control-flow-rule id="__1">
    <from-activity-id id="__2">test1</from-activity-id>
    <control-flow-case id="__3">
    <from-outcome id="__5">-navigation</from-outcome>
    <to-activity-id id="__4">test2</to-activity-id>
    </control-flow-case>
    </control-flow-rule>
    </adfc-config>
    faces-config.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee">
    <application>
    <default-render-kit-id>oracle.adf.rich</default-render-kit-id>
    </application>
    <navigation-rule>
    <navigation-case>
    <from-outcome>-navigation</from-outcome>
    <to-view-id>/examples/Test2.jspx</to-view-id>
    </navigation-case>
    </navigation-rule>
    </faces-config>
    Can any one know how to solve this issue.
    Any suggestion can be helpful to me.
    Thank you
    -SRITHEGREAT

    Can't anyone help me, "how to create a popup window using xml menu model".
    Even a small suggestion on this issue can be helpful for me.
    -SRITHEGREAT

Maybe you are looking for

  • Issue with the ABAP program to find BI lookups and code Patterns

    Hello dears, I'm trying to use the ABAP program LOOKUP_FINDER: http://wiki.sdn.sap.com/wiki/display/BI/ABAPprogramtofindBIlookupsandcodePatterns But I have the following issue: Runtime Errors         RAISE_EXCEPTION Short text     Exception condition

  • Error when trying to run an application that worked when built with 8.6

    I have a simple program that I wrote in version 8.6 that I never had a problem building and running applications built with it in 8.6.  Two weeks ago I got 2009 in the mail because we had very recently purchased 8.6 and I am getting errors when tryin

  • Serial number front panel pop-up

    I have a vi that will scan a serial number.  It will be called from teststand.  The problem I am having that the front panel stays visable when it is executed.  This will be very distracting for the test technician.  I have attached the vi and a scre

  • Sorting month Chronologically ( column 1 )

    I have a cross tab report showing "agent performance" by "month", the report is laid out like this                                              April-2010           Feb-2010        Jan-2010 Average handle time Average talk time Everything works as it

  • IPod Touch stolen before delivery

    Hi, I received an empty box instead of the 32GB Ipod Touch I had ordered as a Xmas gift for my wife (included laser engraving). Although the courier had left by the time I opened the package (my m-in-law had received and signed for the package but ha