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 class

Former Member
0 Likes
703

hi all,

i have a problem i.e., where as in the internal table there is some data regarding vendor and document number.

if in the internal table gt_itab , suppose for particular vendor eg 1234 has no document no 3031456.

then a message has to display saying for the vendor 1234 there no document no 3031456.

how to get this message.

how to write in message class, do we need to give & or internal table.

please help me.

thanks

4 REPLIES 4
Read only

pradeep_nellore
Participant
0 Likes
670

Hi,

Give & in definition of message in se91(to create message class.

Thanks

--Pradeep

Read only

0 Likes
670

report name message-id zred.

double click zred will bring the message class screen

There create a message

message I010(zred) with wa_xxxx-yyyy.

wa_xxxx- work area name

yyyy- vendor document number variable.

zred - message class

I010- Information message

In the message class zred

010 'Give your text message along with &'

& will replace the value of the variable used in the message statement

Hope this helps

Read only

Former Member
0 Likes
670

Hi,

Follow the steps bellow,i hope it will solve your problem.

1.Select the data into internal table.

2.Read the internal table data by using READ statement.

3.Check if document number is initial then write code as

MESSAGE W001(ZMSG).

4.Double click on ZMSG then it will go to message class to

create it.

5.Save the message class and come back to your original code.

Reward,if useful.

Thanks,

Chandu

Read only

kiran_k8
Active Contributor
0 Likes
670

Kiran,

data : msg_text type string,

IF itfinal[] IS INITIAL.

MESSAGE 'No Values exist for the Selection.' TYPE 'S'.

STOP.

else.

describe table itfinal lines number.

concatenate 'Total no of vendors' number into msg_text SEPARATED BY '-'.

message msg_text type 'S'.

ENDIF.

You can use the above one as template to get the desried result.The above one gets the total no of records in the internal table and displays as a success message one the report gets executed.In the same way you can check

loop at itab.

if itab-docno is initial

...

...

...

endif.

endloop.

K.Kiran.