‎2008 May 14 9:34 PM
Hi All,
Can someone please give me the steps to create a new pernr using the FM HR_MAINTAIN_MASTERDATA?
I tried it but some how it is not working.
This is what i have entered,
PERNR 00000000
MASSN
ACTIO INS
TCLAS A
BEGDA 05/14/2008
ENDDA 12/31/9999
OBJPS
SEQNR 000
SPRPS
SUBTY
WERKS 1801
PERSG 1
PERSK 12
PLANS 50062342
DIALOG_MODE 0
LUW_MODE 1
NO_EXISTENCE_CHECK X
NO_ENQUEUE
and in the proposed values tab this is what i have
INFT FNAME FVAL
0000 MASSN HP
0000 MASSG 02
0002 PERID 111223333
0002 GBDAT 01/01/1980
0002 NACHN DEF
0002 VORNA ABC
0001 ABKRS U4
0001 BUKRS 1818
I am getting a message saying 'make an entry in all required fields'.
Your quick answers will help me a lot.
Thanks in advance.
Sandeep
Edited by: sandeep reddy on May 14, 2008 10:36 PM
‎2008 May 15 2:30 AM
Hello Sandeep,
I see you are passing values of 2 fields from infotype 0, 4 fields from infotype 2 and 2 fields from infotype 1 to the table parameter proposed values.
How this FM works is:
SAP Wrote:
that exactly same validation checks take place as would in the individual maintenace screens for the infotype (PA30). The error messages are the same as those which appear in the dialog, in other words, the individual maintenance screen error messages are transferred rather than interpreted by this module.
Therefore, the logical way to find out your error would be to actually try and create the infotypes manually (PA30) with the same data that you are passing to this FM. I'm sure you'll get the same error message but you'll know which particular mandatory field is missing from which particular infotype out of the three supplied to this FM. Then you can pass (append) the missing field(s) with correct values that are missing to make this work.
Hope this helps.
Cheers,
Sougata.
‎2008 May 15 4:33 AM
Hi Sougata,
Thank you for the reply.
I tried running FM in dialog mode = 2, where the exact same PA40 routine is simulated and you have to enter the data manually into the infotypes. The problem is that in one of the screens for infotype 1, I am unable to enter the value for company code, since it is greyed out and consequently when I try to save the entries I get a message saying 'Company code does not exist.
I am not sure if the config automatically is supposed to default the comp code value or not.
Any inputs in this regard are greatly appreciated.
Thanks!
Sandeep
‎2008 May 15 5:00 AM
I am passing the following as proposed value in my code and it works fine:
0000 P0000-PERNR 03191401 00
0000 P0000-INFTY 0000 00
0000 P0000-ENDDA 99991231 00
0000 P0000-BEGDA 20080503 00
0000 P0000-MASSN P1 00
0000 P0000-STAT2 3 00
0001 P0001-BUKRS 1000 00
0001 P0001-WERKS B590 00
0001 P0001-PERSG 1 00
0001 P0001-PERSK FT 00
0001 P0001-BTRTL P007 00
0001 P0001-ABKRS Z1 00
0001 P0001-KOSTL 0000900000 00
0001 P0001-PLANS 99999999 00
0001 P0001-MSTBR 03233021 00
0002 P0002-NACHN YANCY 00
0002 P0002-VORNA CHRISTOPHER 00
0002 P0002-PERID 999-99-9999 00
You dont need to send everything but you can try and see which combination works for you
‎2008 May 15 5:40 AM
Hi Aparna,
Thank you for the reply.
I see that your are passing the PERNR as well. My requirement is to perform a HIRING action so a PERNR has to be created at run time by the FM.
That is why I am passing NO_EXISTENCE_CHECK = 'X' and PERNR = blank to the FM.
Any suggestions will be greatly appreciated.
Thanks!
Sandeep
‎2008 May 15 5:44 AM
I am passing PERNR because in our case pernr is generated by the legacy system and we keep the same numbers in SAP. As i said before, you dont have to send everything I am sending, I posted to values so that you would have a reference of something that works. Populate as much as you can.
‎2008 May 15 7:53 AM
Hello Sandeep,
Every system is different in regards to configuration and customization. I suspect the company code field is greyed out (not ready for input) as a result of the configuration of Infotype Screen Control (T588M).
There might be a dynamic action or an user-exit/BADI already active in your system which defaults the company code on infotype 1, but it looks like this is not triggered when you call this FM. As a workaround, you should consult your functional consultant to change the T588M screen control config back to "ready for input" (for field BUKRS) so that you can input a value (through this FM) and hence make it work the way you want to. After your program is run, the screen control setting can be turned back to how it was. As long as you validate the company code data (for each employee) in your program, I don't think it would impact on the system.
I've worked hard for you so please don't forget to reward points!
Cheers,
Sougata.
‎2008 May 15 5:39 PM
Hi Aparna,
Can you please list the import parameters that you passed to your FM?
Thanks!
Sandeep
‎2008 May 15 5:50 PM
besides what i have already posted(proposed values), I also pass:
PERNR = NUMBER --->legacy employee number
ACTIO = OPERATION ---> INS
TCLAS = TCLAS -
> A
BEGDA = VALIDITYBEGIN -
>begin date
ENDDA = VALIDITYEND -
> end date
WERKS = WERKS -
>v_werks
PERSG = PERSG -
>v_persg
PERSK = PERSK -
>v_persk
LUW_MODE = LUW_MODE -
>0
DIALOG_MODE = DIALOG_MODE -
>0
NO_EXISTENCE_CHECK = 'X'
NO_ENQUEUE = 'X'
‎2008 May 15 6:13 PM
Hi Aparna,
Thank you!
One last thing - I am guessing that your system was configured to allow non-internal assignment of pernr, meaning that the user is allowed to specify the pernr that needs to be created.
Please correct me if I am wrong.
Thanks!
‎2008 May 15 6:18 PM
I am not to sure about what has be configured, but considering the fact that I am able to create a employee with by proving a employee number, i think it should be th case.
‎2008 May 15 7:18 PM
I vaguely recall (it's been about 2 years since I wrote the interface, and I don't have the source code handy) that I needed to create an 0003 infotype before creating an 0000.
‎2008 Jul 18 10:33 PM