cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Script: text element not printed whereas other text lines are printed

Former Member
0 Kudos

Hello,

I created a Sap Script, but the text element I defined is not printed whereas pure text lines defined in the same window are printed...

Here is how my text element ZLDETXT001 is defiend in SO10:

* This is a standard text in english.

* This is the second line of the standard text in english

Here is what I defined in text editor for window MAIN of form ZLDE01 (SE71):

* My text

/E ZLDETXT001

* My text 2

Here is the code of my print program:


REPORT  ZLDE_PR_ZLD01.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
device = 'PRINTER'
form = 'ZLDE01'
language = SY-LANGU.

CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ZLDETXT001'
function = 'SET'
type = 'BODY'
window = 'MAIN'.

CALL FUNCTION 'CLOSE_FORM'.

And here is what is printed:

My text

My text 2

Here is what I expected:

My text

This is a standard text in english.

This is the second line of the standard text in english

My text 2

I tried using a standard text element, but it is also not printed. So the issue is not with the definition of the text element itself.

Do you have any idea what is going wrong?

NB: the text element was created in language EN and I am logged in language EN

Thank you

Laurent

Accepted Solutions (0)

Answers (1)

Answers (1)

che_eky
Active Contributor
0 Kudos

Have you searched the forums for clues on how to print a standard text in sapscript? The answer should be readily available. As a starter look up help on the INCLUDE command.

Che