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
1,258

hi sap,

when i give a worng number i should get the error message with that number so i have coded like this.

message e001(z111) with zqmnum 'Notification number does not exist'.

but i get the message and not with the wrong number can you please help me as to where to correct

this is my select statement:

select QMNUM

TPLNR

QMDAT

EQUNR

STRMN

LTRMN

PRIOK

MSAUS

QMTXT

from viqmel into CORRESPONDING FIELDS OF TABLE ZNOTIFI_DET "ZIOMS_SAP

where qmnum = zQmnum.

if sy-subrc = 0.

else.

message e001(z111) with zqmnum 'Notification number does not exist'.

endif.

regards,

laya.

6 REPLIES 6
Read only

Former Member
0 Likes
983

Hi,

How is your message 001 created in the message class z111.

Create it as follows:-

001 & & & &.

Have a look at message number 319 of message class 01.

Regards,

Ankur Parab

Read only

0 Likes
983

thank you its working and thanks again.

Read only

former_member194416
Contributor
0 Likes
983

Try This message e001(z111) with zqmnum 'Notification number & does not exist'.

Read only

Former Member
0 Likes
983

hi laya

in ur message class z111, for the message have & &

Regards

Sajid

Read only

Former Member
0 Likes
983

Hi,

If you got error in this case then select would have failed.

If you do not have any record in table with this number zQmnum then only u will get error.

Check DB table once.

Regards,

Subba

Read only

Former Member
0 Likes
983

answered