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

message classes for error message

rnb86
Participant
0 Likes
3,669

Hi experts,

i have a query. I am using MESSAGE e000(zre) WITH text-001 format for displaying a text element text as an error message.

Here e000 contains & & & & in the zre message class.

My query is, i want to display a variable at runtime in that error message.

The message is "the employee number 10000 is not assigned".

I want the value 10000 to be displayed dynamically.

Please advise.

5 REPLIES 5
Read only

Former Member
0 Likes
1,203

Hi RNB,

The message number u have selected maynot serve ur purpose.

Select another message number which looks like ' The Employee Number &1 is Not Assigned'.

The value from text-001 will replace the &1 while displaying.

U can make it dynamic by removing text-001 and assigning the variable holding the employee number.

awrd opints if useful

Bhupal

Read only

Former Member
0 Likes
1,203

Hi,

create the error message as "I want the value &1 to be displayed dynamically".

and then write in program as message E000(msgclass) with '10000'.

or if the number is variable write like this.

var = '10000'.

message E000(msgclass) with var.

rgds,

bharat.

Read only

Former Member
0 Likes
1,203

Hi,

That can be done in following way.

Ex,

v_empnum = 1000.

Message e000(Zre) with 'Employee number' v_empnum 'is not assigned'.

in the above method you can specify up to four text elements.

The other way you can CONCATENATE the message and number in to another variable and use that

for display.

Regards,

Jallu

Read only

graghavendra_sharma
Contributor
0 Likes
1,203

it is simple.

take two text elements.

text-001 = 'the employee number'

text-002 = 'is not assigned'

now

MESSAGE e000(ZRE) with text-001 EMPNO text-002.

or

you can even CONCATENATE these texts into a string variable and use it as a message

CONCATENATE 'the employee number'
                         EMPNO
                         'is not assigned' 
         INTO W_MSG separated by space.

MESSAGE e000(zre) with w_msg.

NOTE: Reward points if helpful

Read only

Former Member
0 Likes
1,203

Create a new message in the same message class as lets say its number is 111

the employee number & is not assigned

MESSAGE e111(zre) WITH <emp no>.

Regards,

Atish