Archiving Positions with TRTM_TPM
You use this archiving object to archive positions in SAP Treasury and Risk Management
(TRM).
TRM manages positions for a broad range of financial instruments. Consequently, the criteria for archiving vary depending on the type of financial instrument.
Positions in SAP Treasury and Risk Management
(TRM) can be divided into the following groups:
OTC positions
Loan positions
Securities positions
Listed derivative positions
Positions are not archived individually; instead, they are archived in position groups. Position groups
are only used in the context of archiving. A position group is used to group together positions that are so closely related that they cannot be handled separately in archiving.
Creation of position groups:
All positions of a position group have the same company code.
In addition:
Securities positions or listed derivative positions that have the same ID number belong to the same position group.
OTC positions and loans that have the same financial transaction number or loan number belong to the same position group.
Note
The valuation area, therefore, is not used as a criteria for differentiating position groups.
All positions that belong to a business transaction that generates flows for different positions belong to the same position group. This can arise in connection with hedging relationships, securities account transfers, or corporate actions, for example.
Example
All positions of a convertible bond 123 and of the related share 456 in all valuation areas in company code 001 are grouped together into one position group.
All positions for OTC transaction 65438 in all valuation areas in company code 001 are grouped together into one position group.
A position group is archived once all of the positions in that position group can be archived.
Criteria Dictating Whether Positions Can Be Archived
All flows for a position must have the status Fixed
or Reversed
.
Exception:
Open and close flows for OTC transactions
Each business transaction must have the status U
(Updated
).
The position components Units
or Nominals
must be zero at the start of the retention period.
There must not be any business transactions scheduled after the start of the retention period for the position.
The maturity of a position must fall before the start of the retention period. (Note that the latest date of a position is considered the due date.)
If you want to archive securities positions or listed derivative positions with a very long term, you can deactivate the maturity check. You do this by deactivating the Securities Only After Maturity
indicator in the selection criteria of the variant.
In the case of securities positions that do not have a maturity (such as stock positions), no maturity check is performed.
If a position forms part of an intragroup transaction, it cannot be archived. For such a position to be archived, the intragroup status of the position must be initial.
The position must not form part of a hedging relationship in Hedge Accounting for Positions
.
If a money market position or a loan is used as a hedged item in a hedging relationship in Hedge Accounting
, it cannot be archived.
If a foreign exchange transaction or a derivative is used as a hedging instrument in Hedge Accounting
, it cannot be archived.
Caution
The read program for archiving object TRTM_TPM
displays all table entries for the archived position groups. However, it is difficult to interpret the business significance of this data. Before you start archiving, we recommend that you first ensure that you have met all legal prerequisites. Only when you no longer need to be able to present data can you archive that data.
Recommendation
If you use Loans Management
(FS-CML) and, alongside loans, you also manage positions for parallel valuation areas in Position Management, we recommend that, after you have archived loan contracts using archiving object CMLCONTRCT
, you also archive the relevant positions using archiving object TRTM_TPM
.
Positions are archived using the Archive Development Kit (ADK)
. For more information, see the documentation on Data Archiving
in SAP NetWeaver Library, in particular the section relating to archiving using the Archive Development Kit (ADK)
.
Technical Data
Size of archiving file: Max. 500 MB
Relationship to Other Archiving Objects
From the business point of view, the archiving object "TRTM_TPM
Positions" is closely related with the archiving object "TRTM_FTR
Financial Transaction". If you have archived financial transactions, you can then archive the related positions as well.
The archiving object Positions
TRTM_TPM
shares the same Customizing settings for the minimum retention period as the archiving object Financial Transaction
TRTM_FTR
. This is because the same archiving criteria need to apply to the positions as those that apply to the related financial transactions.
Programs
Program | Function | Notes |
|---|---|---|
| Write | On the basis of your entries, the write program selects the positions for archiving and creates the position groups. In the case of complete position groups, the system checks whether the individual positions can be archived. If all positions of a position group can be archived, the system archives that position group.
You can first run the write program in the Once the test run has proved successful, you can start the write program in End of the note. See also: |
| Delete | The deletion program deletes all archived positions because data deletion cannot be executed by the write program (for security reasons). On the selection screen, you can choose between |
| Read | |
| Reload | You should only use this program in cases when an error has occurred during archiving. Furthermore, we recommend that you perform the reload as soon as possible after the erroneous archiving run was performed.
When you run this program, the system updates the entries in the active archive information structures. End of the note. See also: Reloading the Archive |
Tables
The archiving object TRTM_TPM
is used to archive data from various tables.
Together with the positions, the relevant entries in the NPV table (table VTVBAR
), the logs (table TRPT_LOG
), and the calculation results (table FTBCVAD_CVA
and FTBBCVA_EE
) are archived.
Authorization Object
Authorization Object | Notes |
|---|---|
| The write program checks the authorization for archiving object |
| The system checks the authorization for the |
In Customizing for the Transaction Manager
under , you define per company code and product type the minimum retention period for financial transactions and positions. The minimum retention period specifies the minimum number of days that a financial transaction or position, after their maturity has been reached, needs to remain in the system before it can be archived.
We recommend that you activate the delivered archive information structures SAP_TRTM_TPM_0
and SAP_TRTM_TPM_1
before the first archiving run. This simplifies reading archived positions later with the read program (improved performance) and enables you to use the Archive Information System
(transaction SARI
) to read archived positions.
SAP delivers the field catalog SAP_TRTM_TPM
and the archive information structures SAP_TRTM_TPM_0
and SAP_TRTM_TPM_1
.
Field Catalog | Archive Information Structure | Archive Information Structure |
|---|---|---|
Company Code (Key Field) | X | X |
Product Type (Key Field) | X | X |
ID Number (Key Field) | X | X |
Loan Number (Key Field) | X | X |
Financial Transaction Number (Key Field) | X | X |
Depot | X | No selection parameter |
Futures Account | X | No selection parameter |
Portfolio | X | No selection parameter |
Trader | No selection parameter | No selection parameter |
Creating Archive Files
You are in the Archive Administration: Initial Screen
(transaction SARA
), and the name of the archiving object TRTM_TPM
is entered in the Archiving Object
field.
Choose Write
.
A screen appears on which you can schedule the write program to be run in the background.
If archiving has already been performed for an archiving object and there are still archive files from that archiving run that have not yet been processed by the relevant deletion program, the system informs you of this in a separate window.
The same applies for interrupted archiving runs.
Caution
Archiving data more than once can lead to various problems. Hence some archiving objects require that data is not replicated in the archive, because this can lead to incorrect results (such as using archived data to produce totals). Ensure the following:
The new write job that needs to be scheduled does not select the same data that is contained in archive files that have not yet been processed by the deletion program
No variants with overlapping selection values are used in parallel
Note
If the variant that you have selected is already being used in other jobs, you can choose the Jobs with Selected Variant
pushbutton to display the variant and delete it if necessary.
Use the input help to select a variant. If no variant is available, choose Maintain
and create the variant that you require. See also: Creating Variants for Write Program for TRTM_TPM
Enter the start date
and the spool parameters
.
Note
With the Archive Directory
pushbutton, you can determine how much storage space is free in the current object-specific archive directory before you start to archive.
Now you have entered all of the data required for the background job. To run the job, choose Execute
.
Note
After all archive files of a run have been written completely, the system event SAP_ARCHIVING_WRITE_FINISHED is triggered by the ADK. In reaction to this event, processes that occur downstream from archiving (such as automated file storage) can be triggered by external tools.
Furthermore, you can navigate to the following menu options:
Customizing
Job Overview: Here you find an overview of all archiving jobs as well as functions for processing them.
Administration
DB Tables
Information System
Note
You can display the logs documenting processing by choosing Logs
from the Archive Administration initial screen.
See also: Checks on Archiving Object TRTM_TPM
Deleting Archived Data from the Database
You can display the archived data as follows:
In Archive Administration
(transaction SARA
), you can call up the read program RTPMARCHIVE_READ_BY_INDEX.
In the Archive Administration System
(transaction SARI
), you can display the data archived when you have activated archive information structures for the archiving object.
In exceptional cases when archiving runs contain errors, you can use the "Reload" function to reload the archive. For more information, see Reloading the Archive