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

logic problem

Former Member
0 Likes
424

Hello!

I m to attempt to find out through a if statement to elminate dates

but somehow it doesn't succeeds to me.

Do y have an idea what is wrong here.

Regards

The requirement is to check whether the salesdate of tickets

greater or equal to the departure day if not error.

This logic doesn't work, Why

IF l_salesdate GT <fs_afp>-departure >= dep_date.

  • do nothing it is OK

ELSE.

display error message

endif.

Edited by: erdem sas on Feb 28, 2008 12:20 PM

Edited by: erdem sas on Feb 28, 2008 12:20 PM

Edited by: erdem sas on Feb 28, 2008 12:21 PM

Edited by: erdem sas on Feb 28, 2008 12:22 PM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
409

Hi,

salesdate of tickets

greater or equal to the departure day if not error.


if l_salesdate  GE dep_day.

"do nothing.
else.
message 'Error' type 'E'.
endif.

Thanks,

Sriram POnna.

3 REPLIES 3
Read only

Former Member
0 Likes
410

Hi,

salesdate of tickets

greater or equal to the departure day if not error.


if l_salesdate  GE dep_day.

"do nothing.
else.
message 'Error' type 'E'.
endif.

Thanks,

Sriram POnna.

Read only

Former Member
0 Likes
409

suppose two Dates are in format of ddmmyyyy convert this into a number like yyyymmdd and then try to subtract and put them in conditions.

ex:

date1 = 12.12.2008

date2 = 12.11.2008

dd1 = date1+0(2).

mm1 = date1+3(2).

yyyy1 = date1+6(4).

dd2 = date2+0(2).

mm2 = date2+3(2).

yyyy2 = date2+6(4).

concatenate yyyy1 mm1 dd1 into var1.

concatenate yyyy2 mm2 dd2 into var2.

then var1 and var2 are just numbers.

Edited by: prashanth ganeshwar on Feb 28, 2008 12:31 PM

Read only

Former Member
0 Likes
409

Hi,

Try separating the conditions in ur 'if' condition.

Hope this works.

Regards,

Ramya