cancel
Showing results for 
Search instead for 
Did you mean: 

SapScript, How do I read the current line number?

Former Member
0 Kudos

I have sections of text - each in it's own element with an 'include' of the standard text.

These sections are variable in size.

All elements are in the MAIN window.

I do not want a paragraph to split over two pages.

How do I read the current line number within the sapscript before the section prints so I can issue a new-page command at the beginning of the paragraph?

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Can you not use:

/: PROTECT
/: ENDPROTECT

instead?

Rob

Answers (1)

Answers (1)

Former Member
0 Kudos

Yes, that does work for paragraphs.

If I have multiple elements to print from within a loop where "at first, at each and at last" each call the Sapscript funtcion write_form - how can I keep the whole section together. protect/endprotect will keep each element together but not the group of elements.

There must be a way to find the current line number.

Former Member
0 Kudos

Well, you can call PROTECT/ENDPROTECT dynamically.

(Using FM CONTROL_FORM)

Rob

Edited by: Rob Burbank on Feb 23, 2010 2:18 PM