10-29-2012 5:40 AM
Hi Experts,
Can you please help me regarding below requirement.
I am trying to Validate infotype 80 Maternity leave where my validation condition is The Concerned female employee Should be a permanent employee
Technically PA0000-MASSN value should be 32.
I am trying to achieve through PBAS0001-->EXIT_SAPFP50M_002-->INCLUDE ZXPADU02
and moreover i have to validate the PA0080-BEGDA and PA0000-BEGDA with the
respective PERNR.
Please help me , if anybody can prrovide the Pseudo code i will be obliged..
Waiting for a quick response....
Thanks in Advance!!!!
Regards
Shyam
10-29-2012 10:36 AM
Hi,
In ZXPADU02:
data: i0080 type p0080.
CLASS cl_hr_pnnnn_type_cast DEFINITION LOAD.
CASE innnn-infty.
WHEN '0080'.
CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
EXPORTING
prelp = innnn
IMPORTING
pnnnn = i0080.
* put your code here....
endcase.
Regards,
Maria João Rocha
10-29-2012 11:05 AM
Hi Maria,
Thanx for replieng...
I have tried the code and able put a validation on the screen fields from the 2000 screen of infotype 80
for Example
CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
EXPORTING
prelp = innnn
IMPORTING
pnnnn = I0016.
IF ( ipsyst-ioper ='INS' OR ipsyst-ioper = 'MOD' ).
IF I0016-CTTYP <> '01'.
MESSAGE 'Only confirmed female employees are eligible for Maternity Leave' Type 'E' DISPLAY LIKE 'E'.
ENDIF.
ENDIF.
but it is not validating the field value of PA0016-CTTYP so here my point is how can we validate the value of CTTYP of the PERNR from Infotype 16 against the same PERNR for which we are creating /modifing the record in Infotype 80.
So the main aim is to validate the data enterd in the screen of Infotype 80 with Infotype 16.
Please help me regarding this...
Thanx and Regards
Shyam
endcase.