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

printing continuous text on sap script

Former Member
0 Likes
3,394

hi,

i want to print text of 80 characters on a sap

script. but if the user presses "enter " key

while entering the text, we have to display the

text on next line.till then we have to print

max. 80 characters.

Can we identify when the user has pressed "enter " key

is there any character like "\n" to identify at what

point the user has pressed "enter" key ?

Rgds,

Ravindra

2 REPLIES 2
Read only

Former Member
0 Likes
2,535

If the text is stored as a long text the format and lines are stored as the way the user has entered. so, if use the INCLUDE command, then it should show the way the user has entered.

Regards,

Ravi

Note : Please mark the helpful answers

Read only

Former Member
0 Likes
2,535

Hi Ravindra,

The data which is entered in SAP texts will be stored in some Texts. This you can retrieve from using the FM <b>"READ_TEXT"</b>.

You use READ_TEXT to get the already saved value. This you will be getting in the internal table of structure TLINE.

Take the value of the TLINE-TDFORMAT. This will be set to <b>*</b> whenever a new line begins, the corresponding text will say whether it is a continuous line or a new line. So for every new line then this field would be set to *. So you will have to take care of that.

for ex. the content is like this:-

<b>Type a reply to the topic using the form below.

When finished, you can optionally preview your reply by clicking on the "Preview" button.

Otherwise, click the "Post Message" button to submit your message immediately.</b>

This will be stored in the internal table as

<b>TDFORMAT TLINE</b>

  • Type a reply to the topic using the form

below.

  • When finished, you can optionally preview

your reply by clicking on the "Preview"

button.

*

  • Otherwise, click the "Post Message" button to

submit your message immediately.

Whenever you encounter the *, it means its a new line.

Reward if this is useful.

Regards,

Tushar

Message was edited by: Tushar Marshall Dass