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

display sum using alv grid control

Former Member
0 Kudos
1,795

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
Read only

Former Member
0 Kudos
1,017

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
Read only

Former Member
0 Kudos
1,018

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

Read only

0 Kudos
1,017

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

Read only

0 Kudos
1,017

Hi,

Can you explain more clearly?

Best regards,,

Leandro Mengue

Read only

0 Kudos
1,017

yes,

to get sum up use this

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

cheers,

Bhavana

Read only

Former Member
0 Kudos
1,017

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

Read only

former_member233090
Active Contributor
0 Kudos
1,017

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

Read only

former_member233090
Active Contributor
0 Kudos
1,017

This message was moderated.