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

How to display message

Former Member
0 Likes
791

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
764

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

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

5 REPLIES 5
Read only

Former Member
0 Likes
764

Hi,

Try checking the value of the field with

if ITAB-FIELD1 CP '-'.

populate error message

endif.

regards,

theja

Read only

Former Member
0 Likes
764

Hi

move the value to a character type and check

if num CO '-'

error message

else.

endif

Regards

Shiva

Read only

Former Member
0 Likes
765

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

Read only

Former Member
0 Likes
764

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.

Read only

Former Member
0 Likes
764

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.