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: 

page break in ALV

Former Member
0 Kudos

How can i get page break in ALV

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

3 REPLIES 3

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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