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: 

display sum using alv grid control

Former Member
0 Kudos
1,052

hi,

am using cl_gui_alv_grid for displaying.

i tried by selecting all fields for sample and i got it.

but when i tried to have limited fields for this i used fieldcat of type lvc_t_fcat am not getting and also i tried to have total on one field.

am not getting total and limited fields output.

the report is displaying all the fields but the content will be only for the fields i selected in fcat.

i need only some fields and have total on one field.

please help...

1 ACCEPTED SOLUTION

Former Member
0 Kudos
274

You can use Layout Variants to hide some columns of the ALV.

Check method: SET_TABLE_FOR_FIRST_DISPLAY

Following parameters:

IS_VARIANT

I_SAVE

I_DEFAULT

7 REPLIES 7

Former Member
0 Kudos
275

You can use Layout Variants to hide some columns of the ALV.

Check method: SET_TABLE_FOR_FIRST_DISPLAY

Following parameters:

IS_VARIANT

I_SAVE

I_DEFAULT

0 Kudos
274

hi,

i have used that method only.

in that i set

exporting

i_structure_name = 'mara'

changing

it_outtab = it_mara

it_fieldcatalog = fcat.

i need sum mainly, only 4 fields to be displayed.

please help....

0 Kudos
274

Hi,

Can you explain more clearly?

Best regards,,

Leandro Mengue

0 Kudos
274

yes,

to get sum up use this

do_sum = 'X' as i have given in the above example

cheers,

Bhavana

Former Member
0 Kudos
274

Hi Mr X,

you can hide column from output and sum on particular column

NO_OUT = X in fcat for column which is not needed in output

do_sum = X in fcat for sum

Regards,

Gaurav

former_member233090
Active Contributor
0 Kudos
274

Hi,

if you want the subtotals you have to do

that is you need to mention the do_sum = 'X'. for the columns which you want to see the subtotals(quantities, currency etcc) in the fieldcatalog.

cheers,

Bhavana

former_member233090
Active Contributor
0 Kudos
274

This message was moderated.