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

hide empty column

Former Member
0 Likes
2,153

hello,

I am looking for the easiest way to hide empty columns in

'REUSE_ALV_GRID_DISPLAY'.

I know i can work my way through the field catalog.

I am just curious if there is a parameter that helps me to achieve this goal.

thank you!

Werner

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,588

Hi

No! I don't believe, just as you know you have to check which colunms have no data and set the flag NO_OUT for them in catalog.

Max

7 REPLIES 7
Read only

Former Member
0 Likes
1,588

Hi Werner,

You can Delete the blank lines from the final internal table before calling 'REUSE_ALV_GRID_DISPLAY'.

Delete i_tab where col1 is initial.

Reward points if this Helps.

Manish

Read only

0 Likes
1,588

Hi Manish,

thank you, but I don't have blank lines but blank columns.

Therefor I cannot delete the whole line.

In my case depending on user input some columns are empty.

I don't want to show those columns.

bye Werner

Read only

Former Member
0 Likes
1,589

Hi

No! I don't believe, just as you know you have to check which colunms have no data and set the flag NO_OUT for them in catalog.

Max

Read only

0 Likes
1,588

thanks for your help,

Werner

Read only

0 Likes
1,588

Hi, you need to handle this manually when building your field catalog. For example.

data: is_not_initial type c.


is_not_initial = space.
loop at itab where not fld1 is initial..
     is_not_initial = 'X'.  
     exit. 
endloop.


if is_not_initial = space.
  fc-no_out = 'X'.
endif.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
1,588

Hi Werner,

If you know the Input coulmns then keep the Delete condition on those Column fields.

Anyway as you are new to this SDN.

Please reward points if you get your solution as per

Rating - 10 (Complete) ,6 (Helpful) or 2.

Regards,

Manish

Read only

0 Likes
1,588

Hi Manish,

i tried to reward your post .

Got the following message:

Error:

  • Rewarding the message failed.

br

Werner