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

appending values to text elements

Former Member
0 Likes
994

Hi All!

I am appending values to text elements through FM Read_text and save_text.I am reading the already available text through read_text and then appending new text and saving the text through save_text.

My problem is that the new text is appending directly to old text but my requirement is to get it in new line.Is it possible.I am referring to text elements on the text tab of VL02N transaction

Regards

Pavan

1 ACCEPTED SOLUTION
Read only

sridhar_k1
Active Contributor
0 Likes
738

Try Populating TLINE-TDFORMAT field with /

Regards

Sridhar

3 REPLIES 3
Read only

sridhar_k1
Active Contributor
0 Likes
739

Try Populating TLINE-TDFORMAT field with /

Regards

Sridhar

Read only

Former Member
0 Likes
738

Hi Pavan,

I think the problem is the table where u append it to the table.

You use READ_TEXT to get the already saved value. This you will be getting in the internal table of structure <b>TLINE</b>. Now you will have to update the new records along with the existing records.

For that what you will have to do is. Take the value of the <b>TLINE-TDFORMAT</b>. 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 <b></b>. 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.

So you will have to take care of this before adding to the existing internal table.

Reward if this is useful.

Regards,

Tushar

Read only

Former Member
0 Likes
738

Hi pavan,

try with TDFORMAT as '/' this will start new line.

or else concatenate the text with CL_ABAP_CHAR_UTILITIES=>NEWLINE.

Regards

vijay