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

Raising error message

Former Member
0 Likes
1,961

can anyone help me how to raise an error message with the combination of text and the table fields.

for eg.

error message should be like

"combination of (ekpo-ebeln) and (ekpo-ebelp) should not exist for this particular file for particular customer (kna1-name1).

like this the text and table fields should be combined in one message.

can anyone help me in this. it will more helpful for .

thanks,

Joseph.

8 REPLIES 8
Read only

Former Member
0 Likes
1,084

Hi..,

write it as..

<b>MESSAGE e888(sapabapdocu) WITH ekpo-ebeln ekpo-ebelp file-name kna1-name1.</b>

sapabapdocu is a centrally available message class.. with 888 as its default message number with four place holders..

you can pass onli 4 values to a message !!

reward if it helps u..

sai ramesh

Read only

Former Member
0 Likes
1,084

hi Joseph,

do this way ...

I have a table class ZF with 001 as & & & ..

so iam displaying my error message this way ..

concatenate 'combination of' ekpo-ebeln 'and' ekpo-ebelp into var1 separated by space.

concatenate 'should not exist for this particular file for particular customer' ' (' kna1-name1 ')' into var2 separated by space.

message e001 with var1 var2.

Regards,

Santosh

Read only

Former Member
0 Likes
1,084

Hi,

Create a Message with 'COMINATION OF &1 AND &2 SHOULD EXIST FOR &3 FILE WITH &4.

in your program.

Message E001 with ekpo-ebeln ekpo-ebelp kna1-name1

Regards

Sudheer

Read only

Former Member
0 Likes
1,084

Hi,

You can do this by defining your custom message class and number.

- Go to transaction SE91 and Create a custom class Z01.

- Create a message number 001. Give the text message like this

"<b>combination of &1 and &2 should not exist for this tile for customer &3</b>".

Latter you write code in your program line this.

  DATA: l_ebeln LIKE ekpo-ebeln,
        l_ebelp LIKE ekpo-ebelp,
        l_name1 LIKE kna1-name1.

 l_ebeln = "move ekko-ebeln value here.
 l_ebelp = "move ekko-ebelp value here.
 l_name1 = "move kna1-name value here.

  MESSAGE e001(z01) WITH l_ebeln l_ebelp l_name1.

Let me know if you have any question.

Regards,

RS

Read only

Former Member
0 Likes
1,084

Hi,

MESSAGE 'Combination of & and & should not exist for this particular file for & particular customer' TYPE 'E' WITH ekpo-ebeln ekpo-ebelp kna1-name1.

Reward is useful,

Regards,

Tanmay

Read only

Former Member
0 Likes
1,084

Hi Joseph,

You need to create a message in a bespoke class (123 in ZF for example) which reads:

"combination of & and & should not exist for this particular file for particular customer &."

In your program, ensure that ekpo-ebeln ekpo-ebelp and kna1-name1 (or appropriate workfields) are populated.

You then use "MESSAGE 123(ZF) WITH ekpo-ebeln ekpo-ebelp kna1-name1." to output the message.

The values in the fields listed after "WITH" replace the "&" placeholders in the message text at runtime, in te sequence they are listed.

Hope that clarifies it for you,

Regards

Robin

Read only

Former Member
0 Likes
1,084

goto <b>SE91</b> and create a message as in ur message class (say z001)...

COMINATION OF &1 AND &2 SHOULD EXIST FOR &3 FILE WITH &4

now, in ur program

<b>Message E001(z001) with ekpo-ebeln ekpo-ebelp kna1-name1</b>.

Read only

Former Member
0 Likes
1,084

Hi,

you can do ike this..

create a message in your message class like

001 & and & shoould not exits for this particular file for particular customer &

and write

Message E001 with ekpo-ebeln ekpo-ebelp kna1-name1.

in your program..

Hope this helps you..

reward points if useful

regards

nazeer