Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

HR Abap - Using select query

Hello expert,

I've tried provide statement and macro both work fine. Now i want to do a select statement using bedga and endda entered on screen.

"getting all employee personal number & normal hours employee only

   SELECT pernr

     FROM pa0007

     INTO TABLE gt_007

     WHERE begda <= p_begda AND endda > p_endda.


Is this the right way? Because here we are dealing with with period interval not just comparing date, please let me know if this is correct

Tags:
Former Member
Former Member replied

Almost correct.   You need to eliminate all infotypes starting beyond the selection screen date range or ending before the selection screen date range.

   SELECT pernr

     FROM pa0007

     INTO TABLE gt_007

     where begda le p_endda  "infotype starts before screen end date
     and endda ge p_begda"and ends after screen start date  

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question