Trading Platform Integration Automation
In the latest versions of S4 HANA 2020, SAP has come with per-defined integration with one of the trading platform 360T. Which can be extended to other trading platform subject to the changes in the upload file. S4 HANA cloud back-end systems use Hedge Management cockpit to create Hedge request. Other than S4 HANA 2020 version, such as version from S4 HANA1610 onward, allows to create manual trade request. FX trading inbound process for 360T is available from EHP8 onward. At present, only S4 HANA 2020 gives solution for Integration (sending and receiving files) with trading platforms.
The background of this blog is simplest way to integrate SAP back end system with a Trading Platform for processes such as trade request, FX trading process and FX Settlement center. SAP has a standard SPROXY for inbound process with 360T (TreasuryDealNotification_In) under namespace (http://sap.com/xi/TRM). However, standard proxy doesn’t support the process such as Hedge Management in FX process with trading platform.
Thomas is Financial Analyst; he gets request for buying Forex. Thomas calls his company trader to place trade request in trading platform and close it quickly. Jessy answers Thomas’s call and she tells Thomas that she is on her way and it would take some time for her to close the trade request. Thomas is worried that he couldn’t close the trade request on time for the company. It means there could an extra cost for buying forex.
Financial analyst (Thomas) receives daily request from the Treasury department for buying foreign exchange to settle the payable in different currencies. He and his team should ensure to raise the trading request on time and sent to trading platform so that contract for forex trade are closed on time by trader.
Automated process is expected. As soon as the Financial analyst books the trade request, the trader should be able to do trading in trading platform and close the deal with the counterparty.
Workflow should be in place when a trade request is created in SAP. After proper workflow approvals only the trade request should be processed to trading platform.
Settlement (counter confirmation) to avoid risk should also be taken care. Settlement of the contract/deal booked by the trader in trading platform, should be validated with counter confirmation (automated process) and deal should be automatically change to settled and further processing.
Trading Platform integration Solution with SAP Correspondence Monitor (Automated Settlements-Process Steps
- Exposure for Forex is identified
- FX Order is raised
- FX Order is sent for Workflow approval. Approver, approves the FX order is sent to SProxy for upload
- In workflow, if approver rejects the FX order. An email to be sent to related stakeholders
- Approved FX order is sent to SProxy/AL11 for uploading into FXall using SFTP and secured login
- FX order is uploaded into trading platform webserver
- Trader in trading platform receives the request and trades the order with multiple counterparties.
- Fixes a trade with counterparty
- Counterparty accepts the trade
- FX order acceptance is sent to trading platform webserver
- Accepted FX Order is sent to OMS (order management system) via internet and SProxy receives the FX Order
- SProxy coverts the FX order into a Deal in SAP TRM system
- FX Deal is updated into Correspondence Monitor. MT300 message will be triggered to Counterparty
- Deal Confirmation to be triggered (MT300 format) to SProxy
- FX settlement confirmation to be uploaded
- FX settlement confirmation sent to Counterparty
- Counterparty sends the deal confirmation in MT300. Trades are matched and confirmed in Correspondence Monitor via SProxy.
- FX deal will be settled based on MT300 (automated process)
Outbound Process mapping
Simulation – TX23 – Create
Approval is trigger
Automation Logic for Triggering / updating a flat file
- Simulation order is saved, table VTBFHA will be updated with simulation order details such as
- Company Code
- Product Type
- Transaction Type
- Purchase currency
- Sale Currency
- Value Date
- Internal Reference
- VTBFHA table will be update with field Active Status “SAKTIV” = 5 (Simulation)
- Trigger an upload Z program when table VTBFHA is with Active status = 5
- Following are the field mapping for table
- Upload the xml/CSV file into SPROXY or AL11 folder based on the trading platform prerequisites
- PI will pick the file and send it to trading platform using SFTP
Inbound Process mapping
TX24 – Change/Execute
Select the Counterparty with simulation order to be converted into a deal.
System converts the simulation order into a contract with the selected counterparty.
- Pickup Transaction details from inbound file
- Call transaction code TX24 in background, pass the transaction number
- Update the following in Simulate execute
- Purchase currency amount
- Sale currency amount
- Execute the transaction
- Pickup counterparty, search for internal table mapping for counterparty
- Update the counterparty and save
- Contract will be saved and updated into table VTBFHA with condition type = 4 (Foreign Exchange)
Automation logic for Hedge Assignment
- Once the contract is saved and simulation order is converted to contract. Pickup assignment field ‘ZUOND” value (Assignment) and field “BUKRS” value company code from simulation order which is stored in table “VTBFHA”
- Go to Transaction table “VTBFHA”
- Update the ZUOND and BUKRS picked from simulated order, into following selection parameters in Hedged Item table “VTBFHA”
- BUKRS=Company code
- ZUOND = Assignment
- Pickup the following data from the following fields
- BUKRS =Company Code
- ZUOND = Assignment
- DBLFZ= Term Start
- DELFZ= Term End
- Call BAPI “BAPI_FTR_HM_CREATE” and BAPI_TRANSACTION_COMMIT in the sproxy if the deal is to be hedge and update the following data into bapi from the table “VTBFHA”. If the deal is with out hedge, this step can be ignored
Settlement Process in SAP
- Contract is created from trading platform
- SAP correspondence monitor is updated and MT300 is triggered to counterparty for settlement
- MT300 is sent to counterparty via SWIFT or Multibank connectivity
- Counterparty accepts the contract and send response in MT300 via SWIFT or Multibank connectivity
- The contract is settled, and SAP Correspondence monitor is updated with status “Settled”.
Note: To build a dashboard for monitoring the orders, a ABAP report can be developed based on the table VTBFHA.
Seamless Integration (fully automated) between SAP back end system and trading platform can be achieved with SAP standard process, such as simulation order, approval and Correspondence monitor. SAP Treasury Correspondence functionality can achieve the settlement monitoring process seamlessly without manual intervention. This automation of integration with trading platform and settlement process can reduce risk.