05-15-2007 12:36 PM
05-15-2007 12:39 PM
Hai,
You can use the option of Grouping to achieve this.
For more details, read the documentation of the data element SLIS_CTRLS, which is used for the structure field slis_sortinfo_alv-group.
slis_sortinfo_alv is the line type of the parameter IT_SORT of the FM REUSE_ALV_GRID_DISPLAY.
If you use '*' as the value for slis_sortinfo_alv-group, it will initiate a page break and if you use 'UL', the ALV will use Underline to differentiate between the group.
Example:
sort-spos = '10'.
SORT-FIELDNAME = 'Years'.
SORT-TABNAME = 'DATA_TAB2'.
sort-UP = 'X'.
sort-subtot = 'X'.
SORT-GROUP = '* '.
APPEND SORT. CLEAR SORT.
In the It_SOET internal table write:
IT_SORT-Group = 'X'.
It will give a page break...
Regards,
Padmam.
05-15-2007 12:39 PM
Hai,
You can use the option of Grouping to achieve this.
For more details, read the documentation of the data element SLIS_CTRLS, which is used for the structure field slis_sortinfo_alv-group.
slis_sortinfo_alv is the line type of the parameter IT_SORT of the FM REUSE_ALV_GRID_DISPLAY.
If you use '*' as the value for slis_sortinfo_alv-group, it will initiate a page break and if you use 'UL', the ALV will use Underline to differentiate between the group.
Example:
sort-spos = '10'.
SORT-FIELDNAME = 'Years'.
SORT-TABNAME = 'DATA_TAB2'.
sort-UP = 'X'.
sort-subtot = 'X'.
SORT-GROUP = '* '.
APPEND SORT. CLEAR SORT.
In the It_SOET internal table write:
IT_SORT-Group = 'X'.
It will give a page break...
Regards,
Padmam.
05-15-2007 12:42 PM
using IT_SORT parameter of REUSE_ALV_GRID_DISPLAY , u can try that
try this
SORT-FIELDNAME = 'FIELD1'.
SORT-TABNAME = 'ITAB2'.
sort-UP = 'X'.
sort-subtot = 'X'.
SORT-GROUP = '* '. " this is used for page break
aPPEND IT_SORT
and pass it_sort to REUSE_ALV_GRID_DISPLAY
05-15-2007 12:43 PM
Hi Nidhi,
You can use the option of Grouping to achieve this.
For more details, read the documentation of the data element SLIS_CTRLS, which is used for the structure field slis_sortinfo_alv-group.
slis_sortinfo_alv is the line type of the parameter IT_SORT of the FM REUSE_ALV_GRID_DISPLAY.
If you use '*' as the value for slis_sortinfo_alv-group, it will initiate a page break and if you use 'UL', the ALV will use Underline to differentiate between the group.
Example:
sort-spos = '10'.
SORT-FIELDNAME = 'Years'.
SORT-TABNAME = 'DATA_TAB2'.
sort-UP = 'X'.
sort-subtot = 'X'.
SORT-GROUP = '* '.
APPEND SORT. CLEAR SORT.
But you need to take Print out only then you can see the difference.
follwing links might help you.
http://www.sap-basis-abap.com/sapab033.htm
http://www.erpassist.com/groups/groups.asp?v=sap-r3-dev&i=370782
regards,
Message was edited by:
Pritha Agrawal