cancel
Showing results for 
Search instead for 
Did you mean: 

How to change format of the text returned by INCLUDE

Former Member
0 Kudos

Hi

What is effect of following line?

INCLUDE &T166K-TXNAM& OBJECT &T166K-TDOBJECT& ID &T166K-TDID& LANGUAGE

When I debug this script, it is giving some text. I want to print the text given by this in BOLD & CAPITAL.

How to do this

Pls. help

Harshada

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Harshada,

The INCLUDE statement will print contents of a standard text (whose name is obtained dynamically from TXNAM field of table T166K) in your script. So if you want this to be displayed in capital letters you have 2 options -

1. Make the contents of the standard text in capital letters (difficult to do because

there can be many standard texts). Moreover the text can be used somewhere

else also where it may not be needed in capital letters. So use next alternative

method.

2. Read the standard text in your print program using READ_TEXT fm.

Example.

CALL FUNCTION 'READ_TEXT'

EXPORTING

id = T166K-TDID

language = gv_lang

name = T166K-TXNAM

object = T166K-TDOBJECT

TABLES

lines = gt_letter_line

EXCEPTIONS

id = 1

language = 2

name = 3

not_found = 4

object = 5

reference_check = 6

wrong_access_to_archive = 7

OTHERS = 8.

The contents of standard text will now be present in table gt_letter_line.

Convert contents of the table to uppercase using following statement.

LOOP AT gt_letter_line INTO wa.

  • Convert to uppercase

TRANSLATE wa TO UPPER CASE.

  • Call WRITE_FORM fm for the window/element of script

.....................................

ENDLOOP.

Replace the include statement in script by variable wa.

Now to make it bold, you can use a paragraph format(in FONTS).

Award points if found useful.

Regards

Indrajit

Answers (2)

Answers (2)

Former Member
0 Kudos

hi

s...u can do it...while giving the Insert Text -> Standard Text -> after giving the name of the standard text, there is a check box Expand Immediately -> check it...then define your paragraph format which has the Bold format attached to it...you will get output in bold

if helpful, reward

Sathish. R

dev_parbutteea
Active Contributor
0 Kudos

HI,

Define a paragraph format for displaying in bold! And the &T166K-TXNAM& returned is already in capital i think.

Regards,

Sooness.