2007 Jan 22 5:27 AM
hi guys,
I am selecting some data from some table.
If data not found i should get the following message.
No number range maintained in table <zabc1> for company code <vbrk-bukrs>
how should i write a ERROR MESSAGE for above.
THE TABLE NAME SHOULD BE CONSTANCT AND COMPANY CODE VBRK-BUKRS WILL BE CONSTANT.
HOW SHOULD I DO.
AHMED
2007 Jan 22 5:32 AM
if itab[] is initial .
messagee398(00) with 'No number range maintaned in table' <var holding tab name> 'for company code' <var holding bukrs> .
endif .
Raja
hi guys,
I am selecting some data from some table.
If data not found i should get the following message.
No number range maintained in table <zabc1> for company code <vbrk-bukrs>
how should i write a ERROR MESSAGE for above.
THE TABLE NAME SHOULD BE CONSTANCT AND COMPANY CODE VBRK-BUKRS WILL BE CONSTANT.
HOW SHOULD I DO.
AHMED
2007 Jan 22 5:32 AM
if itab[] is initial .
messagee398(00) with 'No number range maintaned in table' <var holding tab name> 'for company code' <var holding bukrs> .
endif .
Raja
2007 Jan 22 5:33 AM
select vbeln from ztable into table it_vbrk
where bukrs = s_bukrs.
if sy-subrc <> 0.
message e000(0) with 'Maintain data for' s_bukrs 'in table ztable'.
endif.
2007 Jan 22 5:34 AM
hi,
try this.
MESSAGE s005(zm00) WITH p_table p_cmpany_code.s005 -> meesage number
s->status bar
zm00 -> message class.http://help.sap.com/saphelp_nw2004s/helpdata/en/d1/801b3e454211d189710000e8322d00/frameset.htm
Regards
anver
2007 Jan 22 5:38 AM
Hi Ahmed,
you can use 1) message id '<message class>' type 'E' number '<message number in message class>'
create a message class in se91 and give the messages for the particular number and give the number in the above statement.
2) MESSAGE text TYPE 'E'.
3) MESSAGE e<number>(messageclass) WITH text-002.
Message was edited by:
Pradeep Kumar
2007 Jan 22 5:38 AM
Hi Ahmed,
U can refer this.
For Eg: Select *
into corresponding fields of itab
from mara .
If sy-subrc NE 0.
message A000. --> error message.
endif.
where u can maintain the A000 as the error message in the message class(se91).
Regards,
Neslin.
2007 Jan 22 5:41 AM
Hi,
first retrieve the data as
select field1 field2 from <dbtable> into table itab
where bukrs in s_bukrs.
if sy-subrc ne 0.
message E001(ZMESSAGE).
endif.
In the message class ZMESSAGE for the number 001 u should write
'No number range maintaned in table' <var holding tab name> 'for company code' <var holding bukrs> .
Regards,
Nagaraj
2007 Jan 22 6:50 AM
Hello,
check out the 'MESSAGE' statement in the sap library.
Regards,
Shehryar Dahar
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |