Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Two ALV Grids in a single screen are overlapping eachother

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

FredericGirod
Active Contributor
0 Kudos

used split container method.

see DWDM for examples.

4 REPLIES 4

FredericGirod
Active Contributor
0 Kudos

used split container method.

see DWDM for examples.

0 Kudos

How do u use split container method?

0 Kudos

Look at [SAP Container|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIDOCK/BCCIDOCK.pdf] for "SAP Easy Splitter Container" you have only two methods to use CONSTRUCTOR of course and SET_SASH_POSITION.

create object easy_splitter_container
  exporting
    link_dynnr = link_dynnr
    link_repid = link_repid
    metric = metric
    parent = parent
    orientation = orientation
    sash_position = sash_position
    with_border = with_border
  exceptions
    cntl_error = 1
    cntl_system_error = 2.

call method easy_splitter_container->set_sash_position
  exporting
    sash_position = sash_position

* Instance Attributes
* top_left_container - Type ref to CL_GUI_CONTAINER - ID of left-hand or upper container
* bottom_right_container - Type ref to CL_GUI_CONTAINER - ID of the right-hand or lower container
* pane_orientation - Type I  - Orientation of subareas or splitter bar

For a "shorter" documentation, look at [CONSTRUCTOR|http://help.sap.com/saphelp_nw04/helpdata/en/6d/1d2905a3af11d295cf00a0c930660b/frameset.htm]

Regards

Former Member
0 Kudos

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.