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: 

How to get > 4 fileds in throwing a MESSAGE ??

Former Member
0 Kudos

Hi Experts,

my code:

<i><b> MESSAGE e000(z1) WITH 'Missing material' xlips-matnr

'batch' xlips-charg.</b></i>

I wuld like to hv:

<i><b>MESSAGE e000(z1) WITH 'Missing material' xlips-matnr

'batch' xlips-charg

'plant' xlips-werks.</b></i>

Issue: system saying that, ONLY 4 fileds r allowed for WITH clause in Message!!

Pls let me know that, Wht is the alternative to get the same result?

thanq.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Try the following code:


data: l_msg(250) type c.
concatenate 'Missing material' 
            xlips-matnr
            'batch' 
            xlips-charg
            'plant' 
            xlips-werks
            into l_msg separated by space.
message l_msg type 'E'.

Works in ECC5 or ECC6, not sure about earlier versions.

Andrew

3 REPLIES 3

Former Member
0 Kudos

Why not concatenate 'batch' xlips-charg and 'plant' with xlips-werks to reduce the amount of variables passed with the message statement.

Former Member
0 Kudos

Try the following code:


data: l_msg(250) type c.
concatenate 'Missing material' 
            xlips-matnr
            'batch' 
            xlips-charg
            'plant' 
            xlips-werks
            into l_msg separated by space.
message l_msg type 'E'.

Works in ECC5 or ECC6, not sure about earlier versions.

Andrew

Former Member
0 Kudos

Hi Srikhar,

This is the limitation with the SAP.

The better way is get all the messages in a single line using CONCATENATE and then use MESSAGE.

Regards,

Atish