cancel
Showing results for 
Search instead for 
Did you mean: 

PA - Default IT 0002

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

kmoore007
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

Thanks Divya..

Will try it out & let you know...

Thanks

RL