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: 

Message Class & Text elements ?

Former Member
0 Kudos

what is the difference between Message Class & Text elements ?

1 ACCEPTED SOLUTION

ferry_lianto
Active Contributor
0 Kudos

Hi,

Message Class:

Messages allow you to communicate with users from your programs. They are mainly used when the user has made an invalid entry on a screen.

To send messages from a program, you must link it to a message class. Each message class has an ID, and usually contains a whole set of message. Each message has a single line of text, and may contain placeholders for variables.

All messages are stored in table T100. You create and edit them using Transaction SE91. Once you have created a message, you can use it in the MESSAGE statement in a program.

Text Element:

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.

Regards,

Ferry Lianto

5 REPLIES 5

ferry_lianto
Active Contributor
0 Kudos

Hi,

Message Class:

Messages allow you to communicate with users from your programs. They are mainly used when the user has made an invalid entry on a screen.

To send messages from a program, you must link it to a message class. Each message class has an ID, and usually contains a whole set of message. Each message has a single line of text, and may contain placeholders for variables.

All messages are stored in table T100. You create and edit them using Transaction SE91. Once you have created a message, you can use it in the MESSAGE statement in a program.

Text Element:

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.

Regards,

Ferry Lianto

0 Kudos

Hi Ferry,

Can we use placeholders for variables in Text element ??

Thanks,

Vrushali

0 Kudos

Hi Vrushali,

Its not possible to use placeholders in text element. You need to use multiple text elements and then concatenate into final variable. This can be used to display a message.

0 Kudos

Thanks Archana

Former Member
0 Kudos

Hi,

A major difference is that when you create a message and put all your messages there, then you can use the message class and the messages in any of the programs that you create.Many a times the same message needs to be called in many programs...so in that case the message class is more helpful.

Text elements are local to a program and hence can be used by only in the program in which it is defined.

Hope it was useful.

Thanks,

Sandeep.