cancel
Showing results for 
Search instead for 
Did you mean: 

How do I refer the current date in this sql ?

Former Member
0 Kudos

Hi

Look at my my sql snippet below at SY-DATUM. How do I refer the current date in this sql ? ( I would like to check if the current date falls between those two dates, currently I am getting error )

"

...

FROM ( /sapsll/prcon

INNER JOIN /sapsll/prcts

ON /sapsll/prctsguid_pr = /sapsll/prconguid_pr

INNER JOIN /sapsll/tlegsv

ON /sapsll/tlegsvlgreg = /sapsll/prconlgreg

INNER JOIN /sapsll/ctsnum

ON /sapsll/ctsnumguid_ctsnum = /sapsll/prctsguid_ctsnum

AND /sapsll/ctsnumstcts = /sapsll/tlegsvctsex

INNER JOIN /sapsll/prgen

ON /sapsll/prgenguid_pr = /sapsll/prctsguid_pr

INNER JOIN /sapsll/ctsnum as a

ON aguid_ctsnum = /sapsll/prctsguid_ctsnum

AND SY-DATUM BETWEEN aDATAB AND aDATBI

)

INTO CORRESPONDING FIELDS OF TABLE lt_product_class_temp

FOR ALL ENTRIES IN lt_product_class

WHERE /sapsll/prcon~congr IN sp$00017"

...

"

thanks

siva

Edited by: Sivanantham kandan on Sep 13, 2008 3:26 AM

Edited by: Sivanantham kandan on Sep 13, 2008 3:27 AM

Accepted Solutions (1)

Accepted Solutions (1)

former_member188685
Active Contributor
0 Kudos

SY-DATUM is not part of the table , so it is not possible to do that. but you can do that in reverse.

INNER JOIN /sapsll/ctsnum as a
ON a~guid_ctsnum = /sapsll/prcts~guid_ctsnum
AND a~DATAB  le sy-datum   you can do this....
AND a~DATBI   ge sy-datum
)
INTO CORRESPONDING FIELDS OF TABLE lt_product_class_temp
FOR ALL ENTRIES IN lt_product_class
WHERE /sapsll/prcon~congr IN sp$00017"

Answers (0)