Programme SAP RREGCH_RUN_DATE_CONVERSION - Program for Converting "Last Run for Filling/Volume Tracking"

Purpose
This program transfers data relating to the last run of programsRREGCH_VT and RREGCH_FILL from table TCGENV to table CCRCT_RUN.

Integration
Previously, each run of program RREGCH_VT or RREGCH_FILL created anentry in table TCGENV relating to the last run. These entries can beviewed using the IMG activity 'Specify Environment Parameters'. For moreinformation, see the documentation for programs RREGCH_VT andRREGCH_FILL. These entries must be transferred to table CCRCT_RUN.

Selection
This program determines all entries in table TCGENV that haveenvironment parameters starting with the prefix SVT_FILL_LAST_RUN, SVT
_LAST_RUN_DATE, or SVT_LAST_RUN_TIME and have a sequential number.Depending on the regulation and scenario, table TCGENV contains an entryeach for the last run of substance tracking (program RREGCH_VT),SVT_LAST_RUN_DATE-(sequential number), and SVT_LAST_RUN_TIME-(sequential number).
For each regulation, table TCGENV contains an entry for the last fillingrun (program RREGCH_FILL). The environment parameter for this startswith SVT_FILL_LAST_RUN-(sequential number).

Output
An entry is generated for every relevant regulation in table CCRCT_RUNfor the filling process (program RREGCH_FILL). The program determinesthe relevant regulation and the date of the last run from the parametervalues in table TCGENV. It then generates an entry in the tableCCRCT_RUN, with the determined regulation and the date of the last run(end date). The start date is set to 01.01. of the year in which thelast run took place. The start time is set to 00:00:00 and the end timeis set to 23:59:59. The ACTION field from table TCGENV is filled withthe value 'FILLING'. The SCEN field remains empty as it is not neededduring filling.
A entry is generated for every regulation and the corresponding scenarioin table CCRCT_RUN for the monitoring process (program RREGCH_VT). Theregulation, the scenario and the date of the last run are determinedusing the parameter values for the environment parameterSVT_LAST_RUN_DATE. Added to this is the time of the last run, which isdetermined for the relevant regulation and scenario from the parametervalue of the SVT_LAST_RUN_TIME environment parameter.