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

text element

Former Member
0 Likes
6,247

what is text elements..how to create and how to use?

5 REPLIES 5
Read only

Former Member
0 Likes
1,417

Text elements are used to store texts displayed on the selection screens or output screens of ABAP reports, but are not hard-coded in programs. The different types of text element include:

Report or program titles

List headers

Column headers

Selection texts

Text symbols

Check this link for text element creation.

http://help.sap.com/saphelp_nw04s/helpdata/en/e3/960a0beb0711d194d100a0c94260a5/frameset.htm

Read only

Former Member
0 Likes
1,417

Text elements are used to store text , the basic purpose of using this is that the same program can be run in diffrent languages and so the titles/headers must be in the language the program is execued , if you hardcode it in the program this will not work , so we use a text elemnt and the system selects the language for the text element based on the language in which the user has logged in.

You can translate a text element by using the option in the menu

Goto--> Translation.

They are useful when the program is used in other languages.

So that they are automatically converted to that language.

So define the texts in the text elements and use their ID's like (TXT-05) in the code

don't sue the complete texts in the program.

selection texts are used to give meaning ful names for the fields on selection screen

goto your program in display mode in se38

in menu gototext elementsselection texts

Field symbols offer functionlity similar to pointers in other programming languages. It does not occupy memory for the data object, it points to the object that has been assigned to the field symbol. You use the assign command to relate to the data object. After the assign operation you can work with field symbol in the same way as with the object itself.

You define the field symbol as: field-symbols <fs>.

Consider this:

field-symbol <fs>.

data field value 'X'.

asssign field to <fs>.

The field symbol <fs> now inherits all the properties from the assigned field, and you can work with the field symbol in the same way as with the field itself.

Take a look at the examples given here for working with field symbols:

http://www.sapgenie.com/abap/code/chap2401.txt

http://www.sapgenie.com/abap/code/chap2402.txt

http://www.sapgenie.com/abap/code/chap2403.txt

http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3860358411d1829f0000e829fbfe/content.htm

http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/field_sy.htm

http://searchsap.techtarget.com/tip/1,289483,sid21_gci920484,00.html

Simple program.

data : letter(10) .

field-symbols : <fs> type any.

assign letter to <fs> type 'X'.

write <fs>.

Simple program.

TYPES: BEGIN OF NAME,

NEXTNAME(10),

FIRSTNAME(10),

LASTNAME(10),

END OF NAME.

FIELD-SYMBOLS <F> TYPE NAME.

DATA: LINE(30).

LINE = 'JOHN SMITH SHRI'.

ASSIGN LINE TO <F> CASTING.

WRITE: / 'Lastname:', <F>-LASTNAME,

'Firstname:', <F>-FIRSTNAME,

'Nextname :', <F>-NEXTNAME.

Read only

0 Likes
1,417

nice ans

Read only

Former Member
0 Likes
1,417

hi

good

Text elements cover any descriptive text that appears on the selection screen or output screen of an ABAP/4 program.

You can store these text elements outside the program in language-dependent text pools. Your program automatically uses the text elements of the user's logon language.

You can create and maintain text elements without changing the program coding. You can create standard text pools, which you can copy from program to program. If you consequently work with text symbols only and do not use string literals in WRITE statements, your program becomes language-independent. Only the text elements from the original language text pool must be translated to other languages.

The translation of text elements is fully supported by the ABAP/4 workbench. From an existing text pool for the original language, a translator can create the text pools for different other languages.

http://sap.mis.cmich.edu/sap-abap/abap05/sld019.htm

thanks

mrutyun^

Read only

Former Member
0 Likes
1,417

text elements are used to give user defined titles and headings to ur reports........instead of taking the title directly from attributes if u define te4xt elements and re exe cute ur program ur defdined text wud appear .....

to define text elements ...

menu bar .... goto ..... text elements ..... enter headings and columns .... save activate ,,,,, re exe ur report ..... c the impact ....

bye take care