‎2008 Apr 04 10:58 AM
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
‎2008 Apr 04 11:05 AM
Hi,
Give & in definition of message in se91(to create message class.
Thanks
--Pradeep
‎2008 Apr 04 11:13 AM
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
‎2008 Apr 04 11:08 AM
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
‎2008 Apr 04 11:10 AM
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.