Application Development 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: 

Regarding ALVs

Former Member
0 Kudos

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

amit_khare
Active Contributor
0 Kudos

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.

5 REPLIES 5

amit_khare
Active Contributor
0 Kudos

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.

0 Kudos

can u give me example coading for that.

abdul_hakim
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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.