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

Problem using SY-DATUM in (SQL) BETWEEN

luis_rod
Participant
0 Likes
1,240

Hi all,

Have the following (pseudo) code:

SELECT myfile~field1 FROM myfile INTO (w_field1) WHERE sy-datum between myfile~begda and myfile~endda

I get a syntax error that states that sy-datum is unknown.

Any ideas?

Thanks,

Luis Rodríguez

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,024

Hi, you can not use sy-datum in SQL.

check this post

https://archive.sap.com/discussions/thread/1044301

Regards

Miguel

Hi all,

Have the following (pseudo) code:

SELECT myfile~field1 FROM myfile INTO (w_field1) WHERE sy-datum between myfile~begda and myfile~endda

I get a syntax error that states that sy-datum is unknown.

Any ideas?

Thanks,

Luis Rodríguez

2 REPLIES 2
Read only

Former Member
0 Likes
1,025

Hi, you can not use sy-datum in SQL.

check this post

https://archive.sap.com/discussions/thread/1044301

Regards

Miguel

Read only

0 Likes
1,024

Miguel,

Thanks for the info. It seems a silly limitation. Sigh... Already coded the workaround (not the most elegant of solutions, though).

Thanks again,

Luis