Can we have two alv grid in the output

Hi
Can we have two alv grid in the output?. If yes how can we do that using oops alv. I think first need to create the container on that two subscreen. is this correct? Thanks.
Regards
Raj

>
Rajitha1234 wrote:
> Hi
>
>  Can we have two alv grid in the output?. If yes how can we do that using oops alv. I think first need to create the container on that two subscreen. is this correct? Thanks.
>
> Regards
> Raj
Hi Rajitha,
You can have as many as ALV output in the screen By using OOPS.
By using Container you can pass ALV output.
see the sample Program SALV_TEST_TABLE.
Regards,
Prabhudas

Similar Messages

  • Can you have two detail lists from the basic list at the same time?

    Hi
    Can you have two detail lists from the basic list at the same time?
    If yes how and if no why?
    Thanks
    Venkat

    No   ... it is not   possible   of   2 detail  list at   one time   from the basic  list ...
    you can  increament   the SY-LSIND  .... But you can not   display  both the windows   at single time  ...
    it is  possible  to  display  2 Detail list  in ALV   ......  from one  basic  list   using  the  Blocked  list  concept    .
    Sample Program on BLOCK LISTS
    Report   zblock_list
    * Declarations for BLOCK ALV DISPLAY
    *--type pools
    TYPE-POOLS:slis.
    DATA:x_layout TYPE slis_layout_alv,
    t_field TYPE slis_t_fieldcat_alv,
    *--field catalog
    x_fldcat LIKE LINE OF t_field,
    *--to hold all the events
    t_events TYPE slis_t_event,
    x_events TYPE slis_alv_event,
    t_sort TYPE slis_t_sortinfo_alv,
    x_sort LIKE LINE OF t_sort ,
    *--Print Layout
    x_print_layout TYPE slis_print_alv.
    *----Macro to add field catalog.
    *field "text "length "tech "COL_POS "DATATYPE "DDIC_OUTPUTLEN
    DEFINE add_catalog.
    clear x_fldcat.
    x_fldcat-fieldname = &1.
    x_fldcat-seltext_m = &2.
    x_fldcat-outputlen = &3.
    x_fldcat-tech = &4.
    x_fldcat-col_pos = &5.
    x_fldcat-no_zero = 'X'.
    x_fldcat-ddictxt = 'M'.
    x_fldcat-datatype = &6.
    x_fldcat-ddic_outputlen = &7.
    if &6 = 'N'.
    x_fldcat-lzero = 'X'.
    endif.
    *--build field catalog
    append x_fldcat to t_field.
    END-OF-DEFINITION.
    *----- data declerations.
    data: v_repid like sy-repid.
    data: begin of itab occurs 0,
    matnr like mara-matnr,
    ernam like mara-ernam,
    meins like mara-meins,
    end of itab.
    data: begin of jtab occurs 0,
    matnr like makt-matnr,
    maktx like makt-maktx,
    end of jtab.
    select matnr ernam meins
    up to 20 rows
    from mara
    into table itab.
    select matnr maktx
    up to 20 rows
    from makt
    into table jtab.
    v_repid = sy-repid.
    *DISPLAY alv
    * Initialize Block
    call function 'REUSE_ALV_BLOCK_LIST_INIT'
    exporting
    i_callback_program = v_repid.
    *Block 1:
    *INITIALIZE
    refresh t_field. clear t_field.
    refresh t_events.
    *field "text "length "tech "COL_POS "DATATYPE "DDIC_OUTPUTLEN
    add_catalog:
    'MATNR' 'Material' '18' '' '1' 'C' '18',
    'ERNAM' 'Created By' '12' '' '2' 'C' '12',
    'MEINS' 'Unit' '5' '' '3' 'C' '3'.
    *--build table for events.
    x_events-form = 'TOP_OF_LIST1'.
    x_events-name = slis_ev_top_of_list.
    append x_events to t_events.
    call function 'REUSE_ALV_BLOCK_LIST_APPEND'
    exporting
    is_layout = x_layout
    it_fieldcat = t_field
    i_tabname = 'ITAB'
    it_events = t_events
    it_sort = t_sort
    tables
    t_outtab = itab
    exceptions
    program_error = 1
    maximum_of_appends_reached = 2
    others = 3.
    if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.
    *--BLOCK 2(SUMMARY REPORT)
    *INITIALIZE
    refresh t_field. clear t_field.
    refresh t_events.
    *field "text "length "tech "COL_POS "DATATYPE "DDIC_OUTPUTLEN
    add_catalog:
    'MATNR' 'Material' '20' '' '1' 'C' '18',
    'MAKTX' 'Description' '40' '' '2' 'C' '40'.
    *--build table for events.
    x_events-form = 'TOP_OF_LIST2'.
    x_events-name = slis_ev_top_of_list.
    append x_events to t_events.
    * Append table block.
    call function 'REUSE_ALV_BLOCK_LIST_APPEND'
    exporting
    is_layout = x_layout
    it_fieldcat = t_field
    i_tabname = 'JTAB'
    it_events = t_events
    tables
    t_outtab = jtab
    exceptions
    program_error = 1
    maximum_of_appends_reached = 2
    others = 3.
    if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.
    *--CALL FM TO DISPLAY THE BLOCK REPORT.
    call function 'REUSE_ALV_BLOCK_LIST_DISPLAY'
    * exporting
    * is_print = x_print_layout
    exceptions
    program_error = 1
    others = 2.
    if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.
    form top_of_list1.
    skip 1.
    write: 10 'List 1',
    /5 '--------------------'.
    skip 1.
    format reset.
    endform.
    form top_of_list2.
    skip 1.
    write: 10 'List 2',
    /5 '--------------------'.
    skip 1.
    format reset.
    endform.
    reward  points if it is  usefull ....
    Girish

  • Can you have two itunes accounts on the same computer?

    Can you have two itunes accounts on the same computer and if so how do you access them without syncing each others music?

    Yes. Use separate iTunes libraries(launch iTunes with the Shift(Windows) or Option(Mac OS X) key held down as needed), or different user accounts on the computer.
    (100648)

  • Can you have two slides shows on the one interactive page?

    I'm just new at learning interactive pdfs in indesign so sorry if this is common knowledge. I know how to create a slide show on a page, but can you have two slide shows on the one page or more for that matter? (Ideally I need 3.) Each slide show has its own set of images and buttons.

    Just :http://www.youtube.com/watch?v=Dm0aeMUPZ4U
    But I'm happy to create them a different way if needed be.

  • How can I have two PDFs open at the same time next to each other?

    How can I have two PDFs open at the same time next to each other?

    Moved to Adobe Reader for iOS.
    The only way I know how to do that is with two iPads.

  • HT201320 Both of my kids have an iPod Touch.  Can I have two iPods registered on the same email account or do I have to create a new email account for the second one?

    Both of my kids have an iPod Touch.  Can I have two iPods registered on the same email account or do I have to create a new email account for the second one?

    There is some info in this discussion.
    https://discussions.apple.com/thread/6024120?tstart=0

  • How can I get the selected rows from two ALV grids at the same time?

    I have a program that uses two ALV grids in one dialog screen. I'm using the OO ALV model (SALV* classes).
    The user can select any number of rows from each grid. Then, when a toolbar pushbutton is pressed, I'd have to retrieve the selected rows from both grids and start some processing with these rows.
    It is no problem to assign event handlers to both grids, and use the CL_SALV_TABLE->GET_SELECTIONS and CL_SALV_SELECTIONS->GET_SELECTED_ROWS methods to find out which rows were marked by the user. Trouble is, this only works when I raise an event in each grid separately, for instance via an own function that I added to the grid's toolbar. So, I can only see the selected rows of the same grid where such an event was raised.
    If I try to do this in the PBO of the dialog screen (that contains the two grids), the result of CL_SALV_SELECTIONS->GET_SELECTED_ROWS will be empty, as the program does not recognize the marked entries in the grids. Also, an event for grid1 does not see the selected rows from grid2 either.
    As it is right now, I can have an own button in both grid's toolbar, select the rows, click on the extra button in each grid (this will tell me what entries were selected per grid). Then, I'd have to click on a third button (the one in the dialog screen's toolbar), and process the selected rows from both grids.
    How can I select the rows, then click on just one button, and process the marked entries from both grids?
    Is it somehow possible to raise an event belonging to each grid programmatically, so that then the corresponding CL_SALV_SELECTIONS->GET_SELECTED_ROWS will work?
    Thanks.

    Hello Tamas ,
    If I try to do this in the PBO of the dialog screen (that contains the two grids), the result of CL_SALV_SELECTIONS->GET_SELECTED_ROWS will be empty, as the program does not recognize the marked entries in the grids. Also, an event for grid1 does not see the selected rows from grid2 either.--->
    is it possible to  have a check box in each grid  & get the selected lines in PAI of the screen ?
    regards
    prabhu

  • Can you have two Enterprise CA on the same AD Domain at the same time

    Hello
    Can someone please help me with the following question
    If I have a Windows 2003 R2 Enterprise Root CA on the AD Domain can I also Add a separate Windows 2012 R2 Enterprise Root CA to the same domain.
    We do not use Autoenrollment on the existing 2003 R2 CA.
    Network guys want to introduce a Cisco BYOD (Bring Your Own Devise) solution using Cisco ISE (Identity Services Engine) which uses SCEP/NDES and therefore need certificates from CA. The thing is the ISE recommend 2008 AD CS as a minimum
    Therefore I wonder if Installing a 2012 R2 Root CA that only provides certificates via the NDES/ISE solution would be a possibility. 
    I understand the Root CA Cert is held in a container under the 'Configuration' partition in Active Directory. Therefore can you have Two Root CA certs in the AD container at the same time for the same AD Domain/Forest?
    The idea would then be to migrate other services to the new CA and phase out the old 2003 R2 CA over time.
    Thanks All
    AAnotherUser__
    AAnotherUser__

    On Thu, 18 Sep 2014 09:18:43 +0000, AAnotherUser wrote:
    Therefore can you have Two Root CA certs in the AD container at the same time for the same AD Domain/Forest?
    Yes.
    Paul Adare - FIM CM MVP
    You are trapped in a maze of screens and ssh sessions all alike.
    It is dark, and you are likely to log off the wrong account. -- Nep

  • Can you have two iTunes accounts on the same desktop PC?

    I have an iPad 3 and my wife has an iPad 2 from her work. We have a desktop PC which we wish to use to sync the iPads to. We have separate user accounts on the PC. Can we have separate iTunes accounts on the PC?  We will we be able to share music, pictures, etc.?

    Yes. Use separate iTunes libraries(launch iTunes with the Shift(Windows) or Option(Mac OS X) key held down as needed), or different user accounts on the computer.
    (100648)

  • Two ALV Grid in the same screeen

    Hi,
      I have created a module pool with a screen.
    In this screen I have defined two customer objects and I dipslay two different ALV grid.
    DATA: grid_1         TYPE REF TO cl_gui_alv_grid,
              grid_2         TYPE REF TO cl_gui_alv_grid.
    When the user puts the values into the field in both lists and pushes "enter", the program gets the input value by method
    "get_selected_rows". It works only for the list where there is the cursor.
    I need to read the value of each list at the same moment.
    Thanks in advance
    Marco

    *& Report  Z7CC_ALV_OOPS_TWO_ALV_SCREENS                               *
    report  z7cc_alv_oops_two_alv_screens           .
    * TEMP DECLARATION TYPE DECLARATIONS
    * Structure for Sales Order
    types: begin of y_vbak      ,
    vbeln type vbeln_va ,
    end of y_vbak        ,
    * Structure for Sales Order Details.
    begin of y_vbap           ,
    vbeln type vbeln_va    ,
    posnr type posnr_va    ,
    matnr type matnr       ,
    charg type charg_d     ,
    arktx type arktx       ,
    end of y_vbap             ,
    *& Structure of line item ----------
    begin of  y_po_item,
    ebeln type ekko-ebeln, " PO NUMBER
    ebelp type ekpo-ebelp,  "LINE ITEM
    matnr like ekpo-matnr,  " Material Number
    netpr like ekpo-netpr,  " Price per unit.
    menge like ekpo-menge,  " Purchase order quantity.
    netwr like ekpo-netwr,  " Net order in Purchase order currency
    meins like ekpo-meins,  " UOM
    end of y_po_item.
    data: t_y_po_item type standard table of y_po_item.
    data:  w_container_1        type ref to cl_gui_container        .
    data: t_vbap      type standard table of y_vbap.
    *--------- END OF TEMP DECLARATION ------------
    data: ok_code like sy-ucomm.
    *-- Global data definitions for ALV
    *--- ALV Grid instance reference
    data gr_alvgrid type ref to cl_gui_alv_grid .
    *--- Name of the custom control added on the screen
    data gc_custom_control_name type scrfname value 'Z7CC_ALV2' .
    *--- Custom container instance reference
    data gr_ccontainer type ref to cl_gui_custom_container .
    *--- Field catalog table
    data gt_fieldcat type lvc_t_fcat .
    data gt_fieldcat_2 type lvc_t_fcat .
    *--- Layout structure
    data gs_layout type lvc_s_layo .
    *&------- DECLARATION FOR THE NEXT SCREEN ------------------
    *--- ALV Grid instance reference
    data gr_alvgrid_2 type ref to cl_gui_alv_grid .
    *--- Name of the custom control added on the screen-----------
    data gc_custom_control_name_2 type scrfname value 'Z7CC_ALV' .
    *--- Custom container instance reference
    data gr_ccontainer_2 type ref to cl_gui_custom_container .
    *Declare your internal table which is supposed to hold the list data.
    *&Let’s name it “gt_list”.
    *Here is an example declaration.
    *--- Internal table holding list data
    data begin of gt_list occurs 0.
    data   matnr like mara-matnr.
    data   maktx like makt-maktx.
    data end of gt_list .
    data: begin of gt_list_2 occurs 0.
    include structure  z7cc_po_header.
    data: linecolor(4) type c, "Color for corresponding line
    end of gt_list_2.
    data: t_gt_list_2   type standard table of z7cc_po_header.
    *----- CLASS DECLARATION ------
    * FIELD-SYMBOLS
    field-symbols <fs_vbap> type y_vbap.
    field-symbols <fs_gt_list_2> type z7cc_po_header.
    class lcl_event_receiver definition deferred.
    data w_event_receiver type ref to lcl_event_receiver.
    * Creating a class definition for handling events on the ALV Grid.
    class lcl_event_receiver definition.
    public section.
    methods: handle_top_of_page for event top_of_page
    of cl_gui_alv_grid
    importing e_dyndoc_id,
    handle_hotspot_click for event hotspot_click
    of cl_gui_alv_grid
    importing e_row_id,
    handle_toolbar_event for event toolbar
    of cl_gui_alv_grid
    importing e_object,
    handle_user_command  for event user_command
    of cl_gui_alv_grid
    importing e_ucomm.
    endclass.                    "lcl_event_receiver  DEFINATION
    * Implementing the Class for handling events on the ALV Grid.
    class lcl_event_receiver implementation.
    method handle_top_of_page.
    perform show_top_of_page using e_dyndoc_id   w_container_1.
    endmethod.                    "handle_top_of_page
    method handle_hotspot_click.
    perform show_hotspot_click_details using e_row_id.
    endmethod.                    "lcl_event_receiver
    method handle_toolbar_event.
    perform create_alv_toolbar using e_object.
    endmethod.                    "handle_toolbar_event
    method handle_user_command.
    perform handle_user_command using e_ucomm.
    endmethod.                    "handle_user_command
    endclass.                    "lcl_event_receiver IMPLEMENTATION
    data:   w_grid               type ref to cl_gui_alv_grid         .
    *-------- END OF CLASS DECLARATION -------------
    start-of-selection.
    perform populate_table.
    call screen 100.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    module status_0100 output.
    set pf-status 'Z7CC_ALV1'.
    *  SET TITLEBAR 'xxx'.
    endmodule.                 " STATUS_0100  OUTPUT
    *&      Module  DISPLAY_ALV  OUTPUT
    *       text
    module display_alv output.
    perform display_alv.
    endmodule.                 " DISPLAY_ALV  OUTPUT
    *&      Form  POPULATE_TABLE
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form populate_table .
    select ebeln ebelp matnr  netpr menge netwr meins into corresponding fields of table t_y_po_item
    from ekpo.
    select ekko~ebeln ekko~bukrs ekko~aedat ekko~ernam
    ekko~lifnr ekko~zterm ekko~angnr  into corresponding fields of
    table t_gt_list_2    from ekko .
    endform.                    " POPULATE_TABLE
    *&      Form  DISPLAY_ALV
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form display_alv .
    if gr_alvgrid is initial .
    perform create_first_obj_container.
    *&----------- ONE MORE CONTROL ON THE SCREEN-------------------
    perform create_second_obj_container.
    " DISPLAY_ALV
    *   Creating ALV Grid instance
    perform create_first_alvgrid.
    perform create_second_alvgrid.
    *  PERFORM FIELD_CATALOG.  " CREATE A FIELD CATALOG.
    perform field_cat changing gt_fieldcat.
    perform field_cat_1 changing gt_fieldcat_2.
    *----Here will be additional preparations
    *--e.g. initial sorting criteria, initial filtering criteria, excluding
    *--functions
    perform call_mthd_display_both_grid.
    *&---------  create a field catalog.------------
    perform event_handling.
    else.
    *&-----------CALL ALV GRID REFRESH  TABLE DISPLAY
    perform call_mthd_alv_refresh.
    endif.
    endform.                    "DISPLAY_ALV
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    module user_command_0100 input.
    endmodule.                 " USER_COMMAND_0100  INPUT
    *&      Form  EXIT_PROGRAM
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form exit_program .
    leave program.
    endform.                    " EXIT_PROGRAM
    *&      Module  PAI  INPUT
    *       text
    module pai input.
    case ok_code.
    when '&EXT'.
    perform exit_program.
    when others.
    *     do nothing
    endcase.
    clear ok_code.
    endmodule.                 " PAI  INPUT
    *&      Form  CREATE_FIRST_OBJ_CONTAINER
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form create_first_obj_container .
    create object gr_ccontainer
    exporting
    container_name              = gc_custom_control_name
    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.                    " CREATE_FIRST_OBJ_CONTAINER
    *&----------------------------------------

  • How can i validate on ALV grid for the user

    Dear Freinds,
                     I have developed one custom report using ALV Grid program , as per the requirement i have to enter on the
    data and when i press the value save the program sumits the data into my custom table . Till here every thing is fine
    but one particular field i have declared as Char1 in my internal table , on the ALV output it is allowing me to enter
    more than one character   eg : it is allowing me to enter as Hyderabad .........even though i have declared as char 1 in the internal table ....however it is saving in the database table as H only that is correct.......but it is giving confusion to user
    i want to validate that user shouldnt allow to enter more than one character in the alv output of the input field .
    Please could any one let me know how can i validate.
    regard
    divya

    Hi,
    check  that field length in the final internal table .
    might be that filed lenth in final internal table declartion is more than 1 char.
    regards,
    Rama reddy
    Edited by: ram reddy on Jul 15, 2009 7:57 AM

  • Can I have two ipod libraries on the same computer?

    Can I set up two separate ipods on the same computer?  If so, how?  I have one set up now, and I want to add another one.

    Click here for options.
    (58016)

  • Can I have two itunes libraries on the same computer?

    Please see subject line, we now have two ipods in the house but only one computer, and one of the ipods is alot smaller than the other.
    I f you can help it would be good
    Thanks

    This should help:
    How to use multiple iPods with one computer

  • Can i have two apple tv on the same home sharing imac

    I have apple tv in the living roon which i stream movies from imac via home sharing. Can i use another apple tv on the home sharing, use them both at the same time without any problems.

    Winston, what sort of set up do you have for 10 apple tvs? - I currently have 2 and cannot stream different movies successfully at the same time to both of them from a single macbook pro. I am looking at upgrading to a system with a macbook mini or server streaming different content to 3-5 apple tvs. Currently all streaming is on the same channel and via 2 airport extremes and a new express. Still finding the system very very slow.

  • Can I have two time capsules on the same network

    Is it possible to have two TC on the same network, I have a 500Gb 1st Gen TC which I have replaced with a 2TB 4th Gen TC but still want to use the 500Gb. Is this possible and how do you set up?
    Thanks

    How do you want to use the old one? Is it simply for storing random files? I assume random files right that you wish to access/store/delete/share? If thats the case, just plug it in without connecting to anything.
    You simply would connect to it this way - "Finder/Go/Connect to Server/10.0.1.1
    You'll need to click the "+" sign after you enter that addy. Or better yet, go into the airport utilty for that device and assign it a special ip addy. That will make it easy to identify. Then follow those same steps. Viola, you will see the device in your finder and access it just like a portable drive but on a network instead.

Maybe you are looking for