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: 

How to create a text element with key more than 3 characters.

Former Member
0 Kudos

Hi Experts,

I have made a Z program for displaying maintenance report..

Here it calls a standard peice of code RSAQEXCE for displaying the header.

in this function pool it has a internal table textpool which contains the text element list, and it reads textpool with key = 'GH00'.

'GH00' is the text element key/name now that in standard they have created text element key as GH00 but in my Z code it allows only 3 characters i.e. GH0.

Now the report is working fine but the header is not getting displayed and header is displayed page wise... and RSAQEXCE report i am unable to make Z of it.

Please let me know if there is any way to have text element key as GH00

Regards,

Raj

1 REPLY 1

Former Member
0 Kudos

Hi!

I think it's "H00" text what you need. Just check out the help below...

Text Elements

Text elements are used to store texts which are not supposed to be hard-coded in programs. You can maintain text elements outside the program that use them (in the ABAP/4 Editor, choose Goto -> Text elements). They are particularly suitable for maintaining texts in multiple language applications.

The following types of text elements exist:

Program titles

List headers

Column headers

Selection texts (text belonging to selection criteria

and program parameters)

Text symbols (constant text passages)

The structure of text elements is defined by the structure TEXTPOOL which contains the following fields:

ID:

A single character for the text element type. The following values are possible:

R - Program titles

T - List headers

H - Column headers

S - Selection texts

I - Text symbols

KEY:

Key field which can contain any of the values below, depending on the text element type:

H - Number of a line with column

headers (001 - 004)

S - Max. 8-character name of a selection

criterion or program parameter

I - 3-character number of a text symbol

For program titles and list headers, the field is blank.

ENTRY:

Text belonging to the text element, max. 255 characters

LENGTH:

Length of the text

Examples

The table below contains some typical values for textelements.

ID KEY ENTRY LENGTH

-

-


H 001 'Name Age' 10

I 100 'Tax' 10

R , B>'Test program' 12

S CUST 'Customer' 8

T , B>'Sales' 10

Notes

LENGTH contains the length of the text. If thetext is to be translated into another language at a later stage, thevalue chosen for LENGTH is generally greater than that for theoriginal language. In this way, you can allow for translations that arelonger.

There are two ways you can address text symbols - withTEXT-xxx or with '...'(xxx). Here, xxx stands forthe number and ... for the text of the text symbol.

The first form requires an appropriate text to be stored under thenumber xxx. If this is not the case, the output will be blank.

The second form makes programs eaiser to read. The text in quotationmarks should match the text stored under the text symbol. If this isnot the case, the text stored under the text symbol is used, unless thenumber xxx has no text. In this case, the text in quotationmarks is used.

Example: If the text symbol with the number 001 contains'Please enter your name', the command

WRITE: / TEXT-001,

/ 'Please enter your name'(001),

/ 'What is your name?'(001).

outputs "Please enter your name" three times.

You can perform a comparison of texts used in a program with textsstored under text symbols from the ABAP/4 program editor by selectingGoto -> Text elements and then choosing Compare textsymbols.

If the LENGTH you choose for text symbols is greater than thelength of the actual text, the system interprets this as if it has topad the text up to the length LENGTH with blanks. When you usethe notation '...'(xxx), this means that the text in quotationmarks must be explicitly padded Text with blanks up to the length LENGTH. Otherwise, the text stored under the text symbol wouldnot match the text in quotation marks (see note 2).

Example: If the text symbol with the number 036 contains'Name', but is defined with the length 10, the command

WRITE: / SY-VLINE, TEXT-036, SY-VLINE,

/ SY-VLINE, 'Tax '(036), SY-VLINE,

/ SY-VLINE, 'Tax'(036), SY-VLINE.

outputs "| Tax |" three times. In the third line, the textstored under the number 036 is output in the length 8 and not asthe three-character long text "Tax". When you perform acomparison of these text elements (see note 2), the text symbols in thesecond and third lines are recognized as different.

Regards

Tamá