on 10-01-2010 5:12 AM
Dear Friends,
I am doing PA30 (Maintain HR Master Data) , entry Personnel no. (e.g. 1733), typing Infotype 2001 (Absences) and select Sty 1040 Maternity Leave ( in SPRO -> Time Management -> Time Data Recording and Administration -> Absences -> Absence Catalog -> Define Absence Type ). then click Create button to Create Absence.
I want to validate data input when click Create button, If the Gender of 1733 = female it can be created absence but when the gender is male it can't be processed.
Or we could show the message "Select Error" after selecting Subtype Maternity Leave if the gender = male
I am sorry for my english, hoping your help.
Thanks in advance,
Ferry
Use user exit.
ZXPADu1 or ZXPADU 2
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User exits are in the includes LXPADU01 & 02 as provided by SAP and used by user function/s in employee data maintenance program modules.
It is a common practice that these includes are copied to ZXPADU01 & 02 and they are in turn included in the SAP include or program..
You can display the include and see where it is used.
Greetings,
if the validation will show "error/warning messages" you can consult your ABAP Technical consultant to do a "USER EXIT" for validation.
it's can be done for all type of leaves.
Regards,
Fahad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ferry
Have u solved your problem ? Because i have same requirement as yours. And its very helpful if you can share the solution when u already solved it..^^
Thanks before
Shr
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I think you can achive tihs by writing a dynamic action.
Check the IT0002 before creating the IT 2001 with subtype 1040.
Sty Field N FC No S Variable function part
1040 04 01 P P0002-GESC1 = '0'.
Regards,
Srini.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Maternity Leave comes under the setting Special Absence Data.
SPRO -> IMG -> Time Management -> Time Data Recording and Administration -> Absences -> Special Absence Data -> Maternity Protection
This section allows you to define special processing types to calculate absences absences for maternity protection and parental leave.
Here we can use the feature MASEX (Determine infotype admissibility for employees) for determining admissability for the 'Create Maternity Protection' Infotype (0080).
The return value for this feature can be one of the following:
o 0 - allowed for female and male employees
o 1 - allowed for female employees only
o 2 - allowed for male employees only
Kindly try this configuration for Maternity Leave.
Thanks and Regards
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Adriana,
Thanks for the answer.
we actually do not use infotype 0080 but infotype 2001 for input maternity leave.
Our Consultant have defined absence type in SPRO, one of them 'maternity leave' ( so we can choose in it2001 subtype).
when selecting a subtype maternity leave it should be 'female' that valid for the choice. How to set on SPRO in order to use in 2001 ?
Regards,
Ferry
PS: It's a pity on me, I was just learning SAP and never implement SPRO before, and now I was assigned to solve this problem
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please implement user exit ZXPADU01 under PBAS0001 package.
Check the following sample/pseudo code:
DATA: wa_2001 like P2001.
CALL METHOD CL_HR_PNNNN_TYPE_CAST->PRELP_TO_PNNNN
EXPORTING
PRELP = INNNN
IMPORTING
PNNNN = wa_2001.
SELECT GENDER FROM PA0002 WHERE PERNR EQ wa_2001-PERNR.
IF GENDER IS 2.
MESSAGE ERROR.
EXIT SCREEN.
ENDIF.
CALL METHOD CL_HR_PNNNN_TYPE_CAST->PNNNN_TO_PRELP
EXPORTING
PNNNN = wa_2001
IMPORTING
PRELP = INNNN.
To correct the code, please take the help of an ABAPer.
Regards,
Dilek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
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.