Skip to Content
0
Former Member
May 30, 2007 at 05:02 AM

Doubt in Ranges

17 Views

hi all

i have one doubt in Ranges Syntex. i have two fields in table (both in time format)

Downtime : 02:04:00

Uptime : 05:04:00

meanwhile i have written one RFC for insert data in that table, suppose user enter same entries or with in Range like Downtime : 2:06:00 , Uptime : 5:00:00, it should not accept.

in my coding

ranges : time1 for sy-uzeit.

time1-low = ZASSETUPT.

time1-high = ZASSETUPT.

time1-option = 'BT'.

time1-sign = 'I'.

append time1.

ranges : time2 for sy-uzeit.

time2-low = ZASSETDWT.

time2-high = ZASSETDWT.

time2-option = 'BT'.

time2-sign = 'I'.

append time2.

SELECT SINGLE ZASSETNO INTO TMP_ASSETNO FROM ZASSETSERVER

WHERE ZASSETNO EQ ZASSETNO AND

ZASSETDT EQ ZASSETDT AND

ZASSETDWT >= time2 and

ZASSETUPT <= time1.

IF SY-SUBRC = 0.

MESSAGE 'Already Issued.' TYPE 'I'.

else.

insert.

endif.

but it accepted. how can i modify abouve coidng pls help me