Abstract : This article aims at providing the detailed steps and information on why SWIFT envelopes are not listed when creating SAP XREF records and a possible work-around to resolve this issue without requiring the code fix.
Brief description of the problem occurrence :-
On an instance loaded with SWIFT envelopes navigate to Deployment -> Adapter Utiilites -> SAP Routes -> SAP Route-XREF and create new respective X-REF(Inbound/Outbound).
Notice that the SWIFT envelopes are not displayed in the drop-down list of available Envelopes.
Analysis and fixing the issue :-
This is because of the below queries which is used to populate the Envelope list.
SELECT DISTINCT ENVELOPE_ID FROM ENVELOPE WHERE ENVELOPE_FUNCTION=1 AND TYPE IN ('ST SE', 'UNH UNT Syntax 4','STX END','CII','VDA') => for Inbound SAP XREF's
SELECT DISTINCT ENVELOPE_ID FROM ENVELOPE WHERE ENVELOPE_FUNCTION=0 AND TYPE IN('ST SE','UNH UNT Syntax 4','MHD MTR','CII','VDA') => for Outbound SAP XREF's
It is to be noted that the TYPE of SWIFT Envelopes happens to be 'FIN' and this is not part of the selection criteria in the above queries.
Change the above queries in jdbc.properties_asset_ext.in as below and run setup files and bounce back SI.
SELECT DISTINCT ENVELOPE_ID FROM ENVELOPE WHERE ENVELOPE_FUNCTION=1 AND TYPE IN ('ST SE', 'UNH UNT Syntax 4','STX END','CII','VDA','FIN')
SELECT DISTINCT ENVELOPE_ID FROM ENVELOPE WHERE ENVELOPE_FUNCTION=0 AND TYPE IN('ST SE','UNH UNT Syntax 4','MHD MTR','CII','VDA','FIN')
With this change SWIFT envelopes in the drop-down list for both Inbound and Outbound SAP XREF's will be available and can be selected for use.
Attaching the screen shot for reference.
