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

Passing Message number as an parameter in a Function module

Former Member
0 Likes
1,286

Hi all,

I have to pass the Message number(sy-msgno) as an parameter into an function module

and that Message should be like "PO NUMBER ####### is deleted"

This Funtion module is an loop and PO number changes for every loop

How to define this Message in the Message class.

Regards

Ajay

1 ACCEPTED SOLUTION
Read only

vinod_vemuru2
Active Contributor
0 Likes
1,049

Hi,

Message definition SE91 should be like below.

PO NUMBER & is deleted.

Here & is the place holder where u can pass one value dynamically. If u want to pass 2 dynamic values then u have to use 2 place holder and so on.

eg: PO NUMBER & is deleted by user &.

When u call this message it will display like

PO NUMBER 12345 is deleted by user user1.

Thanks,

vinod.

6 REPLIES 6
Read only

Former Member
0 Likes
1,049

hiiii

you can pass value in one new variable before entering in to FM.then just write msg after executing that FM ..like below

if sy-subrc EQ 0.

MESSAGE I002(ZMSG_PM) WITH w_pono.

endif.

endloop.

regards

twinkal

Read only

Former Member
0 Likes
1,049

Hi Ajay,

You can proceed like this.

For the message number enter text as '& is deleted' in msg class. Suppose this message number is 001 in msg class ZZ then you can print your message as follows:

1message i0001(ZZ) with <PONUMBER from ITAB>

& in message will be replaced with <PONUMBER from ITAB>.

Cheers,

Ramesh.

Edited by: Ramesh Kashigari on Jun 25, 2008 3:22 PM

Read only

0 Likes
1,049

Hi ,

I have to pass the Message number of the Particular Message class only as a parameter to the Function module

I cannot pass the Local variable with my own message as aparameter

Regards

Ajay

Read only

0 Likes
1,049

Your question is not at all clear. What is the function module name. its all confusing.

Ramesh

Read only

0 Likes
1,049

Hi ,

use the syntax

MESSAGE ID 'SU' TYPE 'E' NUMBER FM_variable WITH 'Hugo'.

here FM_variable is the one that you can pass and the rest of the things can be hard coded as per your req or can be passed as well

Regards

Raj

Read only

vinod_vemuru2
Active Contributor
0 Likes
1,050

Hi,

Message definition SE91 should be like below.

PO NUMBER & is deleted.

Here & is the place holder where u can pass one value dynamically. If u want to pass 2 dynamic values then u have to use 2 place holder and so on.

eg: PO NUMBER & is deleted by user &.

When u call this message it will display like

PO NUMBER 12345 is deleted by user user1.

Thanks,

vinod.