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: 

call text from a message class out of a include

former_member183924
Active Participant
0 Kudos

Hi experts,

I created a report with message-id ZMESSAGE_CLASS1. This class is filled with 30 texts.

REPORT  zreport1   MESSAGE-ID ZMESSAGE_CLASS1.

Then I added a few includes for various routines (PBO, PAI, POV, ...). When I call a text via lv_textvar = text-001 or MESSAGE i002 from the report, all works fine. But if I call these texts out of any include it won't work.

If I view a include and go over the menu: Goto >> Messages I can see my message class.

How can I implement or call the text elements right from the message class? Do I need to create a Module-Pool first?

Thanks, regards,

Steffen

1 ACCEPTED SOLUTION

Former Member
0 Kudos

u can use fm write_message

5 REPLIES 5

Former Member
0 Kudos

u can use fm write_message

0 Kudos

I'm sorry: I figured out that the statements:

MESSAGE E003.

works well in Includes.

Just the statements with

lv_textvar = text-003.

doesn't work. The text text-003 have to be a lokal text symbol for the include and cannot be refer to the message class.

How is it possible to refer to the message class for a var?

Thanks, regards

Steffen

0 Kudos

Hi,

Text symbols are no where related to your message class.It has to be declared locally in the program.

Cheers,

Hakim

0 Kudos

Hi

Also note that Message Class is an independent repository object where as text symbols are not.

So you cannot call message using text-001.

Cheers,

Hakim

0 Kudos

> I'm sorry: I figured out that the statements:

>

MESSAGE E003.

> works well in Includes.

>

> Just the statements with

>

lv_textvar = text-003.

> doesn't work. The text text-003 have to be a lokal text symbol for the include and cannot be refer to the message class.

>

> How is it possible to refer to the message class for a var?

>

> Thanks, regards

> Steffen

if u want todo like this v_textvar = text-003

use write message to retrieve the message text thru write_message then assign the text to variable