Application Development and Automation 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: 
Read only

Function module in Infotyp which checks if identical data already exists

Former Member
0 Likes
763

I want to create a new hr master data (tcode pa30) for Hans Müller in e.g Company X and fill out the necessary fields in Infotype 0001,0002 (Name, Birthdate, etc. ) u2013 done !

After creating the new hr master data for Hans Müller Iu2019d like to fill out a special Infotyp (0032) namely Internal Data.

PROBLEM:

While filling out the IT 0032 I do not know if the person - Iu2019ve created a new master data for - is already existing in the system ( but in other e.g Company Z) .

So what I need is a function modul in the Infotype 0032 which checks if there is already a person with the same data existing in any company (the whole data bank) using 3 characters from Infotype 0002 (Personal Data) namely , First name, Last name, Birthd. .

And if a person with the same first name ,last name and birthday is already existing the function module should link to that one or just show me a information.

Also tried to show you my problem on a graphic,

Function_Module_Infotyp0032.png

I hope you can help me. I would be very thankful for any hints , information or programming approach.

Regards

Sean

I want to create a new hr master data (tcode pa30) for Hans Müller in e.g Company X and fill out the necessary fields in Infotype 0001,0002 (Name, Birthdate, etc. ) u2013 done !

After creating the new hr master data for Hans Müller Iu2019d like to fill out a special Infotyp (0032) namely Internal Data.

PROBLEM:

While filling out the IT 0032 I do not know if the person - Iu2019ve created a new master data for - is already existing in the system ( but in other e.g Company Z) .

So what I need is a function modul in the Infotype 0032 which checks if there is already a person with the same data existing in any company (the whole data bank) using 3 characters from Infotype 0002 (Personal Data) namely , First name, Last name, Birthd. .

And if a person with the same first name ,last name and birthday is already existing the function module should link to that one or just show me a information.

Also tried to show you my problem on a graphic,

Function_Module_Infotyp0032.png

I hope you can help me. I would be very thankful for any hints , information or programming approach.

Regards

Sean

4 REPLIES 4
Read only

former_member209703
Active Contributor
0 Likes
726

Hi

I don't think there's any standard FM for that, however if I really got your point, it wouldn't be so difficult to make those checks, using a BADI, User-Exit or even enhancing the IT. I think you should look for the PERNR's that match your criteria performing a SELECT against PA0002 and once you have your personel numbers then do the same against PA0001 to check whether there's more than one BUKRS (Company Code) linked to those guys or not.

Regards.

Read only

0 Likes
726

first of all, thank you.

Hmm so you think that i need something like a plausibility check whichstarts a db select (pa 0001 /pa 0002) before save the Infotype 0032??

the problem with your solution approach is that there could be different pers. no. for the same person in my issue.

so it won't work with searching for personal numbers which fit to the criteria or do not

and if one exists to search with the found persnr. in other BUKRS.

(This has to do with system changes etc. in the past. )

regards

Read only

0 Likes
726

the problem with your solution approach is that there could be different pers. no. for the same person in my issue.

If I understood you well, that won't be a problem, since you already know which PERNR to use (The one you are using to update IT0032) In that case you only have to check if for that PERNR more than one record in PA0001 with different Company Code is present.

If your problem is that another person with the same name and same date of birth is active in the system with different Company Codes it would be similar.

For instance: Let's say that you find 2 different PERNRs for a given Name and Date of Birth in PA0002, then you can check IT0001 and look for the BUKRS value for those 2 Personel Numbers. If the values found are different you can raise the error message or whatever you need.

Read only

0 Likes
726

Ok, understood

going to try it th way you explained.

Thank you !