12-17-2008 11:32 AM
Hi frndz,
i want to delimit/modify record in infotype 0014 after checking some condition when user clicks on SAVE in infotype 0008.
For this i'm using the code like below.
In Include ZXPADU02.
when '0008'.
IF sy-ucomm = 'UPD'.
chek <condition>
if sysubrc = 0.
Lock employee.
Delimti(LIS9) record in IT0014 using HR_READ_INFOTYPE_OPERATION.
Unlock employee.
endif.
Here every thing working fine but record is not getting delimitted.
Could anybody please help me any other possibilities to solve it.
Thanks and Regards,
Venkat
12-18-2008 4:26 AM
Hi,
I tried to use the FM HR_INFOTYPE_OPERATION in ZXPADU02 but I found that it will
not update data in the real DB table(PAXXXX).I found that in FM 'HR_MAINTAIN_MASTERDATA' from FM 'HR_INFOTYPE_OPERATION' will set the field 'PSPAR-PBPFL' as 'X'.
In standard program, it looks like if this field is set it will not do the logic to update the DB table. So I put the code in other report and then call in the ZXPADU02. I think it's about LUW.
Code as follows to understand.
data:
lw_p0008 LIKE p0008,
lw_pskey LIKE pskey,
lv_option,
EXPORT lw_p0008 lw_pskey lv_option
to memory id 'ZXPADU02_0008'.
submit ZHRR_PA_ZXPADU02_0008
and return.
Inside program ZHRR_PA_ZXPADU02_0008
IMPORT w_p0008 lw_pskey lv_option
FROM MEMORY ID 'ZXPADU02_0008'.
CALL FUNCTION 'ENQUEUE_EPPRELE'
EXPORTING
pernr = lw_p0008-pernr
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '0008'
number = lw_p0008-pernr
subtype = lw_pskey-subty
objectid = lw_pskey-objps
lockindicator = lw_pskey-sprps
validityend = lw_pskey-endda
validitybegin = lw_pskey-begda
recordnumber = lw_pskey-seqnr
record = lw_p0008
operation = lv_opera
* TCLAS = 'A'
* DIALOG_MODE = '1'
* nocommit = 'X'
* VIEW_IDENTIFIER =
* SECONDARY_RECORD =
IMPORTING
return = lw_return
* KEY =
.
IF NOT lw_return IS INITIAL AND
lw_return-type EQ 'E'.
MESSAGE e000(38) WITH lw_return-message.
ENDIF.
CALL FUNCTION 'DEQUEUE_EPPRELE'
EXPORTING
pernr = lw_p0008-pernr.
If this not works, then go for dynamic action from V_T588Z as suggested by Suresh.
Regards
Eswar
12-17-2008 2:31 PM
12-18-2008 3:33 AM
Hi Suresh,
while creating a record in IT0008..If there is any record in IT0014 for the same period,then we have to delimit that record(0014).Whether dynmic cations will support my requirement?.
could you please give me some explanation how to proceed?
Thanks and Regards,
Venkat
12-18-2008 3:55 AM
Hi Venkat,
Before resorting to Dynamic actions I suggest you to give insert(INS) as the parameter in HR_INFOTYPE_OPERATION. This will automatically delimit the record as the time constraint of Infotype 0008 is 1. I have worked on a similar requirement to delimit records in Infotype 0008 and this way worked. So try it out.
Regards,
Sakkthiss.R
P.S. If still you are not able to do it try with HR_MAINTAIN_MASTERDATA with INS as the parameter. If all these ways fail then u try for dynamic actions.
Edited by: SAKKTHISS KUMAAR on Dec 18, 2008 4:56 AM
12-18-2008 4:26 AM
Hi,
I tried to use the FM HR_INFOTYPE_OPERATION in ZXPADU02 but I found that it will
not update data in the real DB table(PAXXXX).I found that in FM 'HR_MAINTAIN_MASTERDATA' from FM 'HR_INFOTYPE_OPERATION' will set the field 'PSPAR-PBPFL' as 'X'.
In standard program, it looks like if this field is set it will not do the logic to update the DB table. So I put the code in other report and then call in the ZXPADU02. I think it's about LUW.
Code as follows to understand.
data:
lw_p0008 LIKE p0008,
lw_pskey LIKE pskey,
lv_option,
EXPORT lw_p0008 lw_pskey lv_option
to memory id 'ZXPADU02_0008'.
submit ZHRR_PA_ZXPADU02_0008
and return.
Inside program ZHRR_PA_ZXPADU02_0008
IMPORT w_p0008 lw_pskey lv_option
FROM MEMORY ID 'ZXPADU02_0008'.
CALL FUNCTION 'ENQUEUE_EPPRELE'
EXPORTING
pernr = lw_p0008-pernr
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '0008'
number = lw_p0008-pernr
subtype = lw_pskey-subty
objectid = lw_pskey-objps
lockindicator = lw_pskey-sprps
validityend = lw_pskey-endda
validitybegin = lw_pskey-begda
recordnumber = lw_pskey-seqnr
record = lw_p0008
operation = lv_opera
* TCLAS = 'A'
* DIALOG_MODE = '1'
* nocommit = 'X'
* VIEW_IDENTIFIER =
* SECONDARY_RECORD =
IMPORTING
return = lw_return
* KEY =
.
IF NOT lw_return IS INITIAL AND
lw_return-type EQ 'E'.
MESSAGE e000(38) WITH lw_return-message.
ENDIF.
CALL FUNCTION 'DEQUEUE_EPPRELE'
EXPORTING
pernr = lw_p0008-pernr.
If this not works, then go for dynamic action from V_T588Z as suggested by Suresh.
Regards
Eswar
12-18-2008 6:47 AM
Hi Guyz,
Thanks for all your valuable inputs.
Thanks and Regards,
Venkat.
08-19-2015 5:51 PM
09-17-2013 5:59 PM
Hi,
In the BADI HRPAD00INFTY has the same problem ?
I do that in the BADI HRPAD00INFTY but dont work.
Regars,
Priscila Ramos.