Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Help in Select

Former Member
0 Likes
304

Hi,

i wont to find the value of field pa0007-ARBST (Daily Working Hours )

all time for specific month like from begin_date = 01012004

AND endda LE end_date (I have to Get 9)

and for begin_date 01012005 end_date 30012005 4.5,

for some emp but the select finsh with sy-subrc = 4.

in the table for employee that i wont i have in SE11.

ENDDA             BEGDA                 ARBST

31.12.2004               18.04.1982             9.00 
31.12.9999                01.01.2005            4.5


This is The code:

 LOOP AT hours ASSIGNING  <hours_d>.

    SELECT SINGLE arbst
      FROM pa0007
      INTO <hours_d>-arbst
      WHERE begda GE begin_date
      AND endda LE end_date
      AND pernr = wa_p7_tab-pernr.

  ENDLOOP.

Regards

1 REPLY 1
Read only

Former Member
0 Likes
280

write the select as ..

SELECT SINGLE arbst

FROM pa0007

INTO <hours_d>-arbst

WHERE pernr = wa_p7_tab-pernr.

AND endda GE begin_date

AND begda LE end_date .