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
*&----------------------------------------

Similar Messages

  • 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

  • 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.

  • 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

  • Report with two ALV grids and a header

    Hi experts,
    I have a report with two ALV grids in the same screen, each one in a separated container. The information displays it correctly. The report has been implemented by using OO Programming.
    My real trouble is in the header. It must have a logo, a title with a specific font and other information.
    I'll attach a capture of my need:
    [Report with two ALV grids and a header|http://picasaweb.google.com/lh/photo/AcQD49QPmm-0L_jL2iMedA?feat=directlink]
    Then, I want to set up the header you can see, with logo, a font with specific features. Obviously, the header you see has taken from another report. But is the same idea.
    I've tried with a third container, using the CL_GUI_CONTAINER and CL_GUI_CONTAINER classes, but it doesn't work.
    Any idea? Would welcome any help you can provide.
    Thanks in advance,
    Jorge Rojas

    Hi, Jorge.
    Should the header be a"attached" to any of the ALV? Or it should be carried alone?
    If first applies, you've given the solution yourself: put the info & logo in first ALV's header and invoke it from the proper method.
    You could use CL_GUI_DOCKING_CONTAINER CLASS to divide screen in several containers and then, in the upper one, I would create another one docking container to divide the screen into two: the written info could be performed with an HTML viewer class and the logo with a CL_GUI_PICTURE element.
    Cheers.

  • TWO or more alv's on the same screen

    hi
    My requirement is to display more than one table  say ITAB AND JTAB in two different alv with their own FIELD CATALOGSon the same screeen.
    I tried code i got on SDN but its not working .
    can anyone provide me the code with function modules i need to use over here.

    hi aditya as you asid i have already written the code as shown.
    its giving me dump.
    Error : Field symbol has not yet been assigned.
    Trigger Location of Runtime Error
        Program                                 SAPLKKBL
        Include                                 LKKBLF99
        Row                                     2,796
        Module type                             (FORM)
        Module Name                             GEN_FIELD_OUT2
    My code is :
    REPORT  ZALV_2LIST.
    tables: kna1,lfa1.
    select-options : cust for kna1-kunnr,
    vendor for lfa1-lifnr.
    data : begin of itab occurs 0,
    lifnr like lfa1-lifnr,
    land1 like lfa1-land1,
    name1 like lfa1-name1,
    end of itab.
    data : begin of jtab occurs 0,
    kunnr like kna1-kunnr,
    land1 like kna1-land1,
    name1 like kna1-name1,
    end of jtab.
    type-pools : slis.
    data :kna1_b type slis_t_fieldcat_alv,
          FIELDCATALOG1 TYPE SLIS_T_FIELDCAT_ALV , "SLIS_T_FIELDCAT_ALV
          WA_FIELDCAT LIKE LINE OF FIELDCATALOG1,
          FIELDCATALOG2 TYPE SLIS_T_FIELDCAT_ALV ,"WITH HEADER LINE,
    layout type slis_layout_alv,
    layout1 type slis_layout_alv,
    layout2 type slis_layout_alv,
    events_b type slis_t_event.
    data : repid like sy-repid.
    repid = sy-repid.
    select lifnr land1 name1 from lfa1 into table itab where lifnr in vendor.
    select kunnr land1 name1 from kna1 into table jtab where kunnr in cust.
    *field catalofg for 1st alv
      WA_FIELDCAT-FIELDNAME = 'lifnr'.
      WA_FIELDCAT-SELTEXT_M = 'vendor'.
      WA_FIELDCAT-COL_POS = 1.
      WA_FIELDCAT-OUTPUTLEN = 20.
      APPEND WA_FIELDCAT  TO FIELDCATALOG1.
      CLEAR WA_FIELDCAT.
    WA_FIELDCAT-FIELDNAME = 'land1'.
    WA_FIELDCAT-SELTEXT_M = 'address'.
      WA_FIELDCAT-COL_POS = 2.
      WA_FIELDCAT-OUTPUTLEN = 20.
      APPEND WA_FIELDCAT TO FIELDCATALOG1.
      CLEAR WA_FIELDCAT.
    WA_FIELDCAT-FIELDNAME = 'name1'.
      WA_FIELDCAT-SELTEXT_M = 'name'.
      WA_FIELDCAT-COL_POS = 3.
      WA_FIELDCAT-OUTPUTLEN = 20.
      APPEND WA_FIELDCAT TO FIELDCATALOG1.
      CLEAR WA_FIELDCAT.
    *field catalog for 2nd alv
      WA_FIELDCAT-FIELDNAME = 'kunnr'.
      WA_FIELDCAT-SELTEXT_M = 'customer'.
      WA_FIELDCAT-COL_POS = 1.
      WA_FIELDCAT-OUTPUTLEN = 20.
      APPEND WA_FIELDCAT  TO FIELDCATALOG2.
      CLEAR WA_FIELDCAT.
    WA_FIELDCAT-FIELDNAME = 'land1'.
    WA_FIELDCAT-SELTEXT_M = 'address'.
      WA_FIELDCAT-COL_POS = 2.
      WA_FIELDCAT-OUTPUTLEN = 20.
      APPEND WA_FIELDCAT TO FIELDCATALOG2.
      CLEAR WA_FIELDCAT.
    WA_FIELDCAT-FIELDNAME = 'name1'.
      WA_FIELDCAT-SELTEXT_M = 'name'.
      WA_FIELDCAT-COL_POS = 3.
      WA_FIELDCAT-OUTPUTLEN = 20.
      APPEND WA_FIELDCAT TO FIELDCATALOG2.
      CLEAR WA_FIELDCAT.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
      EXPORTING
        I_CALLBACK_PROGRAM             = sy-cprog
      I_CALLBACK_PF_STATUS_SET       = ' '
      I_CALLBACK_USER_COMMAND        = ' '
      IT_EXCLUDING                   =
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
      EXPORTING
        IS_LAYOUT                        = LAYOUT1
        IT_FIELDCAT                      = FIELDCATALOG1
        I_TABNAME                        = 'ITAB'
        IT_EVENTS                        = EVENTS_B
      IT_SORT                          =
      I_TEXT                           = ' '
      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.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
      EXPORTING
        IS_LAYOUT                        = LAYOUT1
        IT_FIELDCAT                      = FIELDCATALOG2
        I_TABNAME                        = 'jTAB'
        IT_EVENTS                        = EVENTS_B
      IT_SORT                          =
      I_TEXT                           = ' '
      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 FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'.
    *WRITE:'AAA'.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK             = ' '
      IS_PRINT                      = ' '
      I_SCREEN_START_COLUMN         = 5
      I_SCREEN_START_LINE           = 5
      I_SCREEN_END_COLUMN           = 0
      I_SCREEN_END_LINE             = 0
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER       =
      ES_EXIT_CAUSED_BY_USER        =
    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.
    can anyone point out where the error is?

  • Two ALV Grids in a single screen are overlapping eachother

    Hi,
    I have created two ALV grids in a single screen. I have used seperate containers for them.
    But on executing them , both the ALV grids are overlapping eachother.
    Please give me a solution.

    Hi,
      IF w_custom_container IS INITIAL.
    Creating Object for the Custom Container.
        CREATE OBJECT w_custom_container
          EXPORTING
            container_name              = w_container
          EXCEPTIONS
            cntl_error                  = 1
            cntl_system_error           = 2
            create_error                = 3
            lifetime_error              = 4
            lifetime_dynpro_dynpro_link = 5
            OTHERS                      = 6.
        CASE sy-subrc.
          WHEN 1.
            MESSAGE e054.  "CNTL ERROR
          WHEN 2.
            MESSAGE e055.  "CNTL SYSTEM ERROR
          WHEN 3.
            MESSAGE e056.  "CREATE ERROR
          WHEN 4.
            MESSAGE e057.  "LIFETIME ERROR
          WHEN 5.
            MESSAGE e058.  "LIFETIME DYNPRO DYNPRO LINK
        ENDCASE.
    Creating object for the Splitter Container.
        CREATE OBJECT w_split_container
          EXPORTING
            parent            = w_custom_container
            orientation       = 0
            sash_position     = 30
            with_border       = 2
          EXCEPTIONS
            cntl_error        = 1
            cntl_system_error = 2
            OTHERS            = 3.
        CASE sy-subrc.
          WHEN 1.
            MESSAGE e054. "CNTL_ERROR
          WHEN 2.
            MESSAGE e055. "CNTL_SYSTEM_ERROR
        ENDCASE.
    Creating Grid Control.
        CREATE OBJECT w_grid1
          EXPORTING
            i_parent = w_split_container->top_left_container.
        CREATE OBJECT w_grid2
          EXPORTING
            i_parent = w_split_container->bottom_right_container.
    Building field catalog for ALV.
    Fieldcat for the Detail Record.
        PERFORM build_fieldcat        USING:  c_1 c_code c_output c_check
                                              c_comcode c_olength,
                                              c_2 c_fileno c_output c_check
                                              c_filenum c_olength,
                                              c_3 c_dedcod c_output c_check
                                              c_dedcode c_olength,
                                              c_4 c_dedfac c_output c_check
                                              c_dedf c_olength.
    FieldCatlog for the Error Records.
        PERFORM build_fieldcat_error  USING:  c_1 c_pernr c_error c_check
                                              c_person c_olength,
                                              c_2 c_desc c_error c_check
                                              c_descp c_olength.
    ALV Display.
        CALL METHOD w_grid1->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                     =
       is_print                      =
       it_special_groups             =
       it_toolbar_excluding          =
       it_hyperlink                  =
       it_alv_graphics               =
       it_except_qinfo               =
       ir_salv_adapter               =
          CHANGING
            it_outtab                     = t_error
            it_fieldcatalog               = t_fieldcat_error
       it_sort                       =
       it_filter                     =
          EXCEPTIONS
            invalid_parameter_combination = 1
            program_error                 = 2
            too_many_lines                = 3
            OTHERS                        = 4
        CASE sy-subrc.
          WHEN 1.
            MESSAGE e076. "invalid parameter combination
          WHEN 2.
            MESSAGE e001. "program error
          WHEN 3.
            MESSAGE e078. "too many lines
        ENDCASE.
        CALL METHOD w_grid2->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                     =
       is_print                      =
       it_special_groups             =
       it_toolbar_excluding          =
       it_hyperlink                  =
       it_alv_graphics               =
       it_except_qinfo               =
       ir_salv_adapter               =
          CHANGING
            it_outtab                     = t_output
            it_fieldcatalog               = t_fieldcat
       it_sort                       =
       it_filter                     =
          EXCEPTIONS
            invalid_parameter_combination = 1
            program_error                 = 2
            too_many_lines                = 3
            OTHERS                        = 4
        CASE sy-subrc.
          WHEN 1.
            MESSAGE e076. "invalid parameter combination
          WHEN 2.
            MESSAGE e001. "program error
          WHEN 3.
            MESSAGE e078. "too many lines
        ENDCASE.
      ELSE.
        CALL METHOD w_grid1->refresh_table_display
          EXPORTING
            i_soft_refresh = 'X'.
        CALL METHOD w_grid2->refresh_table_display
          EXPORTING
            i_soft_refresh = 'X'.
      ENDIF.
    Hope it Helps,
    Jayant Sahu.

  • ALV grid on the view keeping stale data

    Hi All,
    I am creating an application in  WDA in which we had decided to simply use tablui component. But later due to the nature of the requirements I decided to switch from that to ALV grid ( mainly for sorting and exporting to excel functionality advantages).
    There is a button which when clicked populates the data in the alv grid. ( there is a RFC which exports an internal table with data ) and i use the bind_table method to fill the ALV context node with the data. The Node has been mapped properly from component controller to the interface controller. And the code for populating the grid is written in the Action of the button.
    But my problem is after first population of the data in the alv( which works perfectly alright), if i chnage the selection criteria and again click the button my internal table (which is passed in the bind_table method)  is getting loaded with new set of data( i know that since i saw the internal table contents by debugging) but the alv grid on the screen is not refelecting the same.
    Ive tried using lo_nd_ctx_vn_alv->invalidate( ). here n there but doesnt work at all. In fact if invalidate is used then the ALV grid doesnt populate even once.
    The code is as follows :
    the node name is ctx_vn_alv.
    the data comes from rfc and is recieved in it_alv .
        data lo_nd_ctx_vn_alv type ref to if_wd_context_node.
        data lo_el_ctx_vn_alv type ref to if_wd_context_element.
        data ls_ctx_vn_alv type wd_this->element_ctx_vn_alv.
    *   navigate from <CONTEXT> to <CTX_VN_ALV> via lead selection
    lo_nd_ctx_vn_alv = wd_context->get_child_node( name = wd_this->wdctx_ctx_vn_alv ).
        lo_el_ctx_vn_alv = lo_nd_ctx_vn_alv->get_element(  ).
        lo_nd_ctx_vn_alv->bind_table( it_alv ).
    Edited by: bhaumik1987 on Mar 21, 2011 1:02 AM
    Edited by: bhaumik1987 on Mar 21, 2011 1:13 AM

    Hi Bhaumik,
    I think no need to write this code to get data using service call..
    Just call Execute method in component controller from your view controller.
    For example you have a button GETDATA, in on action of this button just call method. (use code wizard ) or
        DATA lo_COMPONENTCONTROLLER TYPE REF TO IG_COMPONENTCONTROLLER .
        lo_COMPONENTCONTROLLER =   wd_this->get_componentcontroller_ctr( ).
        lo_componentcontroller->execute_<YOUR EXECUTE METHOD NAME>.
    Check this example for more details..
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/9cb5d345-0801-0010-6a8e-fc57c23fd600?quicklink=index&overridelayout=true
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/a189b0ee583b8be10000000a421937/frameset.htm
    Cheers,
    Kris.
    Edited by: kissnas on Mar 21, 2011 7:12 AM

  • Create blank screen space between two ALV grids

    I want to create some blank screen space between the two ALV grids I have on the screen.  Can someone tell me how to do this?
    Thanks and best regards,
    Sandy

    You don't have link the two containers.
    I guess you have a grid and tree control that you want to display. So, use a different container for each of these controls, so that they appear differently.
    If you don't want space in between them, you can have one container and split that into and display the tree and grid in each of the split portions.
    The advantage with this will be you can resize the tree/grids using the vertical line that separates them.
    Take a look at WE02 transaction to see what I am trying to explain.
    Regards,
    Ravi

  • Share iTunes purchases between two user accounts on the same Mac?

    I have a Macbook Pro, for my bride and I, and a Macbook, for our kids. Both Macs are authorized on my iTunes account.
    So, how can I share an iTunes Store purchased song on my account with my wife's? I understand how to turn on sharing and she can see my songs in iTunes on her account, but she cannot synch them to her iPod.
    Now, I'm allowed to authorize an iTunes account on up to five Macs. I have two. But I have four accounts. Either way, I won't be exceeding five copies, but can't find a way to get a song I bought in my iTunes to my wife's iPod.
    We use the same iTunes account but don't want to have to buy things twice to get them on her iPod. Just seems weird that I could put it on five machines but not two user accounts on the same one.
    Message was edited by: Sky Guy

    On my Mac Pro I moved the entire library to "Macintosh HD/Shared/iTunes". Changed the Folder location in iTunes Preferences->Advanced->General to point to that location. Then in each user change the Music/iTunes folder to be an alias or link pointing to the Shared/iTunes folder. You will likely need to change the permissions on that folder to give everyone the ability to read and write. Do that via "Get Info" on the iTunes folder using Finder. I'd suggest backing everything up before you do this.

  • Two different Resultsets for the same query (running at the same time)

    I am using the Thin Driver for Oracle 8.1.6. I am invoking queries in multithreading mode (each thread has his own connection to the oracle DB). If i am invoking the same SQL-Statement in two different threads nearly at the same time, only the ResultSet of the first query is complete. The ResultSet of the second query is not complete (the number of tuples differs each time I run the program). Principally the two ResultSets should be the same (no changes are done at the same time in the DB), but they are not.
    Anybody knows this problem and knows how to solve it? Principally read accesses on DBs should not make such trouble ...
    I hope anybody can help me.

    Pranav,
    As this BADI is having option checked 'Multiple use'. You can implement multiple implementations.
    You need not to deactivate the existing implementation.
    Reddy

  • I am trying to store music for two different iPods on the same computer, against two different Apple IDs. When I try and download content from the Cloud I get an error message?

    I am trying to store music for two different iPods on the same Windows 8 computer, and when I try and download content from the Cloud I get an error message. Is it possible to have two different Apple IDs on the same computer?

    Unfortunately you've discovered too late how important it is to maintain an up-to-date backup of your iTunes library (and all other data of value).  You could, before wiping the drive, have considered making use of a commercial data recovery service that could (albeit at considerable cost) have extracted your library from the hard disk, even if virus infected.
    In the absence of that option, you will need to restore the content of your library from its original sources:
    Depending on your location, you may be able to re-download any iTunes Store purchases that are still available on the Store
    Likewise, most digital purchases from Amazon (including auto-rip copies of purchased CDs) should be available from the Amazon Cloud and via the Amazon Music application - the same may be true of other commercial sources for digital downloads
    Content imported from your CDs will have to imported again
    The specific situation that you describe regarding the music imported from your friend's external HDD suggests that either the source is badly organized and/or originates from a source other than iTunes (other media players may use alternative tags for information like artist, title, album, etc. that are not wholly consistent with how iTunes handle these).  Without details of the issues you're seeing it is difficult to suggest a remedy other than going through the media album-by-album, track-by-track, and correcting the inconsistencies.
    In the absence of a backup or access to the original library data there is no option other than painstakingly recreating your library as described above.  As you do so, you'll now realize how important creating and maintaining backups are - in my case I have at all times three separate duplicates of my library, in two different locations, where none is ever more than a week old compared to the content of my master library.

  • Two processes running at the same time in Lookout

    I have installed Lookout 5.0 with 200 I/O Points onto our server computer. The application of motion control is next to the 200 I/O points through OPC PMAC server/client. Now I would like to have a second process in the same server for trouble shooting and testing without stopping the motion control process. However, this second testing process could have also many I/O points through Serial and USB ports. I assume that the total amount of I/O points of both processes will be greater than 200.I prefer to have independent processes for control and testing because access levels. Can I have these two processes running at the same time when needed?

    Hi,
    From your description you are using a third party OPC server for the motion application. You could have a second Lookout process communicating with the same OPC server with no problems, as long as you do not exceed the number of I/O points your license supports.
    Also, the process you are using for testing obviously could not overwrite datamembers (or registers if you will) that would interfere in the overall application, in other words you can test your application as long as you keep the coherency of the test.
    So the answer would be, yes it is possible, however you are still limited to the number of I/O's your license supports... You may even consider upgrade the number of I/O's you have in your license.
    Best Regards
    Andre Oliveira

  • Exporting two remote objects on the same port

    Hi,
    I would like to export two remote objects on the same host, same port and bind them with different service names.
    There is no problem when I do that from the same Java program.
    But when I export and bind an object from a Java program 1, I cannot do the same with the second (and similar) Java program 2. This is the stack trace of my Exception:
    java.rmi.server.ExportException: Port already in use: 50040; nested exception is:
         java.net.BindException: Address already in use: JVM_Bind
         at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:243)
         at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:178)
         at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:382)
         at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:116)
         at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:145)
         at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:129)
         at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:275)
         at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:178)
         at java.rmi.server.UnicastRemoteObject.<init>(UnicastRemoteObject.java:75)Can some one help please

    It should work in any version of Java as long as the server socket factories are null or equal according to Object.equals() or its override in the SSF.equals() method if any. Which needs to be present and needs to take the form:
    public boolean equals(Object object)
      return object != null && object.getClass() == this.getClass();
    }with further tests if the server socket factories have additional state.

  • How can I interact between two different frames in the same indesign template as well as from one template to another.

    I am looking for the best way (or any way) to interact between two different frames in the same indesign template as well as from one template to another. It's for a DPS app which needs to carry some button initiated data from one page to another and then present it in a table.

    There is no simple way to do it, as itunes wont let you use it on another computer without wiping the contents first.
    However if you really want to transfer songs to another computer then you could try this;
    * make sure that your ipod is accessible as a disk drive (ipod options)
    * when you plug your ipod into the computer you want to transfer to make sure you select "no" or "cancel" when it asks to wipe the contents. Leave the ipod connected and quit from itunes.
    * go to "my computer" and access the ipod directly. You probably have to select "view hidden files" from windows. You will see a lot of folders with odd names like ZX838aff with similar named files inside.
    * copy these files to a folder on your computers hardrive. Now remove the ipod and start itunes.
    * import the files from the folder you made in the last step.
    * Now your music is on itunes, but with unrecogisable names.
    This is the only way I have found to do it, but there may be another way, say with an application to do the hard work for you.
    Generic homebuild PC Windows XP
    Generic homebuild PC   Windows XP  

Maybe you are looking for

  • "The Installer Disc Could Not Be Found."

    I have downloaded an ISO image to a USB, as well as the Windows support drivers from Apple. What am i missing? How can i install windows from here? I am running on MAC OS X 10.8.4 and Boot Camp 5.0.3

  • How do I get my ipad to find my new wireless printer?

    How do I get my IPAD to find my new wireless printer?

  • Two different company in same SAP system ?

    Dear Gurus, I came across a requirement from Client There is a company A which is having own business . This company A operates/manage company B (all panning/execution/sales purchase/inventory etc) but not in Books of account. From legal point of vie

  • CQ62-220US Laptop PC with Short DST Failed and hard drive replacement availability...

    I posted this on the lockup/freeze forum and got absolutely no response so I am hoping I might get a little advice on this forum. Got the following error... FailureID  M4W4GF-55G5S1-XD003G-60T003 ProductID  WQ850UA#ABA Short DST Failed ...and cant ge

  • Rmi SocketTimeoutException

    Hi, We�re using a RMI connection. In rare occasions, when the api calls that the rmi server performs take too much time, we get an UnmarshalException which wraps a SocketTimeOutException. It happens 60 seconds after the client sent request to the ser