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

fm save_text line insertion

former_member647278
Participant

i am using this fm SAVE_TEXT to write the texts in tcode va03,

how do I write the texts "below" to the other texts (as if from a "send" and wrap)

for example:

text already present: 'AAAA'

text to put in the queue: 'BBBB'

I want the text to be inserted like this:

'AAAA'

'BBBB'

and not like this: 'AAAA BBBB'

(to read the old text I use the read_text fm)

13 REPLIES 13

FredericGirod
Active Contributor
0 Kudos

LINES

TD /

TDLINE AAAA

TD /

TDLINE BBBB

does not work ?

DominikTylczyn
Active Contributor

If I understood correctly your question, it's about filling SAVE_TEXT LINES parameter to either save the texts as one line or as separate lines.

Here are the screen shots with LINES content SAVE_TEXT test environment.

To save texts in seperate lines i.e. as:

AAAA

BBBB

To save texts in one linee i.e. as:

AAAA BBBB

Refer also to the documentation of TDFORMAT field in LINES import parameter of SAVE_TEXT.

Dominik Tylczynski

The list of predefined paragraph formats (* , = and so on) are explained here: SAP Library: Structure TLINE of the Lines Table

0 Kudos

to write the text below the previous one, do I have to put the '=' sign in the tdformat field?

0 Kudos

Yes, that’s what you need to put according to the field documentation.

nick reyan The documentation says:

  • = long line

    This line is not subject to the line formatting in the SAPscript editor. The text contained in this line is also appended directly to the character of the preceding text line which was output last. If this is not required, there must be at least one blank at the beginning of the extended line.

0 Kudos

Hello Nick,

At first, you have to use READ_TEXT for read the actual text in VA03.

The internal table (LINES type TLINE) only contains 'AAAA'

Then you fill the WA of your itab with the new text 'BBBB'.

You insert your WA into Itab : insert wa into itab.

Then you have :

Line 1 : 'AAAA'

Line 2 : 'BBBB'

And now you can save the text with SAVE_TEXT

Cedric

0 Kudos

I tried, it does not wrap

former_member647278
Participant
0 Kudos

puoi fare un esempio di una riga di codice?

can you make an example of a line of code?

where should I put "td /"? if in the previous string I have the value 'AAAA' I add '/' and then 'BBBB' should you write them all over again?

0 Kudos

sorry try can you try :

APPEND wa to itab

michael_piesche
Active Contributor
0 Kudos

These are teh possible formatting parameters for TDFORMAT. You are probably wanting to do * or /.

  • * Default Paragraph
  • B Paragraph, justified
  • C Centered
  • L Paragraph, left-aligned
  • Continuous Text
  • = Extended Line
  • ( Raw Line
  • / Line Feed
  • /= Line Feed and Extended Line
  • /( Line Feed and Raw Line
  • /: Command Line
  • /* Comment Line

You could also view your text and change the editor from "WYSIWYG" (eg Word) to the SAPscript editor and see how it is stored there (see below screenshot for an example).

SAP Library: Structure TLINE of the Lines Table says:

  • * default paragraph

    The format definitions which are specified for the paragraph defined in the assigned style or form as the default paragraph are used for the output formatting of the paragraph involved.

  • / new line

    The subsequent text is written to a new line during output formatting. The formatting specifications of the last paragraph format apply.

michael_piesche
Active Contributor
0 Kudos

nick.reyan, please follow up on your open question.

  • comment answers or your question if there are still open issues.
  • otherwise mark an answer as accepted if it helped you solve your problem
  • or post an answer of yourself and accept it if you found another useful solution yourself
  • or redirect your question to another question that is related and was useful to solve your problem
  • in the end, close your question