on 06-18-2009 8:26 AM
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.
no problem to move NUMC field to CHAR field. Maybe you have to care about leading zeroes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Actually i want to find out: the present pernr is there with this what should be the old pernr.
Can any one give me the code for that.
Thanks in advance.
Pasula.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
When your hiring a new employ it will automatically generate one pernr number and assing it. This is called internal pernr assignment.
And one more thing External, this is given by user. when ever you enter a number externally it will be checking weather its exist or not.
Can you tell me little bit more clearly wats your requirement....
Kavitha,
Try this. Just move the L_PERNR to a character field.
FORM OLD_EMPNO USING P_PERNR P_OLD_EMPNO.
DATA: L_PERNR(8) TYPE N,
char_pernr(8),
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.
char_pernr = l_pernr.
CONCATENATE char_PERNR L_CD INTO P_OLD_EMPNO.
ENDFORM.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.