2007 Sep 07 10:39 AM
Hello,
I want to create and update HR PD data (transaction PP01). I want to use a fm instead of batch input. Can I use fm HR_INFOTYPE_OPERATION or is there another one for PD infotypes?
Thx in advance,
Ali
2007 Sep 07 10:41 AM
The function call HR_INFOTYPE_OPERATION cannot be used to maintain PD Objects.. You can do a wildcard search in SE37 for RH_* & look for a function module that suits your requirement.
Regards,
Arya
Hello,
I want to create and update HR PD data (transaction PP01). I want to use a fm instead of batch input. Can I use fm HR_INFOTYPE_OPERATION or is there another one for PD infotypes?
Thx in advance,
Ali
2007 Sep 07 10:41 AM
The function call HR_INFOTYPE_OPERATION cannot be used to maintain PD Objects.. You can do a wildcard search in SE37 for RH_* & look for a function module that suits your requirement.
Regards,
Arya
2007 Sep 07 10:43 AM
Hi,
use the below code for inserting records to
infotype p0006.
Lock Pernr
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
number = dt_0006-pernr
IMPORTING
return = dg_return_struc0.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
INFTY = '0006'
NUMBER = dt_0006-pernr
SUBTYPE = P0006-ANSSA
VALIDITYEND = P0006-ENDDA
VALIDITYBEGIN = P0006-BEGDA
RECORD = P0006
OPERATION = 'INS'
IMPORTING
RETURN = dg_return_struc1
KEY = dg_record_key
EXCEPTIONS
OTHERS = 0.
if not dg_return_struc1 is initial.
dt_final-mess = dg_return_struc1-message.
else.
dt_final-mess = 'Address Record added successfully'(014).
endif.
Unlock Pernr
CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
EXPORTING
number = dt_0006-pernr.
or if you want to create new infotype then see the link below.
refer
http://www.sapdevelopment.co.uk/hr/infotypehome.htm
Regards
2007 Sep 07 10:44 AM
HI,
we can also use <b>HR_MAINTAIN_MASTERDATA</b>
see the example:
report test.
data:
t_return type bapireturn,
t_return1 type bapireturn1,
t_hr type HRHRMM_MSG.
data:
t_pprop type table of PPROP with header line,
PSKEY type table of PSKEY with header line.
t_pprop-infty = '0002'.
t_pprop-FNAME = 'P0002-VORNA'.
t_pprop-fval = 'X'.
t_pprop-seqnr = '0'.
append t_pprop.
t_pprop-infty = '0002'.
t_pprop-FNAME = 'P0002-NACHN'.
t_pprop-fval = 'P'.
t_pprop-seqnr = '0'.
append t_pprop.
<b>CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'</b>
EXPORTING
PERNR = '00001259'
MASSN =
ACTIO = 'MOD'
TCLAS = 'A'
BEGDA = '19621212'
ENDDA = '99991231'
OBJPS =
SEQNR =
SPRPS =
SUBTY =
WERKS =
PERSG =
PERSK =
PLANS =
DIALOG_MODE = '0'
LUW_MODE = '1'
NO_EXISTENCE_CHECK = ' '
NO_ENQUEUE = ' '
IMPORTING
RETURN = t_return
RETURN1 = t_return1
HR_RETURN = t_hr
TABLES
proposed_values = t_pprop
MODIFIED_KEYS = PSKEY
.
2007 Sep 07 11:07 AM
@skk & @Rammohan:
PL do not post wrong answers.. Neither HR_INFOTYPE_OPERATION nor HR_MAINTAIN_MASTERDATA can be used for maintaining PD Infotypes. PL read the question carefully before posting replies.
Regards,
Arya.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |