cancel
Showing results for 
Search instead for 
Did you mean: 

New page in Script

Former Member
0 Kudos

Hi,

I want to display 100 records in my script. In the first page only 10 records should display likewise on each page 10 records should display. Right now im unable to break the page at 10 records. Please help me hpw to achieve this.

Thanks

Mallika

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

u can do it following ways.

one is : keep ur main window size fit for 10 records only...so it will continue for the rest of pages too.

Former Member
0 Kudos

Hi,

Please do through this alternative and make use of it if fits.

DATA: LC_REM TYPE I,

CON_LINES TYPE I VALUE '10',

PAGE_BREAK TYPE C VALUE SPACE.

LOOP AT IT_DATA INTO WA_DATA.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'ITEM_DATA'.

LC_REM = SY-TABIX MOD CON_LINES.

CLEAR PAGE_BREAK.

IF LC_REM = 0.

PAGE_BREAK = 'X'.

ENDIF.

ENDLOOP.

In script, at text element 'ITEM_DATA', write following code alopng with other statements.

/: IF PAGE_BREAK = 'X'

/: NEW-PAGE.

/: ENDIF

/: <Item data>

Regards,

Prasanth

Former Member
0 Kudos

I tried in both the ways but didnt work

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

In processing 100 records in loop, take one counter and increase it to 10. call page break when the counter become 10 and after u initial the counter. so that page break will call when counter becomes 10.

Former Member
0 Kudos

hey guys,

it worked..:)

thanks..