12-05-2006 6:41 AM
Actually i have one doubt in message class. I want create message for following logic.
If the records already exits in database table ,
whatever input i will given in input fields like entry type and material no ,it will need in message.
i want rise the error message in my code like "Record entry type B Material no 029585888 already exits in database table".
I done the coding like.........
in SE80.
IF sy-subrc = 0.
MESSAGE e039 with zdbt-enttyp
zdbt-matnr.
ENDIF.
in SE91.
Record entry type &1 Location &2 already exits in database table.
is it correct? it s not working properly..
could you advice me.......
12-05-2006 6:53 AM
Hi,
In SE91,create 039th entry as
Record entry type &1 Material No. &2 already exits in database table.
Then save and activate.
12-05-2006 6:50 AM
Hi,
Wats the doubt u hav e... ellaborate plz..
It should work fine .. instead of location u can give Material ..
12-05-2006 6:53 AM
Hello Raju
The only possible problem I see is that in your report you send a message of the wrong message class. Assuming that your message class is ZMSG then assure that your report begins with:
REPORT zreport MESSAGE-ID zmsg.
...
IF sy-subrc = 0.
MESSAGE e039 with zdbt-enttyp
zdbt-matnr.
ENDIF.
Regards
Uwe
12-05-2006 6:53 AM
Hi,
In SE91,create 039th entry as
Record entry type &1 Material No. &2 already exits in database table.
Then save and activate.
12-05-2006 6:59 AM
Hi Jayanthi.
Ya,I done it but its not working ,it displays like "Record entry type 1 Material 2 already exits in database table."
this message not fecth the input from selection screen to message class.
Advice me........
12-05-2006 7:08 AM
Raju,
try this way..
at selection-screen.
select enttyp matnr from ztab
into wa
where enttyp = p_enttyp
and matnr = p_matnr.
if sy-subrc <> 0.
MESSAGE e039 with p_enttyp
p_matnr.
endif.
Regards
Vijay
12-05-2006 7:54 AM
12-05-2006 7:06 AM
Hi,
If u wan t the validation at selection screen then u should put the samem piece of code under thevent :
AT SELECTION-SCREEN.
Hope this helps.
12-05-2006 7:11 AM
Hi
try giving this in your message class
Record entry type & Material No. & already exits in database table.
thanks
pavan