we want to replicate exchange rates from S4 to Sales Cloud once a day using the Data Replication Framework.
Exchange rates are replicated using transaction DRFOUT and normally I would create a variant for it and schedule background processing.
In case of DRFOUT the problem is that the replication filter criteria is generated based on the defined outbound implementation. So when I want to save the variant I can only save the initial screen with the Replication Model and the Outbound Implementation but not the filter criteria itself where I want to set todays date:
If the job runs tomorrow of course the 24th of June shall be used. For a normal selection screen you could define a date dynamically as today.
But the date is not availabe as described above. Any idea how to schedule this job?
One possibilty would be to overwrite method IF_DRF_OUTBOUND~ENRICH_FILTER_CRITERIA of implementation class CL_FNDEI_EXCHANGERATE and add sy-datum to ET_ADD_EXTERNAL_CRITERIA. But unfortunately the class is final
So it would be necessary to create an enhancement for this method. Then in parameter ET_ADD_EXTERNAL_CRITERIA you add an entry with TABLENAME = FNDEI_S_CURRENCYCONVERSION. Then you append an entry to FRANGE_T with FIELDNAME = GDATU. Finally you add an entry to SELOPT_T with
SIGN = I
OPTION = EQ
LOW = SY-DATUM
In debugger it works fine.
Please don't hesitate to provide further ideas!!