Skip to Content
0
Former Member
Apr 05, 2006 at 02:56 PM

Adding Records In The User Exit

45 Views

I have a requirement to modify the transactional data user exit 0CO_PC_PCP_01. Currently this datasource extracts cost estimate data and using some complex rules I need to determine the active cost estimate for each month and duplicate the records according.

ie if a cost estimate dated 01.01.2005 is valid for all of 2005 then I need to duplicate all corrsponding records 11 times ie one set of additional records per month.

I have created the ABAP code to do this and for small volumes of data it works perfectly. However if I increase the data volume the exit seems to run and run.

The code is as efficient as it can be and there are no database selects within it.

My questions are:

1)is it acceptable to add a high volume of new data in the user exit or should I be looking at an alternative.

2) Does the user exit get called multiple times during a dataload. ie once per datapackage. If so then am I correct in saying it is dangerous to add records this way because some of the records added could already exist and be processed within another datapackage and therefore records would then be duplicated.

3) One approach I have thought of but not yet tested is to use the function module(s) used by the SAP standard extractor to populate a table on R3 and then use a custome datasource to retrieve the data from this table.

Any thoughts/views/answers on the above would be appreciated.

Many thanks