06-19-2008 4:09 AM
HI ,
i created Docking Container and splitted and
with this method i defined container go_splitter->get_container
after that i assigned grids to that corresponding containers,
after that i displayed data using set_table_for_first_disaply.
and after
CALL SCREEN '0100'.
but if i excute after call statement i am not getting any output .
tell me whats problem in my logic and solution.
Give me on Good Example of Displaying Grid Control using Classes it will be helpful to me .
THX
06-19-2008 4:14 AM
06-19-2008 4:18 AM
Hi Chaaya Sen,
Please check these link
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_editable.htm
http://www.saptechnical.com/Tutorials/ALV/ALVMainPage.htm
http://www.saptechnical.com/Tutorials/ALV/Edit/F4.htm
Best regards,
raam
06-19-2008 4:29 AM
Hi,
refer to these examples
BCALV_GRID_01,BCALV_GRID_02 ,BCALV_GRID_03
BCALV_GRID_04,BCALV_GRID_05 ,BCALV_GRID_06
BCALV_GRID_07,BCALV_GRID_08 ,BCALV_GRID_09
BCALV_GRID_10,BCALV_GRID_11 ,BCALV_GRID_AND_POPUp
BCALV_GRID_DEMO,BCALV_GRID_DND_TREE
06-19-2008 5:51 AM
hi Chaay a,
U can use ..
*Display percentage completion at storage type
Set Container
v_container = c_container1 .
v_title = text-036 ."Percentage completion at storage level
*Build field catalog for storage type
perform build_catalog_vtyp.
if it_vltyp[] is not initial.
perform create_containerobject using v_container
v_title
it_field_cat
it_vltyp .
refresh : it_field_cat[] .
----
-->P_V_CONTAINER Container name*
-->P_IT_FIELD_CAT field cat internal table
-->P_IT_OUTPUT1 table that is to be displayed
----
form create_containerobject using p_v_container type any
p_v_title type any
p_it_field_cat like it_field_cat
p_it_table type any .
Check if the report is being executed in the background job
if cl_gui_alv_grid=>offline( ) is initial.
If it is being executed in the foreground mode, than create the
frontend container
create object ob_custom_container
exporting
container_name = p_v_container
exceptions
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
others = 6.
if sy-subrc <> 0.
message e000 with text-033."Unable to display data in the ALV
endif.
endif .
To Instantiate ALV grid control
create object ob_alvgrid
exporting
i_parent = ob_custom_container
exceptions
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
others = 5.
if sy-subrc <> 0.
message e000 with text-033."Unable to display data in the ALV
endif.
clear wa_layout.
*optimisind the size of all fields in the layout
wa_layout-cwidth_opt = c_x .
if p_v_title = '% Completion by Storage Type'.
wa_layout-no_toolbar = c_x.
endif.
wa_layout-grid_title = p_v_title .
To display data in the ALV control
call method ob_alvgrid->set_table_for_first_display
exporting
is_layout = wa_layout
IT_TOOLBAR_EXCLUDING = ''
changing
it_fieldcatalog = p_it_field_cat
it_outtab = p_it_table.
endform. " create_containerobject
Amit
Edited by: Amit Kumar on Jun 19, 2008 6:52 AM