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 Display Problem

Former Member
0 Likes
816

Dear Experts,

I m working on ALV Report,

User has 3 options : Open item, Clear Item and All item.

ALV output is fine for open and clear item.

but when user choose All item, it displays every column twice.

For reference code is like

IF r_open = 'X'.

PERFORM get_data_open.

PERFORM display_data.

ELSEIF r_clear = 'X'.

PERFORM get_data_cleared.

PERFORM display_data.

ELSEIF r_all = 'X'.

PERFORM get_data_open.

PERFORM display_data.

PERFORM get_data_cleared.

PERFORM display_data.

ENDIF.

Can anyone help me in this.

Regards,

7 REPLIES 7
Read only

Former Member
0 Likes
786

Hi,

The perform diaplay data is called twice. club both in one and ue it.

Thanks

kamath

Read only

Former Member
0 Likes
786

Hi,

Club Display data Other Wise Dont' fill FILEDCATLOG twise.

Salil ....

Read only

Former Member
0 Likes
786

Hi ,

IF r_open = 'X'.

PERFORM get_data_open.

ELSEIF r_clear = 'X'.

PERFORM get_data_cleared.

ELSEIF r_all = 'X'.

PERFORM get_data_open.

PERFORM display_data.

PERFORM get_data_cleared.

ENDIF.

PERFORM display_data.

Regards.

Read only

Former Member
0 Likes
786

Hi,

Make use FM REUSE_ALV_BLOCK_LIST_APPEND'

See example Program .

BALVBT01.

Regards

Saurabh Goel

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
786

refresh your field catalouge

Read only

venkat_o
Active Contributor
0 Likes
786

Hi Maverick,


IF r_open = 'X'.
  PERFORM get_data_open.
  PERFORM display_data.
ELSEIF r_clear = 'X'.
  PERFORM get_data_cleared.
  PERFORM display_data.
ELSEIF r_all = 'X'.
  PERFORM get_data_open.
  PERFORM display_data.
  PERFORM get_data_cleared.
  PERFORM display_data.
ENDIF.
<li>When you select radiobutton for all, you have clubbed open items and clear items together. that is fine . But the thing is your building fieldcatalog internal table twice for open items and cleared items. <li> For both open and cleared items if you have same columns,, you can just do like below
DELETE ADJACENT DUPLICATES FROM it_fieldcat COMPARING fieldname.
Thanks Venkat.O

Read only

Former Member
0 Likes
786

Hi,

FIELD CATALOGUE is causing this problem.

In the logic for ALL ITEMS, this is getting execute twice somewhere, inside from the subroutines/forms.

regards,

amit m.