on 11-18-2008 6:43 PM
Hi team,
We had a requirement to default the IT 0002 gender field to 'male' during a new hire.
We did that using a userexit 'EXIT_SAPFP50M_001'.
Now we are facing another issue, i.e. when you are coping or creating an entry for an existing employee in pa 30 (IT 0002) & changing the gender to say female, it is still getting saved as 'Male'.
Is there a way we can find a solution to this?
Thanks
RL
In your exit, you import the infotype using this logic. You can check if the gender is already set.:
DATA: i0002 LIKE p0002.
CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn EXPORTING prelp = innnn IMPORTING pnnnn = i0002.
...
**check value gender field. If not set, do nothing. Otherwise, set defaults
...
CALL METHOD cl_hr_pnnnn_type_cast=>pnnnn_to_prelp EXPORTING pnnnn = i0002 IMPORTING prelp = innnn.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Put a break point in include zxpadu01.......
and see if it is getting called even after saving the infotype 2 or not.........
also use ipsyst-oper = 'INS' and ipsyst-iinit = '1' and sy-tcode = 'PA40'
in ur zxpadu01
e.g.
if ipsyst-oper = 'INS' and ipsyst-iinit = '1' and sy-tcode = 'PA40' and p0002-gender = ' '.
p0002-gender = 'Male'
endif.
Regards,
Divya
Edited by: Divya Jain on Nov 18, 2008 10:02 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
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.