Application Development and Automation 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: 
Read only

Sapscript Printing Issues

0 Likes
734

Hi All,

I want to display only two line items in main window in First Page,

the third line item must go to second page in sapscript.

I have used

/:PROTECT.

/:ENDPROTECT.

command also but its not helping.

Also i cant increase the size of main window???

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
698

Hi Nishant,

'Protect...Endprotect' is used to prevent page breaks among the flowing content.It means ths content has to be protected against the page breaks occurring.

1) Create a new element with New-Page Command and call it based on count (as sugg by Prakash) inside the item loop of driver program.

or

2) On basis of count do a FM call as sugg by Mahadeo , again in the loop at item table.

BR.

4 REPLIES 4
Read only

Former Member
0 Likes
698

Have you called the window inside Loop in your driver program. Just pass a variable count from your program to SCRIPT and put below condition in your script in command prompt:

IF COUNT > 2 .

NEW-PAGE.

ENDIF.

Cheers,

Prakash

Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
698

Use command new-page after second line

Read only

former_member196157
Active Participant
0 Likes
698

hiii,

In driver program after second line or where u want to break the page use FM,

CALL FUNCTION 'CONTROL_FORM'
  EXPORTING
  COMMAND = 'NEW-PAGE'
  EXCEPTIONS
  UNOPENED = 1
  UNSTARTED = 2
  OTHERS = 3.

Read only

Former Member
0 Likes
699

Hi Nishant,

'Protect...Endprotect' is used to prevent page breaks among the flowing content.It means ths content has to be protected against the page breaks occurring.

1) Create a new element with New-Page Command and call it based on count (as sugg by Prakash) inside the item loop of driver program.

or

2) On basis of count do a FM call as sugg by Mahadeo , again in the loop at item table.

BR.