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

and or condition

Former Member
0 Likes
913

please tell me what is to be added if i dont want the output as H or L if one of the value is blank(doesnot have value) in this.

if itab-value_new GT itab-value_old AND itab-value_old NE ' '.

itab-chg = 'H'.

else.

itab-chg = 'L'.

endif.

please advice the condition to put there. thanks in adv.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
850

Hi

Do like this

if itab-value_new GT itab-value_old.

if itab-value_old NE ' '.

itab-chg = 'H'.

else.

itab-chg = 'L'.

endif.

else.

  • Add new value here

endif.

Regards

Aditya

5 REPLIES 5
Read only

Former Member
0 Likes
851

Hi

Do like this

if itab-value_new GT itab-value_old.

if itab-value_old NE ' '.

itab-chg = 'H'.

else.

itab-chg = 'L'.

endif.

else.

  • Add new value here

endif.

Regards

Aditya

Read only

GauthamV
Active Contributor
0 Likes
850

if itab-value_new = ' ' OR itab-value_old = ' '.

itab-chg = ' '.

endif.
Read only

Former Member
0 Likes
850

Hi,

Try liek this.............

IF itab-value_old NE ' '.

if itab-value_new GT itab-value_old .

itab-chg = 'H'.

else.

itab-chg = 'L'.

endif.

ELSE.

itab_chg = 'Whatever u want'.

Endif.

Read only

Former Member
0 Likes
850
if itab-value_new IS NOT INITIAL AND itab-value_old IS NOT INITIAL.
if itab-value_new GT itab-value_old .

itab-chg = 'H'.
else.
itab-chg = 'L'.
endif.
ENDIF.
Read only

0 Likes
850

This message was moderated.