2005 Dec 30 9:45 AM
My Alv is sub-totaling on the basis of say FIELD_A.
I am getting orange colored row showing subtotal at each new FIELD_A. till this point no problem.
When ALV is on my screen and I go to the following Menu path:
Settings > Summation levels > Define Drilldown >
A popup window with title "Sum Steps [Specify Breakdown]" displays and I have selected the row "FIELD_A" and pressed button copy.
Now my display changed to ALV with only "orange colored row " and that is what I want.
I want the program to start with this kind of display and I want to achieve the same through code (not variant though)
My Alv is sub-totaling on the basis of say FIELD_A.
I am getting orange colored row showing subtotal at each new FIELD_A. till this point no problem.
When ALV is on my screen and I go to the following Menu path:
Settings > Summation levels > Define Drilldown >
A popup window with title "Sum Steps [Specify Breakdown]" displays and I have selected the row "FIELD_A" and pressed button copy.
Now my display changed to ALV with only "orange colored row " and that is what I want.
I want the program to start with this kind of display and I want to achieve the same through code (not variant though)
2005 Dec 30 9:52 AM
Hi
You should manage it by filling the parameter for sorting table.
DATA: LT_SORT TYPE LVC_S_SORT.
DATA: GT_SORT TYPE LVC_T_SORT.
LT_SORT-FIELDNAME = 'FIELDA'.
LT_SORT-UP = 'X'.
LT_SORT-GROUP = '*'.
LT_SORT-SUBTOT = 'X'.
LT_SORT-COMP = 'X'. <----If you want to compress the output.
append lt_SORT to gt_sort.
Max
Message was edited by: max bianchi
2005 Dec 30 9:55 AM
2005 Dec 30 10:19 AM
Dear Flora,
ALV provides such an amount of flexibility in analyzing the data. Its lot better if the summation and all is done the way you mentioned rather than getting it done through program.
Regards,
Deva.
2005 Dec 30 10:36 AM
yipees <b>EXPA</b> field did the magic I wanted.
So <i>Solved it on my own!</i> i guess.
FORM form_build_sortcat_1301 CHANGING value(it_sort) TYPE
slis_t_sortinfo_alv.
DATA ls_sort LIKE LINE OF it_sort .
CLEAR ls_sort.
ls_sort-spos = '1' .
ls_sort-fieldname = 'KUNWE' .
ls_sort-up = 'X' . "A to Z
* Uncomment it, if you want to hav sum on the basis of subordernumber
ls_sort-subtot = 'X'.
<b> ls_SORT-EXPA = 'X'.</b>
ls_sort-down = space .
APPEND ls_sort TO it_sort .
ENDFORM.
2005 Dec 30 10:44 AM