Application Development and Automation 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: 
Read only

ALV GRID Issue

Former Member
0 Likes
764

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

6 REPLIES 6
Read only

Former Member
0 Likes
721

U have to make the first tab default..

give the ok_code for the first tab as default.

Read only

Former Member
0 Likes
721

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.

Read only

Former Member
0 Likes
721

hi gowri,

check the usercommand and modief id is correct are not.

i think its a problem

Read only

Former Member
0 Likes
721

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

Read only

Former Member
0 Likes
721

pls suggest.......

Read only

Former Member
0 Likes
721

Solved..................