Window in ALV ...

Hi gurus ...
I made a report that it was a print output . I used the following code and it worked .
AT LINE-SELECTION.
WINDOW STARTING AT 032 05
       ENDING   AT 100 30.
WRITE:/   'Detail Data for object :     ', XHIDEKEY COLOR 4.
Now i made another report that is An ALV .
I tried to do it again but i can't do it ....
How can i do it when i press a button to display a small window with some data (Not alv) ..
look my code ....
    CASE R_UCOMM.
      WHEN '&IC1'.
        CASE RS_SELFIELD-FIELDNAME .
          WHEN 'PERNR'.
            RS_SELFIELD-REFRESH = 'X'.
            SET PARAMETER ID 'PER' FIELD RS_SELFIELD-VALUE.
            CALL TRANSACTION 'PA20' AND SKIP FIRST SCREEN.
          WHEN OTHERS .
        ENDCASE. "  RS_SELFIELD-FIELDNAME .
********************EVENTS IN BUTTONS  ********************
      WHEN 'DISPLAY'.
      WINDOW   STARTING AT 032 05
     ENDING AT 100 30.
        WRITE:/   'Detail Data for object :     '.
        WRITE:/   'Detail Data for object :     '.
        WRITE:/   'Detail Data for object :     '.
        WRITE:/   'Detail Data for object :     '.
        WRITE:/   'Detail Data for object :     '.
Thanks ....

Hello,
You cannot use Window command here as it use the ALV uses Object oriented model, here you can do this using
Call screen and displaying it in another alv list
As normally you see the F2 pick button on ALV list.
Thanks and Regards
Pushkar Joshi

