SAP Program RFMXPR29 - FM: xpra/Update RFTYP field

Title
xpra/Update RFTYP, RFSYS and RFORG Fields

Purpose
This XPRA is used to update the RFTYP, RFSYS & RFORG fields in databasetables - FMCFSIO, FMCFSIO_TR, FMCHA1, FMIOI and FMIOICCN.

Activities
Update RFTYP:
For each database table, the following actions are conducted:
Open a cursor and read a package of data (such as 5000) from thedatabase table (such as dbtab) into an internal table.
Loop at the internal table and fill the empty RFTYP field using thefollowing command:
"UPDATE dbtab CLIENT SPECIFIED SET rftyp = 'a rftyp value' WHERE wrttp= 'a value type'."
For table FMIOICCN, the corresponding rftyp value is chosen from tableFMIOI where the key values in FMIOICCN equals those in thecorresponding fields in fmioi.
If some rftyp (at least one) is updated, commit work.
If an old record, with its RFTYP field updated, becomes a duplicate ofan existing record in dbtab, the above updating process has no effecton the old record. This means that the old record is still in dbtab. Inthis case, a deleting operation is used to remove the old record fromthe database table.
If some records are deleted from FMIOI, output a one-time message forthe customers to run reports RFFMRC00 and BPINDX03 in their R/3 system.
Update RFTYP, RFORG & RFSYS:
Similar procedures to the above are used to update the tables FMCFSIO,FMCFSIO_TR, FMCHA1 and FMIOI. No deletion takes place.
RFTYP,RFORG and RFSYS are set to 'space' when rftyp ='HRCOM' or'HRPRE'.