Skip to Content
author's profile photo Former Member
Former Member

Doubt in Ranges

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 30, 2007 at 05:05 AM

    Hi Muthu,

    No need to use the downtime, uptime as ranges here. Just use them as a variable and modify the code.

    Reward points if useful.

    Regards,

    Atish

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 30, 2007 at 05:07 AM

    Hi,

    I believe you don't require a range..

    SELECT SINGLE ZASSETNO INTO TMP_ASSETNO FROM ZASSETSERVER
    WHERE ZASSETNO EQ ZASSETNO AND
    ZASSETDT EQ ZASSETDT AND
    ZASSETDWT >= ZASSETDWT and   " Modified here
    ZASSETUPT <= ZASSETUPT.          " Modified here
    
    

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 30, 2007 at 05:16 AM

    hi,

    ZASSETDWT1 = t2.

    ZASSETUP1 = t1.

    SELECT SINGLE ZASSETNO INTO TMP_ASSETNO FROM ZASSETSERVER

    WHERE ZASSETNO EQ ZASSETNO AND

    ZASSETDT EQ ZASSETDT AND

    ZASSETDWT >= ZASSETDWT1 and " Modified here

    ZASSETUPT <= ZASSETUPT1. " Modified here

    if helpful reward some points.

    with regards,

    suresh babu aluri.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 30, 2007 at 05:18 AM

    hi muthu,

    'at selction-screen output' event u can do this validation and proceed furthur,

    i.e.

    at selection-screen output.

    if Downtime = 2:06:00 and Uptime = 5:00:00(use your variables).

    message e001(your message class).

    exit.

    endif.

    regards,

    seshu.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.