Skip to Content

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

Please help me debug my code on Awards

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

Former Member
Not what you were looking for? View more on this topic or Ask a question