cancel
Showing results for 
Search instead for 
Did you mean: 

How to indicate a message by a planning function type in an ABAP-OO-Class

Former Member
0 Kudos

Hello,

I integrated a message with following statement " MESSAGE i003(upf1) WITH v1 v2." in an ABAP-OO-Class, which is used by a Planning Function Type. The function type works but it´s not indecated after executing the Planning Sequence, neither from web template nor in the planning modeller.

Does anybody know this problem/behavior?

Thank for response

Andreas

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

please use something like this:


data: l_dummy type char100.

message w016(zplanning) with 'XXXX' 'YYYY' into l_dummy.
i_r_msg->add_msg( ).

Regards Matthias

Former Member
0 Kudos

Hi Matthias,

many thanks for your answer.

The first step is well done,

but the variables in the 'with-statement'

are not indecated.

Regards

Jörg

Former Member
0 Kudos

Hi Joerg,

how about this:


data: l_dummy type char100.
 
MESSAGE i003(upf1) WITH v1 v2  into l_dummy.
i_r_msg->add_msg( ).

You do not need to take special care about the variables. Just raise the message as you want it to be raised. The only thing you need to do is to raise the message into a string (..into l_dummy). The interface IF_RSPLFA_MSG and the implemetation of add_msg is going to read the standard message variables (SY-MSGNO, SY-MSGID, SY-MSGTY, MSGV1 ...). You just need to throw the message

and call i_r_msg->add_msg( ) e.g. in the execute method of your customer planning function.

Please give it a try and take a look at it in the debugger.

Hope this helps.

Matthias Nutt

SAP Consulting Switzerland

Former Member
0 Kudos

Hi Matthias,

thanks a lot.

If I don't use a text, specified by the number in the Message Class,

it works.

for example:

MESSAGE i000(upf1)

regards

Jörg Schmitt