Affiliation messages through the RED system 
Use
The generation of Social Insurance affiliation messages is performed using the program ‘Affiliation message through the RED system of the Social Insurance Administration (TGSS).' (RPCAFIE1). Using this program, you can communicate registrations, de-registrations and changes in the employee details directly in the Social Insurance affiliation data file.
Requirements
To correctly generate an affiliation message, the following tables must be correctly set:
T5E30 Adaptation of personnel actions and reasons for Social Insurance.
T5E31 Actions and situations for affiliation messages
To do this, activities related to the data exchange through the RED system must have been performed in the Payroll Implementation Guide, under Evaluations for Social Insurance ® RED system:
Functional Characteristics
The program RPCAFIE1 creates a file for sending information to Social Insurance with the object of maintaining company employee data in the affiliation data file. Using this program, you can communicate registrations, de-registrations and changes in the employee data. Notifications of changes of data supported by the program include: the change in contribution group, change in contract and change of epigraph for industrial accident (IA) and industrial disease (ID). Meanwhile the possibility is included of modifying or eliminating previous movements.
You create the file in accordance with the specifications published by the Social Insurance Administration for the exchange of documents through the RED system (Electronic Document Remission), which is based on Electronic Data Interchange (EDI).
You can display the data and store it in the data carrier with the help from the program for displaying sequential (TemSe) files (RPUTMSE0). Likewise, it is possible to choose the display of individual data medium exchange (DME) records. You can perform this display with both MS-Word and MS-Excel.
The affiliation message is structured in such a manner that it allows inclusion in only one EDI message of:
The segments constituting the AFI message are:
Note: (1) Not created by the program, since this is optional for TGSS.
The program creates the affiliation message from personnel actions that are entered into the system at employee level. Generally, personnel actions and reasons are considered if they have one or more actions associated to them according to the 'Adaptation of personnel actions and reasons' table in the RED System. Before you can run this program successfully it is therefore necessary to set the corresponding basic data as indicated above
An exception to the above are the change of epigraph personnel actions (MT), change of contract type (MC) and change in contribution group (MG) These actions are automatically reported, therefore it is not necessary to assign them in the table T5E30.
In order to report these changes at employee level, the program consults the infotype 'Personnel actions' (0000). For each segment of this infotype, it searches the 'Social Insurance' (0061) infotype for any changes that may have been made (change of epigraph, change of contract type, change in contribution group) and, if it finds any, it automatically reports them in the FAB segment. In addition, for every segment of the 0000 infotype, the program also searches the infotype 0061 for a change of contribution account code, and if it finds one, reports it by generating two EMP segments, deregistering the previous CAC, and registering the new CAC.
The data exchange file generated in the user work directory in the R/3 server takes as name:
MMM.RRRRRRRR.V01
given that:
MMM is the logon client, and
RRRRRRRR the name of the program being run.
Activities
You can access the program through the system menu, under System ® Services ® Reporting.
Enter the program name ' RPCAFIE1' and then press the trigger key.
In the program selection screen, enter the corresponding data in each field as indicated below, and then start the program.
Selection parameters
Action and situation
: Keys entered in these fields will indicate the system the operation and reason which will be carried out at employee levelIf you don’t specify the personnel action or reason, the system will select all operations/reasons that have occurred during the period, for the selected persons
The following keys are allowed by the program:
Action |
Reason |
Comment |
MA |
01 |
Entry |
MB |
51 |
Voluntary leaving of contracted employee (*). |
MB |
54 |
Involuntary leaving (*) |
MB |
56 |
Leaving due to death (*) |
MB |
58 |
Leaving due to becoming a pensioner (*) |
MB |
61 |
Leave for military service (*) |
MB |
63 |
Voluntary leave (*) |
MB |
64 |
Leave for legal strike or employer-lockout (*) |
MG |
Change in contribution group(**) | |
MC |
Change in contract (**) | |
MT |
Change in IA and ID epigraph (**) | |
ME |
Deletion of previous movements | |
MD |
Deletion of consolidated entries | |

In the case of an employee leaving action (*), you should take note of the following particularities:
The leaving date for Social Insurance is the day before the start date of the employee leaving action in the 00 infotype. Therefore, if you want to report a leaving action, you must include the starting date of the leaving action in the evaluation time interval indicated when you launch the program.
Actions marked with (**) are reported automatically. It is not necessary, or recommended, to assign them a personnel action in the T5E30 table. On the contrary, although the system continues to accept the assignment, information errors can occur .

Any personnel action change which is assigned an MC action without a corresponding change in contract in the 0061 infotype could lead to a change of contract being erroneously reported.
The selection screen also offers the following fields:
‘Identify message syntax’: This identifies the category of the following message.
‘Version of message syntax’: Version of previous message.
‘Identif. process syntax’: Identifies the version of the validation program, printout and process that the previous issuer has used in the exchange.
‘Version process syntax’: Version of previous validation module.
‘Authorization key’: Key provided by the TGSS when it receives administrative authorization to present the nominal employee list. One per company, employer group or authorized professional.
‘SILCON key. SILNET network’: Key provided by Social Insurance Administration (TGSS). This identifies each natural person that interacts with the system.
‘New Silcon key’: Since the SILCON key has a limited time duration, a new access key is requested, and will be entered as new if the existing key has expired or you want to change it. (Future use).
‘Date of submission’: The year, month and day for sending the message.
‘Time of submission’: In hours and minutes.
‘External name AFI file’: This records the MS-DOS plan file name with AFI suffix that has been prepared for the exchange.
‘Test indicator’: This indicates the category of message sent:
‘CENDAR reference’: TGSS reference. For internal use by the TGSS.
‘Personal key’: Operator personal key.
‘Printout indicator’: This indicates whether the user wants a printed response to the request, or not.
Individual case: Modification of a Previous Movement
With the object of notifying of a previous movement, you must ensure that personnel action and reason correspond to two actions according to the RED System. The first action is to delete the movement to be modified (ME) and the second, notification of entry, leaving or change in employee data.
See also:
Social Insurance legal reports RED System Data exchange using RED System