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 Elements

Former Member
0 Likes
796

What is the use of text elements in program?In that they have given Selection Texts,Field Symbols....?When and how to use?

6 REPLIES 6
Read only

Former Member
0 Likes
765

they are used because they get converted in login language that means if u login by chinese language your text that u created in english will b converted to chinese

<REMOVED BY MODERATOR>

KEEP ROCKIN

vivek

Edited by: Alvaro Tejada Galindo on Jan 23, 2008 6:07 PM

Read only

Former Member
0 Likes
765

Hi,

If you want to write text in the Selection Screen you have to write it in the Selection Texts.

In the Selection-screen suppose you are giving a parameter as p_matnr and if you want to write material number in the selection-screen then you have to write it in the Selection-texts.

In the Text Elements go to Selection -Texts and next to the parameter you defined write the text whatever you want in the Selection screen.

Regards,

Roja Velagapudi.

Read only

Former Member
0 Likes
765

Hi,

The main purpose of text elements are language dependable, Selection texts can be used as the text of selection screen fields.

Rgds,

Bujji

Read only

Former Member
0 Likes
765

Text element maintenance is a tool in the ABAP Workbench that makes it easier to maintain program texts in different languages. Any text that a program displays on the screen can be maintained as a text element.

text elements make it very easy for programmer to code and provide some wndrful features.

like

in selection text if u click in dictionary check box then ,it will take all the properties of that elements data element.

<REMOVED BY MODERATOR>

thnx

kushagra

Edited by: Alvaro Tejada Galindo on Jan 23, 2008 6:08 PM

Read only

Former Member
0 Likes
765

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

Former Member
0 Likes
765

Hi,

Using text elements you give the user defined description to the technical name. And using this text element the text will change depend on the login language.

Thanks,

Sriram Ponna.