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

use of text element in function module

Former Member
0 Likes
3,394

hi friends what is the use of text element i.e list headings, selection texts,text symbols in a function module. where a can see these things after giving some text into it and activated.

kumar.

hi friends what is the use of text element i.e list headings, selection texts,text symbols in a function module. where a can see these things after giving some text into it and activated.

kumar.

7 REPLIES 7
Read only

Former Member
0 Likes
1,778

Hi,

If you look at the function module, there will be a TOP include porgram, you can look at this in SE80, there You can get these in the menu options.

Regards

Sudheer

Read only

Former Member
0 Likes
1,778

hi,

Text elements are used to make the program language independent. We can maintain translation for these text elements in the required language, so that depending on the logon language text elements are displayed.

Reward if helpful

Read only

Former Member
0 Likes
1,778

hi

<b>Text Symbols</b>

A text symbol is a named data object that is generated when you start the program from the texts in the text pool of the ABAP program. It always has the data type c. Its field length is that of the text in the text pool.

Text symbols, along with the program title, list headings, and selection texts, belong to the text elements of a program. Text elements allow you to create language-independent programs. Any text that the program sends to the screen can be stored as a text element in a text pool. Different text pools can be created for different languages. When a text element is changed or translated, there is no need to change the actual program code. Text elements in an ABAP program are stored in the ABAP Editor (see Text Element Maintenance).

In the text pool, each text symbol is identified by a three-character ID. Text symbols have a content, an occupied length, and a maximum length.

Examples for text symbols in an ABAP program:

ID

Contents

Occupied length

Maximum length

010

Text symbol 010

15

132

030

Text symbol 030

15

100

AAA

Text symbol AAA

15

15

In the program, you can address text symbols using the following form:

text-###

This data object contains the text of the text symbol with ID ### in the logon language of the user. Its field length is the same as the maximum length of the text symbol. Unfilled characters are filled up with spaces. You can address text symbols anywhere in a program where it is also possible to address a variable.

If there is no text symbol ### in the text pool for the logon language, the name text-### addresses the predefined data object space instead.

You can also address text symbols as follows:

... 'textliteral'(###) ...

If the text symbol ### exists in the text pool for the logon language, this is the same as using text-###. Otherwise, the literal 'textliteral' is used as the contents of the text symbol. This is only possible at positions in the program where a variable can occur. You can create a text symbol for any text literal by double-clicking the literal in the ABAP Editor and replacing the literal with the text symbol.

You should use text symbols in your program whenever they need to be language-specific - for example, in a WRITEstatement.

If you program a list whose layout depends on field lengths, you should be careful, since the field length of text symbols will be different in different languages. You should therefore set the maximum field length of the field symbol so that there is enough space to translate it into other languages. For example, the English word 'program' has seven letters, but its equivalent German translation 'Programm' has eight.

The following example shows the use of text symbols in WRITE statements.

SET BLANK LINES ON.

WRITE: text-010,

/ text-aaa,

/ text-020,

/ 'Default Text 030'(030),

/ 'Default Text 040'(040).

If the text symbols of the above screen shots are linked to this program, the output looks as follows:

Text symbols 020 and 040 have no text symbols. For text symbol 020, the system displays a space. This is only displayed in this case because the blank line suppression has been turned off (see Creating Blank Lines).

regards

ravish

<b>plz reward if helpful</b>

Read only

Former Member
0 Likes
1,778

Hi,

to view your text element ---

menu 'goto' -> text elements

Read only

former_member673464
Active Contributor
0 Likes
1,778

hi,

Text element are used to maintain program texts in different languages. Any text that a program displays on the screen can be maintained as a text element.

regards,

veeresh

Read only

Former Member
0 Likes
1,778

hi kumar,

text elements are used for language independent ...as they are jus referring to some text literal or some constant value...these can be seen in ur se38 t-code for ur program itself by going to <b>GOTO </b>menu and then text elements and then <b>TEXT SYMBOLS</b> or <b>Selection etxts</b> (for select options or parameters declared)...

hope this information helps u...

reward if useful..

thank u,

Thasneem

Read only

Former Member
0 Likes
1,778

hi Kumar,

List heading : used to specify heading for normal reporting

Selection texts : we can give our text for selection screen fields.

for example we took lifnr

select-options : s_lifnr for lfa1-lifnr.

if we give Selection text for s_lifnr Vendor account number,in stead of s_lifnr it will show Vendor account number.

Text-symbols: we can use them for replacing hard coated texts

for example we have to print "SAP" if we specify text-001 as SAP we can use this text-001 when ever we require.