‎2008 Sep 22 11:25 AM
Hi,
I have created a tabstrip. it is having two tab one is debit memo tab another one is document flow tab.directly if i am clicking the debit memo tab the alv grid output is not comming. if i am clicking debit memo tab after clicking the document flow tab ALV Grid output is commong perfectly.
please help me....
‎2008 Sep 22 11:26 AM
U have to make the first tab default..
give the ok_code for the first tab as default.
‎2008 Sep 22 11:27 AM
May be the controls and Grid object not initialized ..? Did you check that , if not check it once in Debugging. where are you initializing the Grid controls..?
Some thing wrong with the sequence of calls.
‎2008 Sep 22 11:28 AM
hi gowri,
check the usercommand and modief id is correct are not.
i think its a problem
‎2008 Sep 22 11:33 AM
Hi,
see my code....
if not gcc_dmhdr_container is initial.
call method gcc_dmhdr_container->free
exceptions
cntl_error = 1
cntl_system_error = 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 method gcc_grid_dmhdr->free
exceptions
cntl_error = 1
cntl_system_error = 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.
endif.
call function 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = lv_tab_name1
changing
ct_fieldcat = lt_fcat[]
exceptions
inconsistent_interface = 1
program_error = 2
others = 3.
*Custom Container
create object gcc_dmhdr_container
exporting
container_name = 'DM_HEADER'
exceptions
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
others = 6.
ALV Grid
create object gcc_grid_dmhdr
exporting
i_parent = gcc_dmhdr_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 ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
clear gs_layout.
gs_layout-sel_mode = 'A'. "Allow multi line selection
gs_layout-info_fname = 'ROW_COLINFO'.
gs_layout-FRONTEND = 'X'.
gs_layout-TOTALS_BEF = 'X'.
gs_layout-numc_total = space.
Grid Display
call method gcc_grid_dmhdr->set_table_for_first_display
exporting
i_structure_name = c_s_dmhdr
is_variant = gs_variant
i_save = 'A'
is_layout = gs_layout
it_toolbar_excluding = gt_excl_fun[]
changing
it_outtab = ouput[]
it_fieldcatalog = lt_fcat[]
exceptions
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
others = 4.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
In debugging mode i have tested the output table and field catalog tables. the values are comming perfectly..
‎2008 Sep 22 11:42 AM
‎2008 Sep 25 9:56 AM