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

Regarding ALVs

Former Member
0 Likes
618

HI experts,

My requirement is <b>' a report has 100 fields and among those i need to hide all but specific 10 fields in output using ALVs</b>' please help me.

1 ACCEPTED SOLUTION
Read only

amit_khare
Active Contributor
0 Likes
595

ALV only display those fields which are there in Fieldcatalog.

So dont pass those 90 fields and they will not get display.

But if you want to display all and then hide, then create a layout variant for it save it and use it as Default variant.

Regards,

Amit

Reward all helpful replies.

HI experts,

My requirement is <b>' a report has 100 fields and among those i need to hide all but specific 10 fields in output using ALVs</b>' please help me.

5 REPLIES 5
Read only

amit_khare
Active Contributor
0 Likes
596

ALV only display those fields which are there in Fieldcatalog.

So dont pass those 90 fields and they will not get display.

But if you want to display all and then hide, then create a layout variant for it save it and use it as Default variant.

Regards,

Amit

Reward all helpful replies.

Read only

0 Likes
595

can u give me example coading for that.

Read only

abdul_hakim
Active Contributor
0 Likes
595

Hi

Have a look at the below ALV Programs

<b>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</b>

Cheers,

Hakim

Mark all useful answers..

Read only

Former Member
0 Likes
595

set the value of the field <b>NO_OUT</b> to 'X' in the field catalog, for the columns that are to be hidden.

Read only

Former Member
0 Likes
595

Hi Karim,

while building the fieldcatlog you can use no_output 'X' to hide the columns in output, as given below:

LOOP AT FIELDCAT INTO W_FIELDCAT.

CASE W_FIELDCAT-FIELDNAME.

WHEN 'COLUMN_NAME1'.

W_FIELDCAT-NO_OUTPUT = 'X'.

MODIFY FIELDCAT FROM W_FIELDCAT.

WHEN 'COLUMN_NAME2'.

W_FIELDCAT-NO_OUTPUT = 'X'.

MODIFY FIELDCAT FROM W_FIELDCAT.

ENDCASE.

Reward points.. if helpful.