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: 

Alv-subtotals texts

Former Member
0 Kudos

hi all,

i need to display the short texts of the field at the subtotals.for instance,for an order i need to sum up currency and i need to dispaly its short description at the subtotal column..for this i'm using layout-subtotals_text..

and i'm sending the field to this alv field..

Thanks in Advance.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

HI venkata

for this you need to do using handlers

in local classs , you need a event for sub total text,

and set the handler for it, then sub total text will come.

FORM method_subtotal_text USING es_subtottxt_info TYPE lvc_s_stxt

ep_subtot_line TYPE REF TO data

e_event_data TYPE REF TO

cl_alv_event_data.

DATA ls_sflight LIKE sflight.

FIELD-SYMBOLS: <fs1> STRUCTURE sflight DEFAULT ls_sflight,

<fs2>.

IF es_subtottxt_info-criteria = 'PLANETYPE'.

ASSIGN ep_subtot_line->* TO <fs1>.

ASSIGN e_event_data->m_data->* TO <fs2>.

CONCATENATE es_subtottxt_info-keyword ': '

<fs1>-planetype INTO <fs2>.

ENDIF.

regards

kishore

3 REPLIES 3

former_member186741
Active Contributor
0 Kudos

sorry, Venkata, but it's not clear what your problem is. Presumably you are not getting the field short text coming out above the subtotal. What are you getting?

If the texts are being truncated you will need to set the outputlen in the field cat for the field in question to be at least as big as the sort text is.

Former Member
0 Kudos

HI venkata

for this you need to do using handlers

in local classs , you need a event for sub total text,

and set the handler for it, then sub total text will come.

FORM method_subtotal_text USING es_subtottxt_info TYPE lvc_s_stxt

ep_subtot_line TYPE REF TO data

e_event_data TYPE REF TO

cl_alv_event_data.

DATA ls_sflight LIKE sflight.

FIELD-SYMBOLS: <fs1> STRUCTURE sflight DEFAULT ls_sflight,

<fs2>.

IF es_subtottxt_info-criteria = 'PLANETYPE'.

ASSIGN ep_subtot_line->* TO <fs1>.

ASSIGN e_event_data->m_data->* TO <fs2>.

CONCATENATE es_subtottxt_info-keyword ': '

<fs1>-planetype INTO <fs2>.

ENDIF.

regards

kishore

0 Kudos

Can u be more specific in this regards as i'm not aware of the classes and etc,i bit confused with these or guide what should i do with this in the code....

Thanks in advance.