02-09-2007 3:42 PM
Hi,
How do I make subtototals default? What is the parameter for this?
I am using OO ALV not FM's.
Macro to populate the field catalog
DEFINE fieldcatalog.
t_fieldcat-ref_table = &1.
t_fieldcat-fieldname = &2.
t_fieldcat-coltext = &3.
t_fieldcat-do_sum = &4.
t_fieldcat-inttype = &5.
t_fieldcat-hotspot = &6.
append t_fieldcat.
clear t_fieldcat.
END-OF-DEFINITION.
Regards
Praveen
02-09-2007 3:50 PM
Build Sort Catalog as below , For example to subtotal at MATNR
And Show only subtotal line
data gt_sort type lvc_t_sort. "sort catalog
data sort type lvc_s_sort.
Pass Sort sequence as below.
clear sort.
sort-fieldname = 'MATNR'.
sort-tabname = 'INTERNAL TABLE NAME'
sort-up = 'X'.
SORT-SUBTOT = 'X'.
SORT-EXPA = 'X'. " This will hide details lines
append sort to t_sort.
clear sort.
Pass This t_sort ITAB in set_table_for_first_display
02-09-2007 3:46 PM
Hi, what you mean by "Subtotals" default? Do you mean that you want only the subtotal lines to show in the output?
If so, there is a field in the LAYOUT parameter, called TOTALS_ONLY(or something like that, set this to 'X' and only the subtotals and totals will be shown. Is this what you want?
Regards,
Rich Heilman
02-09-2007 3:50 PM
Build Sort Catalog as below , For example to subtotal at MATNR
And Show only subtotal line
data gt_sort type lvc_t_sort. "sort catalog
data sort type lvc_s_sort.
Pass Sort sequence as below.
clear sort.
sort-fieldname = 'MATNR'.
sort-tabname = 'INTERNAL TABLE NAME'
sort-up = 'X'.
SORT-SUBTOT = 'X'.
SORT-EXPA = 'X'. " This will hide details lines
append sort to t_sort.
clear sort.
Pass This t_sort ITAB in set_table_for_first_display
02-09-2007 3:55 PM
Rich,
Thank you for the reply.I guess I was not clear.
By default I am able to total on quantity field with INTTYPE parameter from LVC_S_FCAT structure.Right now after entering in to output list I am manually pressing SUBTOTAL button on Material number and saving it as default layout.
I don't want to do this.I am wondering whether we can make this option DEFAULT .
Sreekanth,
I am not using FM's
Regards
Praveen
02-09-2007 4:07 PM
02-09-2007 4:35 PM
Thank you Srikanth & Rich.
I solved my issues and did not forget to award points.:-)
Regards
Praveen
Message was edited by:
PRAVEEN s