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: 

How to force sapscript to create a new page based on condition.

aris_hidalgo
Contributor
0 Kudos

Hello experts,

Is it possible to let sapscript create a new page based on a condition. Currently I am using At new f1 then calling FM CONTROL_FORM FOR NEW PAGE.

Also, how do I go back to 'loop at itab' whenever my field changes?

Again, thanks a lot guys and take care!

1 ACCEPTED SOLUTION

rahulkavuri
Active Contributor
0 Kudos

Use the control command below which will help u get a new page

New Page  :  Forcing a page             			     break  in a text.

Syntax :   
     /: NEW-PAGE  [page_name]  
 Ex : 
/: NEW-PAGE  S1 -> Contents of S1 are printed in a new page.

3 REPLIES 3

Simha_
Employee
Employee
0 Kudos

Hi,

U can use:

/: If <condition>.

/: NEW-PAGE.

/: Endif.

or

create a element

/: NEW-PAGE

and use that wherever u want in ur driver program.

write_form

element : ur element.

U may incorporate the same condition of changing field in SAPSCRIPT itself.

This may help u..

Regards,

SImha.

Message was edited by: Narasimha Rao Bandla

Former Member
0 Kudos

Hi viraylab,

1. in se71 layout,

create a new text element

/E MYNEW

/: NEW-PAGE

2. Then in your drive program,

call this element using FM

WRITE_FORM

based upon your condition,

on which a new page should come.

3. Thats all !

regards,

amit m.

rahulkavuri
Active Contributor
0 Kudos

Use the control command below which will help u get a new page

New Page  :  Forcing a page             			     break  in a text.

Syntax :   
     /: NEW-PAGE  [page_name]  
 Ex : 
/: NEW-PAGE  S1 -> Contents of S1 are printed in a new page.