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

Date comparison in sapscript

Former Member
0 Likes
546

Hi,

I want to add a data according to a date comparison and tried it as follows:

/: IF &VBDKR-FKDAT& LE '20081231'.

/: DEFINE &WAERS& := 'EUR'.

/: ELSE.

/: DEFINE &WAERS& : = 'ABC'.

/: ENDIF.

it always makes it EUR even if the date is gt 20081231.

What is wrong with this?

Thanks.

deniz.

1 REPLY 1
Read only

Former Member
0 Likes
348

hi

1. first check the date format of VBDKR-FKDAT.

2. then just pass &WAERS& = EUR (dont give define")

3. go to script -> check ->syntax.(it shows the exact point if there is a syntax error).

hope useful.

reg

Ramya