cancel
Showing results for 
Search instead for 
Did you mean: 

Capture formatted Standard Text into internal table in ABAP

former_member1259992
Participant
0 Kudos

Hi All,

I have a requirement to pick up Standard Texts maintained in SO10, and to capture them in an internal table in a program for transfer to emails and/or other text outputs.

READ_TEXT returns the information, but does not process any formatting indicated in the tag column (or within the text lines).

Obviously I can extract the character part of each text line returned by READ_TEXT, but wondered whether there was any way of doing this directly via a function, particularly if the lines contain character formatting indicators.

I am sure there must be a function which can output a Standard Text as formatted character strings.

Has anybody done this?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

U can try to get otf data by fm PRINT_TEXT and then convert the OTF to ASCII by CONVERT_OTF

Max

former_member1259992
Participant
0 Kudos

Thanks for the feedback Max.

That option gets me most of the way there, although FM PRINT_TEXT seems to be introducing some kiind of dummy page header line to my Standard Text.

I guess I'll have to go digging around in the interface options to see how to suppress that.

At least this process gets rid of character entries and such-like from the body of the text so the output is readable!

Former Member
0 Kudos

Hi

I suppose you're speaking about the first line with page number....don't I?

If it's so, you should considere the standard text is printed by standard sapscript SYSTEM: you can check it by SE71

Here there's the window HEADER just to printed the header line.

So you can try to copy the standard sapscript SYSTEM into ZSYSTEM, where you delete the HEADER window or the line with page number

So before calling PRINT_TEXT you can replace the form to be used in the header data: HEADER-TDFORM, I mean you can insert your sapscript instead of the standard one

Max

former_member1259992
Participant
0 Kudos

Hi Max,

That seems to give me a working solution.

It's a shame that this requires multiple steps - I had hoped there would be a single function for this.

I will leave the question open for a little longer before marking it answered in case anyone else has an alternative.

Regards

Robin