We have a requirement to delimit a particular subtype of infotype 2001 through a process in HCM process and form. For this I tried using SAP_PT service's Delete operation on the subtype in the following ways but the existing record was getting deleted.
As this did not workout I tried using ABAP code in custom advance generic service's flush method. As HR_INFOTYPE_OPERATION function module is not support inside Advance generic service i tried to use the following Function modules similar to the code in methods of class CL_HRASR00_BLP_ADAPTER used by SAP_PT service.
HR_TMW_BUFFER_FREE
HR_BLP_AUTH_RESET_CACHE
HR_TMW_PWS_RESET_CACHE
HR_BLP_READ_TIMEDATA
HR_TMW_ITDATA_TO_BLPREQUEST
HR_BLP_MAINTAIN_TIMEDATA.
HR_BLP_SAVE_TIMEDATA_PRE_FLUSH
I am not sure about how to set the TIME_DATA deep structure in FM: HR_BLP_MAINTAIN_TIMEDATA for delimit operation. I tried getting the current record's value using FM: HR_BLP_READ_TIMEDATA. and build a new container using FM: HR_TMW_ITDATA_TO_BLPREQUEST with values in header part of P2001 structure set to that delimited record and passed the combined table of old and new containers to FM HR_BLP_MAINTAIN_TIMEDATA. 'DELIM" was set in CONTROL-OPERA component of new contaiiner and recuid from old container's CONTROL-RECUID component was set in new container also and in DATA-IT-DELIMITER table. But the old record got deleted after execution of the process.
Please advise me on the coding methodology to be used in Advance generic service for delimiting a subtype from IT 2001.