Skip to Content
avatar image
Former Member

Need help in fetching the Data from HRP1000 table based on date.

Hi,

I have given two parameters in the program " otype type hrp001 and date1 type dats".

I am using select option like this "  SELECT * FROM HRP1000 INTO  table itab where otype in otype and  BEGDA  < DATE1 AND ENDDA >= DATE1."

by using this i am not getting any records in the output.by removing the "date1" relation i am able to fetch all the records. So please help me to fix this issue.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 09, 2015 at 01:32 PM

    Hi Vishnu,

    Kindly check in SE16N whether the record is available in database.

    Try the below code.

    SELECT * FROM HRP1000 INTO  table itab

      where otype in otype and BEGDA  <= DATE1 AND ENDDA >= DATE1


    Regards


    Rajkumar Narasimman

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      This stems from the fact that the initial value of a date field is 00000000, so comparing this against the date values in HRP1000 will never find a match (00000000 being less than 01011900, the usual start date for unlimited HR records).

      Your IF statement is a fine solution.

      Regards,

      Nick