‎2011 Jan 28 7:41 PM
Hello Gurus,
Please help me in writing a select query with the where condition on time stamp for the field IBSP-VALFR and IBSP-VALTO, with the current system time stamp. I need pick all the values which falls in these two fields with the current time stamp.
Thanks & Regards,
Naresh.
‎2011 Jan 28 7:49 PM
Have your user input a date field for date from and a date field for date to....
declare local variable of type syuzeit for start-clock (000000) and end-clock (235959), and two variables: low_timestamp and high_timestamp of a timestamp type...you can use IB_VALFR.
convert date <parameter date from>
time <start_clock>
into time stamp <low_timestamp>
time zone sy-zonlo.
convert date <parameter date to>
time <end_clock>
into time stamp <high_timestamp>
time zone sy-zonlo.
. . .
select....
where valfrom ge low_timestamp
and valto le high_timestamp....
‎2011 Jan 28 7:49 PM
Have your user input a date field for date from and a date field for date to....
declare local variable of type syuzeit for start-clock (000000) and end-clock (235959), and two variables: low_timestamp and high_timestamp of a timestamp type...you can use IB_VALFR.
convert date <parameter date from>
time <start_clock>
into time stamp <low_timestamp>
time zone sy-zonlo.
convert date <parameter date to>
time <end_clock>
into time stamp <high_timestamp>
time zone sy-zonlo.
. . .
select....
where valfrom ge low_timestamp
and valto le high_timestamp....
‎2011 Jan 28 8:22 PM
‎2011 Jan 29 7:17 PM
Hi,
some how my code is not working...Please look at my code.
convert date sy-datum
time sy-uzeit
into time stamp low_validity
time zone sy-zonlo.
SELECT SP_INSTANCE INSTANCE EQUNO MATNO SERNO
FROM IBSP INTO TABLE IT_IBSP
for all entries in it_IBIN
where ( SP_INSTANCE = IT_IBIN-INSTANCE OR
INSTANCE = IT_IBIN-INSTANCE ) and
VALFR Le low_validity and
VALTO ge low_validity.
Its getting the values for which VALTO is less than current date.
Thanks & Regards,
Naresh.