Skip to Content
0
Former Member
Sep 16, 2013 at 09:33 PM

Unable to Update non decoupled custom Infotype through Advance Generic Services in Process & Forms

91 Views

Hi All,

Am unable to Update non decoupled custom infotype through FM HR_CONTROL_INFTY_OPERATION in Advance Generic services in P&F.

I have created a dump process using FPM Form, thorugh which I am trying to read&update a standard infotype (IT0002) and a non decoupled custom infotype named IT9004.

For my dump process I have not used any workflow so I have config my workflow as NO_WORKFLOW.

As backend service I am using two services

1. SAP_PA for Standard infotype Read & Update i.e. IT0002

2. ZGENERIC_CUSTOM_SERVICE for Reading and Update IT9004.

The problem that I am facing when I try to save the data by pressing SEND button is that when HR_CONTROL_INFTY_OPERATION is getting called from the FLUSH Method of ADS(Advance Generic services) the Application is dumping with an error message "Precondition Violated"

I am calling the FM HR_CONTROL_INFTY_OPERATION with these parameters.

call function 'HR_CONTROL_INFTY_OPERATION'
exporting
infty = '9004'
number = me->atr_v_pernr
validityend = ls_9004-endda
validitybegin = ls_9004-begda
record = ls_9004
operation = 'MOD'
nocommit = abap_true
importing
return = ls_returninfo.

ls_9004 is a structure that is of type P9004 of the database table PA9004.

The reason the dump is happening is because of the FM trying to set attribute A_CONTEXT of CL_HRPA_INFOTYPE_FACTORY twice.

Basically the Old Infotype framework and the New Infotype framework cannot be initialized together.

So my question to you all is that ..
Is there a way to update the non decoupled custom infotype through FM HR_CONTROL_INFTY_OPERATION ? If so then how can I achieve it within the same LUW ?

Please Advice

Regards

Chayan