Similar Messages

  • 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

  • How to create POPUP windows (from ALV report)

    Hi there,
    I have a ALV report which has a field where the user can click and view more details of the selected data. I would like to have a popup and then display the selected data...is that possible? Any function module which I can use to pop up a window and display selected data?
    Thanks in advance!
    Cheers,
    MC

    Hi MC,
    Please follow the steps below for getting the result you desired.
    1. In your field catalogue, move 'X' to the slis_fieldcat_alv-hotspot field. This will enable the user to select it.
    2. Set slis_t_event_exit-ucomm = '&IC1' and slis_t_event_exit-before = 'X' and pass this internal table to the ALV function call. This will enable to code your own logic for that standard user command.
    3. Pass your 'User command' routine name to the appropriate paramter of the function module.
    4. Your 'User command' routine should have the following format.
    *       FORM USER_COMMAND                                             *
    *  -->  UCOMM                                                         *
    *  -->  SELFIELD                                                      *
    FORM user_command USING ucomm    LIKE sy-ucomm
                            selfield TYPE slis_selfield.
      CASE ucomm.
        WHEN '&IC1'.
          PERFORM display_pop_up USING selfield.
        WHEN OTHERS.
      ENDCASE.
      MOVE '&REFRESH' TO ucomm.
    ENDFORM.                                    " USER_COMMAND
    5. Write your code for the pop-up in the routine 'DISPLAY_POP_UP'. Look at 'POPUP*' function modules to pick up the best suitable one for you.
    Hope this helps,
    Srinivas

  • How to open multiple windows from ALV?

    I have a button on each line of ALV.
    If the user clicks on the button on the first line, it shoud open a window in another session.
    Now the user will be able to click on the button on the next line and another window should popu up.
    Thus the user can compare the window contents and do the corrections.
    How to achive this opening of windows simultaneously?
    Thanks,
    Ven

    I tried the above function module and it does open anotehr session - but I am not able to pass values . I have to pass SAP Script texts and opent he window. but the above func mod calls t codes and allows bdcdata, messages or spa/gpa parameters only.
    So I am back with my question - how to open the session with the text lines?

  • ALV Report : How to display popup window?

    Hello Friends,
    I have developed oone ALV report using classes.
    When i hit a button, I want to display one pop window which gives me my internal table details and one more button in this popup window.
    Is it possible to call pop window with ALV using classes??
    Regards
    RH

    Use the following Methods:
        METHODS: lmt_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
                                       IMPORTING e_object
                                            e_interactive,
    ** Method for User Command
                 lmt_command FOR EVENT user_command OF cl_gui_alv_grid
                                       IMPORTING e_ucomm,
    FORM sub_create_toolbar USING uw_object
                                  TYPE REF TO cl_alv_event_toolbar_set
                                  uw_interactive TYPE char01.
      DATA: lw_stb_button TYPE stb_button.
      FIELD-SYMBOLS: <l_button> TYPE stb_button.
    ** Fill in the toolbar Button
      lw_stb_button-function  = 'IFLU'.
      lw_stb_button-icon      = icon_te_receipts.
      lw_stb_button-quickinfo = text-b01.
      lw_stb_button-text      = text-b01.
      INSERT lw_stb_button INTO uw_object->mt_toolbar INDEX 3.
      READ TABLE uw_object->mt_toolbar ASSIGNING <l_button> INDEX 1.
      IF sy-subrc = 0.
        <l_button>-butn_type = 1.
      ENDIF.
    ENDFORM.                    " sub_create_toolbar
    FORM sub_access_command USING uw_ucomm TYPE sy-ucomm.
      DATA: lt_row   TYPE lvc_t_row,
            lt_rowid TYPE lvc_t_roid,
            lw_count TYPE lvc_index.
      FIELD-SYMBOLS: <l_row> TYPE lvc_s_row.
    ** Get the Selected row to be displayed
      CALL METHOD gw_grid->get_selected_rows
      IMPORTING
        et_index_rows = lt_row
        et_row_no     = lt_rowid.
    ** User Command
      CASE uw_ucomm.
        WHEN 'IFLU'.
    ** Read the index from which the Document Flow was selected
          READ TABLE lt_row ASSIGNING <l_row> INDEX 1.
          IF sy-subrc = 0.
            PERFORM sub_get_detail USING <l_row>-index.
          ENDIF.
        WHEN c_detail1.
    ** Call the screen or the Function Module here to display the popup.
          PERFORM sub_show_detail USING abap_false.
        WHEN c_detail2.
          PERFORM sub_show_detail USING abap_true.
      ENDCASE.
    ENDFORM.                    " sub_access_command
    Hope That Helps
    Anirban M.

  • FM to display full header text in a pop up window

    1 . I have a ALV report which displays first line of a headr text for a perticular sales doc.
    if i click on a header text  i should see the complete header text for that particular sales doc. in a pop up window.
    is there any FM to do so .
    please repond quickly . its urgent
    i will award full points to all attempters.

    Hi,
    For your reference-
    Re: How to create POPUP windows (from ALV report)
    You can have a look at a standard program where pop-up functionality is used.
    BCALV_GRID_AND_POPUP
    <b>Reward Points if Helpful!!</b>

  • Display a document pdf in an external window (WD ABAP)

    Hi all,
    I have an application <u><b>Web dynpro Abap</b></u> and it adds articles in a alv component that it is a purchase basket.
    This alv has a user function what opens a document pdf (interactiveForm)
    that shows the lines of the order. I would like that this pdf be displayed in an <b>external window</b>, and it was  independent of the window of alv of the purchase basket.
    This is possible. If it is possible, how can I do it?
    Regards,
    Ana

    hi
    good
    go through these links, which ll help you to give a clear idea about creating of the external window.
    http://help.sap.com/saphelp_nw04s/helpdata/en/0f/134540631d6f13e10000000a1550b0/content.htm
    thanks
    mrutyun^

  • ALV table not displayed in Popup

    Hello Experts,
    I have created a view which contains an ALV table. This view is embedded in one window.
    I am opening this window on click of a button. I am reading data from one custom table and displaying it in ALV.
    The problem I am facing is that ALV displays the data the very first time window is opened. After closing the window if we again open the window the ALV table is not displayed.
    I have checked the code in debugging and values are coming in Node but not displayed. There is no visibility property attached to this ALV.
    Every thing was working fine until patching was applied. The same code is working fine in prod but in Dev I am facing this issue.
    Can any one you guys suggest me that why it is happening? Is it because of Patch upgrade  and is there any sap note to resolve this.
    Thanks in Advance
    Amit

    Hi Khandelwala,
    Is the entire ALV table disappearing? as it is a popup, the view will always be destroyed when the popup window is closed. It will be again recreated once the popup window is thrown again.
    However the component controller instance will not be freed and will exist.
    My guess is some plugs are being fired displaying empty view.
    Please let us know if it is only data that is disappearing.
    Just check the stack level of ur dev and production landscapes. If Dev is on higher version, then it might be due to patch.
    Thanks,
    Anand

  • Print ALV List

    Hi experts,
    T code ME2m   after executing i would like to print that sheet . with all coloms in A4 size paper.
    how can Increse size of LETTERS  and  colom and rows.
    after pressing PRINT icon  we will get pop up window(Print ALV List.
    then Output device -  Local
    number of copies1
    Print from page   1         1
    Then i  clicked   PROPERTIES  
    then i double clicked  PARAMETER VALUE     X_65_255
    then i selected  Format  radio button  then i selected  X_58_170..
    then i executed..
    that tiem system giving message   like
    System cannot print the last 176 columns of the
    report
    but i am not getting all the fealds in the page ?
    how to do configuration for this.
    Regards,
    Anthyodaya.

    In ME2N menu List --> Export document to word processing -> Create word document-> Start MS word.
    After downloading,Click F11,Save it as word document,Adjust page set up to Land Scape and also custom paper format
    to accommodate all fields in print.

  • ALV inside popup

    Hi!
    I create popup window with ALV grid inside it with method if_wd_window_manager->create_window.
    When the popup is shown for the first time everything is ok, but for the second and subsequent times the ALV disappears from the popup.
    Probably when the window is closed the ALV must be destroyed in some special way. Or may be there is other reason.
    Can anyone give an advice on this issue?

    Hi,
    Where are you writing the code to populate the ALV ??
    If you are writing the code in WDOINIT of the popup then it will show data only for the first time, since the WDOINT is called only once.
    Check that.
    Regards,
    Bharat

  • Calling screens in ALV

    hello all,
           i need to call screens like that of basic data of a particular material number selected from the secondary list of an ALV report. is it the same way as in an ordinary report that i have to proceed or is there other method.
       Do i have to put buttons in appln tool bar of secondary window of ALV report using set pf status or is there any other method???
    kindly advice.
    thanks in advance,
    seenu
    Message was edited by:
            srisri
    Message was edited by:
            srisri

    Hello,
    Define a local class as shown:
    CLASS lcl_eh DEFINITION.
    PUBLIC SECTION.
    DATA:ls_wa2_schd_lines TYPE ts_schd_lines,
    lv_flag,
    ls_toolbar TYPE stb_button,
    lt_selected_rows TYPE lvc_t_roid,
    ls_selected_row TYPE lvc_s_roid,
    lv_counter TYPE i VALUE 0.
    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.
    ENDCLASS. "lcl_eh DEFINITION
    CLASS lcl_eh IMPLEMENTATION.
    *METHOD: HANDLE_TOOLBAR
    *DESCRIPTION: This method provides the necessary detail required to
    create an extra button in the toolbar.
    METHOD handle_toolbar.
    CLEAR ls_toolbar.
    MOVE 'SELECT' TO ls_toolbar-function.
    MOVE 0 TO ls_toolbar-butn_type.
    MOVE 'SELECT' TO ls_toolbar-text.
    MOVE 'SELECT'  TO ls_toolbar-icon.
    MOVE 'SELECT'  TO ls_toolbar-quickinfo.
    APPEND ls_toolbar TO e_object->mt_toolbar.
    ENDMETHOD. "handle_toolbar
    *METHOD: HANDLE_USER_COMMAND
    METHOD handle_user_command.
    CASE e_ucomm.
    WHEN 'SELECT'  .
    CALL METHOD gv_alv->get_selected_rows
    IMPORTING
    ET_INDEX_ROWS =
    et_row_no = lt_selected_rows.
    READ TABLE lt_selected_rows INTO ls_selected_row INDEX 1 .
    READ TABLE gt_it_schd_lines INTO
    gs_wa_schd_lines INDEX<b> ls_selected_row-row_id.</b>
    You get the data of the row selected.Now call the screen
    Call screen 200.
    Before you call the method
    SET_TABLE_FOR_FIRST_DISPLAY,you need to set the handlers.
    CREATE OBJECT object_ref.
    SET HANDLER object_ref->handle_toolbar FOR gr_alvgrid.
    SET HANDLER object_ref->handle_user_command FOR gr_alvgrid.
    Now call the method SET_TABLE_FOR_FIRST_DISPLAY.
    regards,
    Beejal
    **Reward if this helps

  • How to Make BDC for transcation KKS1

    Hi dear,
    can any one tell me that how to make BDC for KKS1.
    because i have recorded the BDC and converted into the program logic than it is showing the first window but not showing the window with ALV and futher more. So what coding i have to apply.
    Please help.
    Siddarth Jain

    Hi,
    U can record the flow in using SHDB transaction recorder.
    U can record and it will generate the program, u can copy and paste the part of the code that is generated, in ur ALV report. this will call the transaction.
    Do as follows:
    <b>SHDB > New Recording > Specify Recording Name YTEST > Transaction code KKS1 > STRAT RECORDING BUTTON></b>
    then speciy the vales u want to give to run the transaction. U can save and come back as soon as u reach the screen when u want to stop it.
    EG:
    Declare a messtab
    DATA: i_bdcdata TYPE STANDARD TABLE OF bdcdata,
    * Internal table to hold BDC messages
    i_messtab TYPE STANDARD TABLE OF bdcmsgcoll
    * Work area to hold bdcdata value
    DATA: w_bdcdata TYPE bdcdata,
    * Work area to hold BDC messages
    w_messtab TYPE bdcmsgcoll.
    CONSTANTS : c_e type bdcmsgcoll-msgtyp value 'E', "E
    c_a type bdcmsgcoll-msgtyp value 'A', "A
    nodata type c value '/'. "/
    perform f1000_bdc_mm03 using lv_matnr lv_werks.
    FORM f1000_bdc_mm03 USING P_LV_MATNR
    P_LV_WERKS.
    perform bdc_dynpro using 'SAPLMGMM' '0060'.
    perform bdc_field using 'BDC_CURSOR'
    'RMMG1-MATNR'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'RMMG1-MATNR'
    p_lv_matnr.
    perform bdc_dynpro using 'SAPLMGMM' '0070'.
    perform bdc_field using 'BDC_CURSOR'
    'MSICHTAUSW-DYTXT(15)'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTR'.
    perform bdc_field using 'MSICHTAUSW-KZSEL(15)'
    'X'.
    perform bdc_dynpro using 'SAPLMGMM' '0080'.
    perform bdc_field using 'BDC_CURSOR'
    'RMMG1-WERKS'.
    perform bdc_field using 'BDC_OKCODE'
    '=ENTR'.
    perform bdc_field using 'RMMG1-WERKS'
    p_lv_werks.
    perform bdc_dynpro using 'SAPLMGMM' '4000'.
    perform bdc_field using 'BDC_OKCODE'
    '=ZU01'.
    perform bdc_field using 'BDC_CURSOR'
    'RMMG1-MATNR'.
    perform bdc_dynpro using 'SAPLMGMM' '4300'.
    perform bdc_field using 'BDC_OKCODE'
    '=ZU08'.
    perform bdc_field using 'BDC_CURSOR'
    'RMMG1-MATNR'.
    perform bdc_dynpro using 'SAPLMGMM' '4110'.
    perform bdc_field using 'BDC_OKCODE'
    '=GESV'.
    *perform bdc_field using 'BDC_CURSOR'
    * 'RMMG1-MATNR'.
    call transaction c_transaction_call_MM03 using i_bdcdata MODE 'N'MESSAGES INTO i_messtab.
    <b>Kindly close the previous threads opened by u.</b>
    Message was edited by: Judith Jessie Selvi

  • About mb51..

    Hi experts,
    there is a window layout window in mb51. Here ı mean the window of alv which is printed after clicking the detail list button. NOw ı need to add a field there. What is the related structure or view of that. Is there anyone knowing this or how to learn this.

    Hi,
    You can try through SAP configuration.
    Path: SPRO -> Materials Mgmt -> Inventory Mgmt & Pyhsyical Inv -> Reporting -> Define field selection for material document list.
    Otherwise you may want to copy program RM07DOCS to ZRM07DOCS and modify the code to include your own fields. Also you may want to create your your own transaction code let's say ZMB51. This way you can include any customer fields.
    For further details, you can refer SAP note:  357187
    Hope it helps......

  • Multiple ALV Grids on the same window.

    Hi,
    Can someone tell me if it's possible to display multiple ALV grids on the same window.If so how is it done.Please note that I am talking about Grid Display and not List Display.
    Regards,
    Swathi Balakrishnan

    Hi,
    This can be done even i have done a report.
    Its very simple create three containers as below.
    Just repeat three times if u need to create three containers.
    See this sample code using custom container.
    START-OF-SELECTION.
    Begin of process logic
      CALL SCREEN '0100'.
    END-OF-SELECTION.
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'STATUS01'.
      SET TITLEBAR 'SALESTTL'.
    A L V    G R I D
      IF o_grid_container IS INITIAL.
        CREATE OBJECT o_grid_container
          EXPORTING
            container_name = '<b>CCONTAINER1</b>'.
        CREATE OBJECT o_grid
          EXPORTING
            i_appl_events = 'X'
            i_parent = o_grid_container.
    <b>FOR first A L V    G R I D</b>
        PERFORM set_grid_field_catalog
                    CHANGING i_grid_fcat.
        PERFORM modify_grid_fcat_predisplay
                    CHANGING i_grid_fcat.
        PERFORM set_grid_layout_set
                    CHANGING struct_grid_lset.
        PERFORM sort_outtable CHANGING i_sort_fcat.
    PERFORM populate_grid_data  TABLES i_grid_outs i_grid_outs_pro.
        SORT i_grid_outs BY year month.
        CALL METHOD o_grid->set_table_for_first_display
          EXPORTING
            i_bypassing_buffer    =  space
            is_variant            =  ws_f_grid_disvar
            i_save                =  ws_c_grid_save
            is_layout             =  struct_grid_lset
          CHANGING
            it_outtab             =  i_grid_outs[]
            it_fieldcatalog       =  i_grid_fcat[]
            it_sort               =  i_sort_fcat.      " Period
      ENDIF.
      IF o_grid1_container IS INITIAL.
        CREATE OBJECT o_grid1_container
          EXPORTING
            container_name = '<b>CCONTAINER2</b>'.
        CREATE OBJECT o_grid1
          EXPORTING
            i_appl_events = 'X'
            i_parent = o_grid1_container.
    *<b> FOR SECOND ALV GRID</b>
        PERFORM set_grid1_field_catalog
                    CHANGING i_grid1_fcat.
        PERFORM modify_grid1_fcat_predisplay
                    CHANGING i_grid1_fcat.
        PERFORM set_grid1_layout_set
                    CHANGING struct_grid1_lset.
        PERFORM sort_outtable1 CHANGING i_sort_fcat1.
    PERFORM populate_grid1_data  TABLES i_grid1_outs i_grid1_outs_pro.
        SORT i_grid1_outs BY year month.
        CALL METHOD o_grid1->set_table_for_first_display
          EXPORTING
            i_bypassing_buffer    =  space
            is_variant            =  ws_f_grid_disvar
            i_save                =  ws_c_grid_save
            is_layout             =  struct_grid1_lset
          CHANGING
            it_outtab             =  i_grid1_outs[]
            it_fieldcatalog       =  i_grid1_fcat[]
            it_sort               =  i_sort_fcat1.      " Period
      ENDIF.
      IF o_grid2_container IS INITIAL.
        CREATE OBJECT o_grid2_container
          EXPORTING
            container_name = '<b>CCONTAINER3</b>'.
        CREATE OBJECT o_grid2
          EXPORTING
            i_appl_events = 'X'
            i_parent = o_grid2_container.
    <b>FOR THIRD ALV GRID</b>
        PERFORM set_grid2_field_catalog
                    CHANGING i_grid2_fcat.
        PERFORM modify_grid2_fcat_predisplay
                    CHANGING i_grid2_fcat.
        PERFORM set_grid2_layout_set
                    CHANGING struct_grid2_lset.
    PERFORM populate_grid2_data  TABLES i_grid2_outs i_grid2_outs_pro.
        SORT i_grid2_outs BY year month.
        PERFORM sort_outtable2 CHANGING i_sort_fcat2.
        CALL METHOD o_grid2->set_table_for_first_display
          EXPORTING
            i_bypassing_buffer    =  space
            is_variant            =  ws_f_grid_disvar
            i_save                =  ws_c_grid_save
            is_layout             =  struct_grid2_lset
          CHANGING
            it_outtab             =  i_grid2_outs[]
            it_fieldcatalog       =  i_grid2_fcat[]
            it_sort               =  i_sort_fcat2.      " Period
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE user_command_0100 INPUT.
    As the events are registered as application events, control is first
    passed to the program's PAI. The call 'cl_gui_cfw=>dispatch' will
    forward control to ABAP object event handling and the appropriate
    event handler will be called (if present). This allows the user to
    selectively process events.
      DATA: i_return_code TYPE i .
      CALL METHOD cl_gui_cfw=>dispatch
          IMPORTING return_code = i_return_code.
      save_ok = ok_code.
      CASE save_ok.
        WHEN 'BACK' OR 'END' OR 'CANC'.
          PERFORM exit_program.
      ENDCASE.
      CLEAR save_ok.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  EXIT_PROGRAM
          text
    FORM exit_program.
      CALL METHOD o_grid_container->free.
      CALL METHOD o_grid1_container->free.
      CALL METHOD o_grid2_container->free.
      CALL METHOD cl_gui_cfw=>flush.
      IF sy-subrc NE 0.
        Error in FLush
      ENDIF.
      LEAVE TO SCREEN 0.
    ENDFORM.                  " EXIT_PROGRAM
    If u want get more idea revert back to me.
    Thanks & Regards,
    Judith.

  • Creating pop up window for data display in ALV

    Friends,
    I need to display my data in alv popup window from there I have to select a row and display the data in new popup window. For this purpose I had written this fuction. It's working fine But I don't know how to select row from this and display data in new popup window.  when I am displaying data in alv grid ,then I am  able to display data in POPUP window after selecting a row from grid  but dont know how to jump from one pop up window to another.
    form output_alv.
    CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
      EXPORTING
        I_TITLE                       = 'SALES ORDER INFO'
        I_ZEBRA                       = 'X'
        I_TABNAME                     = 1
        I_STRUCTURE_NAME              = 'VBAK'
      TABLES
        T_OUTTAB                      = it_vbak
       EXCEPTIONS
         PROGRAM_ERROR                 = 1
         OTHERS                        = 2.
    endform.

    The following code may be of some help:
    DATA: BEGIN OF it_prmhlp OCCURS 0.
            INCLUDE STRUCTURE zaltab_param.
    DATA: flg(1) TYPE c,
          END OF it_prmhlp.
      DATA: wreturn LIKE ddshretval OCCURS 0 WITH HEADER LINE,
        wstep LIKE sy-stepl.
      DATA wsel1 VALUE 'X'. wsel1 = 'X'.
      TYPE-POOLS : slis.
      DATA : listtitle(30),
             l_lines     LIKE sy-tabix,
             ls_fldcat   TYPE slis_fieldcat_alv,
             lt_fldcat   TYPE slis_t_fieldcat_alv,
             ls_selfield TYPE slis_selfield.
      progname = sy-repid.
      dynnum   = sy-dynnr.
      DEFINE fldcat_add1.
        ls_fldcat-fieldname     = &1.
        ls_fldcat-ref_tabname   = &2.
        ls_fldcat-ref_fieldname = &3.
        ls_fldcat-reptext_ddic  = &4.
        ls_fldcat-outputlen     = &5.
        append ls_fldcat to lt_fldcat.
      END-OF-DEFINITION.
      REFRESH : lt_fldcat.
      fldcat_add1 'AUREL' 'ZALTAB_PARAM' 'AUREL' 'Alloc Table Relevancy' '25'.
      fldcat_add1 'PDESC' 'ZALTAB_PARAM' 'PDESC' 'Process Description' '40'.
      REFRESH it_prmhlp. CLEAR it_prmhlp.
      SELECT * FROM zaltab_param
        INTO TABLE it_prmhlp
        WHERE tcode = sy-tcode.
      SORT it_prmhlp BY aurel pdesc.
      listtitle = 'Allocaction Table Relvancy Selection'.
      CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
           EXPORTING
                i_title                 = listtitle
                i_selection             = wsel1
                i_zebra                 = ' '
                i_checkbox_fieldname    = 'FLG'
                i_tabname               = 'IT_PRMHLP'
                it_fieldcat             = lt_fldcat
           TABLES
                t_outtab                = it_prmhlp
           EXCEPTIONS
                program_error           = 1
                OTHERS                  = 2
      DATA wfl1. CLEAR wfl1.
      LOOP AT it_prmhlp.
        IF it_prmhlp-flg = 'X'.
          IF wfl1 = 'X'.
            CLEAR it_prmhlp. REFRESH it_prmhlp.
            MESSAGE i000(yw) WITH 'Only 1 entry can be selected...'.
            EXIT.
          ENDIF.
          wfl1 = 'X'.
        ENDIF.
      ENDLOOP.
      IF wsel1 = 'X'.
        READ TABLE it_prmhlp WITH KEY flg = 'X'.
        IF sy-subrc EQ 0.
          paurel = it_prmhlp-aurel.
          paureltx = it_prmhlp-pdesc.
          wvariant = it_prmhlp-zvariant.
          PERFORM update_screen.
        ELSE.
          CLEAR it_prmhlp. REFRESH it_prmhlp.
        ENDIF.
      ENDIF.
    The trick lies in using the box fieldname which is 'FLG' in this case and the wsel1 param passed to the fm to know whether any row is selected or not.

Maybe you are looking for