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.
Showing results for 
Search instead for 
Did you mean: 

Controlling current line position in SapScript.

0 Kudos


I have following problem in SapScripts.

During the printing user form some pages are not fully filled in.

There are some pages which have only several lines.

There are also some pages which are filled in completely.

In the SapScript form I have many statements IF ... ELSE ... ENDIF.

Probably this is the problem. How to controll current line in SapScript.

Is it possible decrease or increase current line in SapScript?

Is there any system variable which control current line in SapScript?

How to solve this problem? I would like to fill in completely every page.

I do not use PROTECT /ENDPROTECT statements in SapScript.


Bogdan Bieganski


Active Contributor
0 Kudos


Can you please rephrase your problem may be with screen shots it will help in better understanding your issue. Seconldy you can control whant to print and what not to using driver program as well as sap script code.


0 Kudos


During the printing a report based on the SapScript form I have plenty of free lines. Sometime I have almoust entire blank page - only 2 or 3 lines on a page and after that the next page.

In the SapScript it is used SapScript command IF...ENDIF many times.

I suppose that if this statement is FALSE - it increase line counter but not print the line.

So I am looking for variable which control this line counter (if exist).

Or maybe there is another reason.



0 Kudos

Hi Bogdan

I believe the reason is something else. I will suggest you to activate the debugger via SE71 and check what is actually happening in your script. It may have blank lines insides


0 Kudos


You are right. The problem was in stearing program.

It was using FM CONTROL_FORM in not a proper way.

To many PROTECT calls and not enough ENDPROTECT calls.

Thanks for help.