Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Validation for Infotype 80 Maternity Leave through USER Exit

Former Member
0 Kudos

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

2 REPLIES 2

MariaJoãoRocha
Contributor
0 Kudos

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

0 Kudos

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.