Skip to Content
0
Former Member
May 08, 2008 at 08:54 AM

how to get on the tool bar segma (to do sum on a particular filed)

19 Views

Dear Freinds,

Iam using ALV grid funcion module , iam not getting the SEGMA symbol on the Tool bar in my output of the report ,

iam passing in the function module the parameters as follows

  • Move Employee number

MOVE: 'EMPID' TO ls_fieldcat-fieldname,

'Employee Number' TO ls_fieldcat-seltext_m,

'NUMC' TO ls_fieldcat-datatype,

8 TO ls_fieldcat-outputlen,

'P0002' TO ls_fieldcat-ref_tabname,

'PERNR' TO ls_fieldcat-ref_fieldname,

'M' TO ls_fieldcat-ddictxt,

'Employee Number' TO ls_fieldcat-seltext_l.

APPEND ls_fieldcat TO p_lt_fieldcat.

CLEAR ls_fieldcat-seltext_l.

*grosswage

MOVE: 'GROSSWAGE' TO ls_fieldcat-fieldname,

'Gross Wage' TO ls_fieldcat-seltext_m,

'CHAR' TO ls_fieldcat-datatype,

13 TO ls_fieldcat-outputlen,

'M' TO ls_fieldcat-ddictxt,

'X' to ls_fieldcat-do_sum,

'Gross Wage' TO ls_fieldcat-seltext_l.

  • wa_fieldcat-do_sum = 'X'.

APPEND ls_fieldcat TO p_lt_fieldcat.

CLEAR ls_fieldcat-seltext_l.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = g_repid

is_layout = gt_layout

it_fieldcat = gt_fieldcat[]

  • IT_SORT = GT_SORT[]

i_save = g_save

is_variant = g_variant

  • IT_EVENTS = GT_EVENTS[]

TABLES

t_outtab = i_adp_data

EXCEPTIONS

program_error = 1

OTHERS = 2.

IF sy-subrc <> 0.

WRITE:/ 'Not able to print the report'.

ENDIF.

Could any one pleae let meknow why iamnot getting the segma symbol. I want do sum on the field GROSSWAGE,

but on the tool bar of the output of alv iam not getting the SEGMA symbol itself for clicking on the grosswage to get the sum total.

Please let me know where i went wrong.

regards

madhuri.