Hi Experts,
iam trying with the present pernr we are going to identify the old pernr and moving that into pa0002 infotype.
That they are trying to move that into pa0002 infotype allias field.
My doubt is pernr is Numc n allias is char. How is it possiblt to move.
I think we can go through enhancement for thar field.
I wrote some code.
Please give me the proper code.
Thanks in advace.
Kavitha.
FORM OLD_EMPNO USING P_PERNR P_OLD_EMPNO.
DATA: L_PERNR(8) TYPE N,
L_REM TYPE I,
L_CD(1).
L_PERNR = P_PERNR.
L_REM = ( ( L_PERNR+3(1) * 5 ) +
( L_PERNR+4(1) * 4 ) +
( L_PERNR+5(1) * 3 ) +
( L_PERNR+6(1) * 2 ) +
( L_PERNR+7(1) * 1 ) ) MOD 11.
IF L_REM = 10. L_CD = '-'. ELSE. L_CD = L_REM. ENDIF.
CONCATENATE L_PERNR L_CD INTO P_OLD_EMPNO.
ENDFORM.