2008 Jun 14 1:23 AM
Hi Developers,
I have a bit of an issue. I'm trying to create a new employee using FM HR_MAINTAIN_MASTERDATA. Unfortunately, when I call the FM and enter the below listed imports, I receive the following error
IMPORTS:
PERNR ==> 00000000
MASSN ==> Z1
ACTIO ==> INS
TCLAS ==> A
BEGDA ==> 13.06.2008
ENDDA ==> 31.12.9999
OBJPS ==> Z8
SEQNR ==> 000
SPRPS
SUBTY
WERKS ==> 0001
PERSG ==> 1
PERSK ==> HH
PLANS ==> 99999999
DIALOG_MODE ==> 0
LUW_MODE ==> 1
NO_EXISTENCE_CHECK
NO_ENQUEUE
Export parameters Value
ERROR
RETURN EPG316Invalid combination of action type Z1/action reason
RETURN1 EPG 316Invalid combination of action type Z1/action reason
HR_RETURN 00000000A0000Z1 INS 00PG E316Z1
I'm confused by this because there is no where in the function module where it asks you to enter the Action Reason. When I switch dialog_mode on I am brought to the create actions screen where all of my data has been read in. The only blank field is Action Reason. When I put it in, it creates the Employee and the Number is provided. We need this number to utilize the FM HR_INFOTYPE_OPERATION to continue the process of creating a new Employee (in this case, Contractor).
Question 1: Can/does HR_MAINTAIN_MASTERDATA pass the MASSG paramater?
Question 2: If not, how hard would it be to create a custom HR_MAINTAIN_MASTERDATA to pass the value of MASSG?
Will reward points accordingly. Thanks in advance for your help.
2008 Jun 16 2:40 PM
You can use the PROPOSED_VALUES tables parameter to pass the all the filed values to infotype 0000.
~Suresh
Hi Developers,
I have a bit of an issue. I'm trying to create a new employee using FM HR_MAINTAIN_MASTERDATA. Unfortunately, when I call the FM and enter the below listed imports, I receive the following error
IMPORTS:
PERNR ==> 00000000
MASSN ==> Z1
ACTIO ==> INS
TCLAS ==> A
BEGDA ==> 13.06.2008
ENDDA ==> 31.12.9999
OBJPS ==> Z8
SEQNR ==> 000
SPRPS
SUBTY
WERKS ==> 0001
PERSG ==> 1
PERSK ==> HH
PLANS ==> 99999999
DIALOG_MODE ==> 0
LUW_MODE ==> 1
NO_EXISTENCE_CHECK
NO_ENQUEUE
Export parameters Value
ERROR
RETURN EPG316Invalid combination of action type Z1/action reason
RETURN1 EPG 316Invalid combination of action type Z1/action reason
HR_RETURN 00000000A0000Z1 INS 00PG E316Z1
I'm confused by this because there is no where in the function module where it asks you to enter the Action Reason. When I switch dialog_mode on I am brought to the create actions screen where all of my data has been read in. The only blank field is Action Reason. When I put it in, it creates the Employee and the Number is provided. We need this number to utilize the FM HR_INFOTYPE_OPERATION to continue the process of creating a new Employee (in this case, Contractor).
Question 1: Can/does HR_MAINTAIN_MASTERDATA pass the MASSG paramater?
Question 2: If not, how hard would it be to create a custom HR_MAINTAIN_MASTERDATA to pass the value of MASSG?
Will reward points accordingly. Thanks in advance for your help.
2008 Jun 16 2:40 PM
You can use the PROPOSED_VALUES tables parameter to pass the all the filed values to infotype 0000.
~Suresh
2008 Jun 16 10:27 PM
Hi Suresh,
Thank you for your fast response. I actually figured that out after doing some more research. It turns out that when i had initially tried to use it before I wasn't referencing the screen field value with the prefix (i.e P000-MASSG). It works fine now, and I will reward points accordingly as I said.
My new dilemma is, now that the FM is working, how do we enable the function Module in a Web Dynpro for ABAP application. I'm not sure how to pass the fields into the Node and Attributes that are generated from the service call to the function modules. In other words, how do we specificy all of the infotypes, fnames, fvalues and seq nos so that the pernr number is returned. We need this number in order to utilize the FM HR_INFOTYPE_OPERATION.
2008 Jun 17 2:17 AM
You have to create a custom rfc wrapper inside which you will call HR_MAINTAIN_MASTERDATA. Invoke this rfc call from the webdynpro.
Did you create a custom WebDynpro application for the hiring action?
~Suresh
2008 Jun 16 2:50 PM
Have a look at report RPLAPL00 to know how to pass values
to the FM ...