on 04-07-2006 4:30 AM
How will i get DAT35 on this function module?
SELECT DISTINCT dat35
itxex
INTO (lt_awards-dat35,
lt_awards-itxex)
FROM pa0035
WHERE pernr = employee_no
AND subty = '03'
AND itxex = 'X'.
SELECT SINGLE insti
begda
endda
INTO (lt_awards-insti,
lt_awards-begda,
lt_awards-endda)
FROM pa0022
WHERE pernr = employee_no
AND slart = '51'
AND ( begda GE lt_awards-dat35 AND endda LE lt_awards-dat35 ).
IF lt_awards-itxex EQ 'X'.
<b> rp-read-infotype employee_no 0035 p0035 sy-datum sy-datum.
LOOP AT p0035 where subty = '03'
and itxex eq 'X'.
refresh ptext.
move-corresponding p0035 to key.
import ptext from database pcl1(tx) id key.
LOOP AT ptext.
awards-line = ptext-line.
awards-dat35 = lt_awards-dat35.
awards-insti = lt_awards-insti.
APPEND awards.
CLEAR awards.
ENDLOOP.</b> ENDLOOP.
ENDIF.
ENDSELECT.
OUTPUT:
error:
PTEXT DAT35 INSTI
1st honor 03.04.2006 UP
2nd honor 03.04.2007 UP
1st honor 04.04.2006 UP
2nd honor 04.04.2007 UP
it supposed to be like this:
PTEXT DAT35 INSTI
1st honor 03.04.2006 UP
2nd honor 04.04.2006 UP
Hi,
You can simply get rid of the duplicates.. ie
sort awards.
delete adajacent duplicates from awards comparing line.
But , you have put everything inside the SELECT and the program will take a performance hit for high volume.
Regards,
Suresh Datti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.