cancel
Showing results for 
Search instead for 
Did you mean: 

Getting different pages for the internal table records

Former Member
0 Kudos

Hi all,

Can u help out from the following Issue:

I have Internal table and i need to print every record in different pages

Example : Internal table have 3 records.

I need to print first record in first page

second record in second page

third record in third page.

How can we get these.

Can any one let me know....

Thanks in adavance,

-Teena

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

LOOP AT ITAB.

WRITE:/ ITAB-FIELD1.

NEW-PAGE.

ENDLOOP.

Regards

Sudheer

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi ,

Create a command filed at the end of the loop for internal table in smartform . This will solve your problem .

Regards

varma_narayana
Active Contributor
0 Kudos

Hi..

This sholud work for u.

LOOP AT ITAB.

CALL FUNCTION 'WRITE_FORM'

exporting

ELEMENT = 'E_RECORD' "Element in MAIN window

FUNCTION = 'SET'

TYPE = 'BODY'

WINDOW = 'MAIN' .

CALL FUNCTION 'CONTROL_FORM'

Exporting

COMMAND = 'NEW-PAGE'

.

ENDLOOP.

<b>Reward if Helpful</b>

Former Member
0 Kudos

Sorry for the correction in Query

Its not in Report

I need to get these in Scripts

Sorry for Inproper question

Thank you

~Teena

Former Member
0 Kudos

Inside the itab loop

concatenate 'NEW-PAGE ' new_page into lcommand separated by space.

call function 'CONTROL_FORM'

EXPORTING

command = lcommand

EXCEPTIONS

unopened = 1

unstarted = 2

others = 3.

Former Member
0 Kudos

furtuer clarification.

new_page is the spage u want to print like 'NEXT'

in the loop u can later call ur 'write_form' elements

former_member196280
Active Contributor
0 Kudos

Print your record.

NEW-PAGE. "so every record will be printed on new page..

OR

If you have driver program in control, loop all your windows so every record will be printer on new page

Rgds,

SaiRam