‎2007 Mar 04 4:35 AM
Hi all,
I need to select active employee,get his/her name from infotype 0001and work schedule from infotype 0007.
DATA: BEGIN OF i_output,
pernr like p0000-PERNR,
STAT2 like p0000-STAT2,
ENAME like p0001-Ename,
SCHKZ like p0007-SCHKZ,
BEGDA like p0000-BEGDA,
ENDDA like p0000-ENDDA,
END OF i_output.
tables: pernr.
INFOTYPES: 0000,
0001,
0007.
constants: c_1(1) type c value '1',
c_3(1) type c value '3'.
Initialization.
Initialize Selection-Screen values
perform init_selction_screen.
Start-of-selection.
get pernr.
rp_provide_from_last p0000 space pn-begda pn-endda.
check pnp-sw-found eq c_1.
check p0000-stat2 in pnpstat2. "pernr Active
rp_provide_from_last p0001 space pn-begda pn-endda.
check pnp-sw-found eq c_1.
write 😕 p0000-pernr, p0000-begda.
rp_provide_from_last p0007 space pn-begda pn-endda.
check pnp-sw-found eq c_1.
write 😕 p0007-pernr, p0007-begda.
&----
*& Form init_selction_screen
&----
*Description:
----
FORM init_selction_screen .
refresh: pnppersg,
pnpstat2.
clear: pnppersg,
pnpstat2.
pnppersg-low = c_1.
append pnppersg.
pnpstat2-low = c_3.
append pnpstat2.
ENDFORM. " init_selction_screen
Having run the following gives me 2 problems :
1- I get this message --> " Don't use the get pernr event " and leaves the programe.
To solve that I comment get pernr as follow :
Initialization.
Initialize Selection-Screen values
perform init_selction_screen.
Start-of-selection.
<b>get pernr.</b> commented
rp_provide_from_last p0000 space pn-begda pn-endda.
check pnp-sw-found eq c_1.
check p0000-stat2 in pnpstat2. "pernr Active
rp_provide_from_last p0001 space pn-begda pn-endda.
check pnp-sw-found eq c_1.
write 😕 p0000-pernr, p0000-begda.
rp_provide_from_last p0007 space pn-begda pn-endda.
check pnp-sw-found eq c_1.
write 😕 p0007-pernr, p0007-begda.
&----
*& Form init_selction_screen
&----
*Description:
----
FORM init_selction_screen .
refresh: pnppersg,
pnpstat2.
clear: pnppersg,
pnpstat2.
pnppersg-low = c_1.
append pnppersg.
pnpstat2-low = c_3.
append pnpstat2.
ENDFORM. " init_selction_screen
Then I got this second problem when running -
> " This report is obsolete ".
Can anyone tell me what is the problem please? Thanks
‎2007 Mar 04 8:29 AM