2008 Feb 07 1:26 PM
Hi experts,
I have a internal table with values, in that field t_data-NAFAZ condains records with plus and mines values, while executing the program if the field i_data-nafaz contains mines values user need a error message. for that how i can give the condition?
This field condains mines values raise the massege....
any one plz help this.
Mohana
2008 Feb 07 1:33 PM
Hi,
As NAFAZ is a decimal field you can use;
IF t_data-NAFAZ LT 0.
Error
ENDIF.
or
IF t_data-NAFAZ < 0.
Error
ENDIF.
Regards,
Nick
2008 Feb 07 1:29 PM
Hi,
Try checking the value of the field with
if ITAB-FIELD1 CP '-'.
populate error message
endif.
regards,
theja
2008 Feb 07 1:29 PM
Hi
move the value to a character type and check
if num CO '-'
error message
else.
endif
Regards
Shiva
2008 Feb 07 1:33 PM
Hi,
As NAFAZ is a decimal field you can use;
IF t_data-NAFAZ LT 0.
Error
ENDIF.
or
IF t_data-NAFAZ < 0.
Error
ENDIF.
Regards,
Nick
2008 Feb 07 1:34 PM
Hi Mohana..
You can do like this...
data : ch type i.
loop at i_data.
i = i_data-nafaz+0(1).
if i = '-'.
message 'minus values' type i.
endif.
endloop.
Regards
sandeep.
2008 Feb 07 1:35 PM
Hi,
Use pattern statements of ABAP like CP or CA or CO ertc.,please refer to SAp hep for more details and usage.
if itab-field CP '-'
Message Exxx.
endif.
Hope this is helpful.
KindRegards,
khader.