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 with multiple values

Former Member
0 Likes
4,100

Hi experts,

Can any body tell me ,

how can we pass a message with muliple values of a select-options parameter with no interval?

select-options: P_WRKAN FOR STZU-WRKAN NO INTERVALS.

if ()

message e001 with ...........

endif.

and what should i write in message 001 in my message-id.

answer will be rewarded.

Sandeep.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,933

Hi Sandeep,

Declare the select-options like this.

select-options: lifnr for lfa1-lifnr no intervals.

if you give like this you can hide the To values but multiple selection icon will be displayed.

If you want to hide the multiple selection icon as give like this.

SELECT-OPTIONS s_carrid FOR spfli_wa-carrid NO-EXTENSION NO INTERVALS.

accordingle figure out what the message should be , in my opinion u dont need one bcause u will not hav the TO value in the selection screen.

Reward if found helpfull,

Cheers,

Chaitanya.

6 REPLIES 6
Read only

Former Member
0 Likes
1,933

Hi,

in message 001 write Hi & & &.

message e001 with 'SDN' 'welcomes' 'you'.

ur msg ll be Hi SDN welcomes you.

Cheers,

Will.

Read only

Former Member
0 Likes
1,933

You can create a message in your message class with meassge ' & & &'.

And while calling you can assign values to these variables.

ie, Message e(01) with 'message1' ' message2'.

Then these message1 and message2 should replaces the &nds.

Read only

Former Member
0 Likes
1,933

Hi,

Declare the select-options like this.

select-options: lifnr for lfa1-lifnr no intervals.

if you give like this you can hide the To values but multiple selection icon will be displayed.

If you want to hide the multiple selection icon as give like this.

SELECT-OPTIONS s_carrid FOR spfli_wa-carrid NO-EXTENSION NO INTERVALS.

For messages:

Use AT SELECTION-SCREEN event to validate screen field.

AT SELECTION-SCREEN.

If field1 is initial.

if field2 is initial.

message E001.

endif.

endif.

Reward Points if found helpfull..

Cheers,

Chandra Sekhar.

Read only

Former Member
0 Likes
1,934

Hi Sandeep,

Declare the select-options like this.

select-options: lifnr for lfa1-lifnr no intervals.

if you give like this you can hide the To values but multiple selection icon will be displayed.

If you want to hide the multiple selection icon as give like this.

SELECT-OPTIONS s_carrid FOR spfli_wa-carrid NO-EXTENSION NO INTERVALS.

accordingle figure out what the message should be , in my opinion u dont need one bcause u will not hav the TO value in the selection screen.

Reward if found helpfull,

Cheers,

Chaitanya.

Read only

Former Member
0 Likes
1,933

Hi Sandeep,

Try the following code:

Where var1 to varN are the fields you might validate on your selection screen.

In your message 001 you need to put '&' at the right places.

The message is displayed.

if()

message e001 WITH var1 var2... varN.

endif.

Regards,

Sagar

Read only

Former Member
0 Likes
1,933

Hi,

If I have misunderstood your question, try this...

In your message 001 put only one '&'.

Then declare a variable OF TYPE c,

Now, whatever values the user enters in the select-options, loop at those values and CONCATENATE each value in the declared variable separated by SPACE.

And then use that variable in your message.

Write this code:

Here S_MATNR is your select-options.

DATA: VAR1(100) TYPE c

LOOP AT S_MATNR.

CONCATENATE S_MATNR-LOW VAR1 INTO VAR1 SEPARATED BY SPACE.

ENDLOOP.

MESSAGE e001 WITH var1.

Regards,

Sagar

Edited by: Sagar Nawathe on Jan 31, 2008 12:42 PM