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

ERROR MESSAGE

Former Member
0 Likes
818

Hi all,

i have to make a function module

in which there is two import parameter and two table

in one table all the found records are store and in the other error message

like this(here et_return is a table )

ET_RETURN-TYPE = 'E'.

ET_RETURN-MESSAGE = 'Personalnummer & matnr existiert nicht in Infotyp 9993 !' .

APPEND ET_RETURN.

here &matnr is a runtime vaule which is not coming

please help me with the same

my doubt is how i can have

this error message at output

'Personalnummer 450 existiert nicht in Infotyp 9993 !

where 450 is enter at run time.

thanks in advance

anuj

6 REPLIES 6
Read only

Former Member
0 Likes
776

use key word CONCATENATE and create ur message by taking some variables as a string.

a,b,c type string.

a = matnr.

b = 'your message'.

<b>concatenate a b into c separated by space.</b>

reward points please.......

Read only

Former Member
0 Likes
776

If u have the matnr with you in a variable then u can use replace command before appending the work area to internal table as .

replace '&' in ET_RETURN-MESSAGE with variable_name .

Hope this helps you.

Read only

Former Member
0 Likes
776

Hi,

you can also write

ET_RETURN-MESSAGE = 'Personalnummer' & ' MATNR existiert nicht in ...

Regards

Nicole

Read only

Former Member
0 Likes
776

concatenate 'Personalnummer' matnr 'existiert nicht in Infotyp 9993 !' INTO msg1 seperated by space.

ET_RETURN-MESSAGE = msg1.

append ET_RETURN.

here matnr is the variable which contains the value.

Reward points if useful, get back in case of query...

Cheers!!!

Message was edited by:

Tripat Pal Singh

Read only

Former Member
0 Likes
776

Hi,

Declare a local variable(l_msg) of type return-message(use the actual name of the dictionary structure).

concatenate the following strings to this local vairable.Use the following code snippet.

concatenate 'Personalnumber' matnr 'existiert nicht in Infotyp 9993 !' into l_msg.

et_return-message = l_msg.

Reward if helpful.....

Regards,

Dilli

Read only

Former Member
0 Likes
776

Hi,

In function module we can write error messeges in EXCEPTION tab.

in function module source code just u write a code like

if u enter 450

RAISE ''Personalnummer 450 existiert nicht in Infotyp 9993 !'

This messege u have to write EXCEPTION tab also...

<b>reward me if it is use full answer...</b>

praveen