Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
nitindeshpande
Active Contributor

Hello Everyone,

This blog is related to the struggle which i had while working with integration of BCM payments with the Bank. Bank Communication Management (BCM) is the sub-module used for making Vendor Payments and Employee payments (Payroll), Utility payments etc.

There are many standard Payment Medium workbench (PMW) formats using which the payment files will be generated in ECC system. In these formats, some of the most popular ones are MT100 and MT103 formats. These files will be generated and saved in AL11 directory of ECC system.

These payment files will be picked from AL11 directory by a PI File sender channel. And for this integration, already SAP has provided a SWIFT ESR content which can be used, to directly integrate with SWIFT Net.

For this we need to have SWIFT as the third party which is responsible to connect with the various banks. But in some cases, client do not want to use SWIFT as they do not have many Banks to integrate with. And this was the case in my project, i had to integrate with Bank server, who themselves had a Web-service hosted to receive the payment files. As the Bank have numerous customers, their design of web-service will be fixed and in PI we need to develop the interface accordingly to consume the web-service hosted at the bank end to send the payment files.

The payment files generated would be in a flat file format and these needs to be converted into XML format in order to send it to the Bank's Web-service. Here is one of the payment file format with fixed number of tags, which is popularly known as Swift standard format MT100.

MT100 Payment File with Single Payment

:20:1500000122

:32A:150805XXX1000,

:50:/XXXXXXXXXXXXX

XXX

P.O.BOX XXXXX

XXXXX - XXXXX

XXXXXXX XXXXX

:52A:XXXXX

:57A:XXXXX

:59:/XXXXXXXXX

Test Vendor

1-XXXXX street

XXXXX - 21485

:70:No.TEST1/5.8.2015

In my requirement the above mentioned file had to be converted into below mentioned XML format.

MT100 Payment File with Single Payment converted into XML

<?xml version="1.0" encoding="UTF-8"?>

<PaymentMessage><PaymentTransaction><CompanyCode>XXXXXX</CompanyCode><SequenceNum>1500000122</SequenceNum><TransactionData>:20:1500000122

:32A:15085XXX1000

:50:/XXXXXXXXXXXX

XXX

P.O.BOX XXXXX

XXXXXXX XXXXXX

:52A:XXXXXX

:53B:/XXXXXXXXXXX

:57A:XXXXXX

:59:/XXXXXXXXXXXX

Test vendor 2

XXXXXX

XXX

:70:No.TEST11/25.8.2015</TransactionData><TransactionComment>Payment from XXXXXX</TransactionComment></PaymentTransaction></PaymentMessage>

The above conversion by using the FCC, by reading the content of MT100 line-by-line and you can map the file directly to the target field directly. Below are the FCC parameters you can use, to perform the conversion.

This was quite easy and can be easily read, when there was only single payment in the file. The problem arises, when there are multiple payments in a single MT100 file. Below is one of the example, which consists of 3 payments in a single file. Like this you can have 'N' number of payments in a single file.

MT100 Payment File with Multiple Payments

:20:1500000122

:32A:15085XXX1000

:50:/XXXXXXXXXXXX

XXX

P.O.BOX XXXXX

XXXXXXX XXXXXX

:52A:XXXXXX

:53B:/XXXXXXXXXXX

:57A:XXXXXX

:59:/XXXXXXXXXXXX

Test vendor 2

XXXXXX

XXX

:70:No.TEST11/25.8.2015

:20:1500000123

:32A:15085XXX8000

:50:/XXXXXXXXXXXX

XXX

P.O.BOX XXXXX

XXXXXXX XXXXXX

:52A:XXXXXX

:53B:/XXXXXXXXXXX

:57A:XXXXXX

:59:/XXXXXXXXXXXX

Test vendor 2

XXXXXX

XXX

:70:No.TEST11/25.8.2015

:20:1500000124

:32A:15085XXX9000

:50:/XXXXXXXXXXXX

XXX

P.O.BOX XXXXX

XXXXXXX XXXXXX

:52A:XXXXXX

:53B:/XXXXXXXXXXX

:57A:XXXXXX

:59:/XXXXXXXXXXXX

Test vendor 2

XXXXXX

XXX

:70:No.TEST11/25.8.2015

This flat file, now needs to be converted into XML file in PI. In this file, we do not have any identifiers to know the start and end of the payment. Hence it is very difficult to convert it into XML. Hence in BCM we have an option where we can add the identifiers, which will be beneficial for us in PI to know the start and end of the payment.

In your ECC system, Go to transaction code OBPM4 -> Select your Payment Medium Format (In our case MT100) -> Edit Variant -> Payment Medium Format -> Click on Format Parameters -> Enter your desired special character in File Lead Character ( I have chosen @ as special character)

Once you have added the file lead character, the Input file looks asbelow -

MT100 Payment File with Multiple Payments with File Lead Character

@

:20:1500000122

:32A:15085XXX1000

:50:/XXXXXXXXXXXX

XXX

P.O.BOX XXXXX

XXXXXXX XXXXXX

:52A:XXXXXX

:53B:/XXXXXXXXXXX

:57A:XXXXXX

:59:/XXXXXXXXXXXX

Test vendor 2

XXXXXX

XXX

:70:No.TEST11/25.8.2015

@

:20:1500000123

:32A:15085XXX8000

:50:/XXXXXXXXXXXX

XXX

P.O.BOX XXXXX

XXXXXXX XXXXXX

:52A:XXXXXX

:53B:/XXXXXXXXXXX

:57A:XXXXXX

:59:/XXXXXXXXXXXX

Test vendor 2

XXXXXX

XXX

:70:No.TEST11/25.8.2015

@

:20:1500000124

:32A:15085XXX9000

:50:/XXXXXXXXXXXX

XXX

P.O.BOX XXXXX

XXXXXXX XXXXXX

:52A:XXXXXX

:53B:/XXXXXXXXXXX

:57A:XXXXXX

:59:/XXXXXXXXXXXX

Test vendor 2

XXXXXX

XXX

This will be converted into XML by following the below mentioned steps -

Step 1 - Have the below mentioned FCC parameters in your File Sender Channel -

Step 2 - Graphical Mapping to read the payment file line by line as we did it for the Single payments file. But the problem here would be, we need to break the particular payment, which is being done using the file lead character @. Using this we will add the context change, after every payment.

Context Addition UDF -

Now you have the payment file consisting of multiple payments, but with each payment separated with a Context Change. Now this payment file is similar to the single payment file as mentioned at the start of the blog. Hence this payment file can be easily converted into XML, by reading the records line-by-line.

Final Output XML desired by the Bank -

MT100 Multiple Payment File converted into XML

<?xml version="1.0" encoding="UTF-8"?>

<PaymentMessage><PaymentTransaction><CompanyCode>XXXXXX</CompanyCode><SequenceNum>1500000122</SequenceNum><TransactionData>:20:1500000122

:32A:15085XXX1000

:50:/XXXXXXXXXXXX

XXX

P.O.BOX XXXXX

XXXXXXX XXXXXX

:52A:XXXXXX

:53B:/XXXXXXXXXXX

:57A:XXXXXX

:59:/XXXXXXXXXXXX

Test vendor 2

XXXXXX

XXX

:70:No.TEST11/25.8.2015</TransactionData><TransactionComment>Payment from XXXXXX</TransactionComment></PaymentTransaction>

<PaymentTransaction><CompanyCode>XXXXXX</CompanyCode><SequenceNum>1500000123</SequenceNum><TransactionData>:20:1500000122

:32A:15085XXX1000

:50:/XXXXXXXXXXXX

XXX

P.O.BOX XXXXX

XXXXXXX XXXXXX

:52A:XXXXXX

:53B:/XXXXXXXXXXX

:57A:XXXXXX

:59:/XXXXXXXXXXXX

Test vendor 2

XXXXXX

XXX

:70:No.TEST11/25.8.2015</TransactionData><TransactionComment>Payment from XXXXXX</TransactionComment></PaymentTransaction>

<PaymentTransaction><CompanyCode>XXXXXX</CompanyCode><SequenceNum>1500000124</SequenceNum><TransactionData>:20:1500000122

:32A:15085XXX1000

:50:/XXXXXXXXXXXX

XXX

P.O.BOX XXXXX

XXXXXXX XXXXXX

:52A:XXXXXX

:53B:/XXXXXXXXXXX

:57A:XXXXXX

:59:/XXXXXXXXXXXX

Test vendor 2

XXXXXX

XXX

:70:No.TEST11/25.8.2015</TransactionData><TransactionComment>Payment from XXXXXX</TransactionComment></PaymentTransaction>

</PaymentMessage>

The above mentioned method can be used to convert the MT100, MT101, MT103 file into XML. I have not converted each tags of the MT100 payment file into individual XML field, as this is not suggested as per the Bank standards and the Bank needs the file in a exact SWIFT format. The only reason they look for XML file is because they have a Web-service setup at their end, to which we need to send the payment data.

The above mentioned XML format is the web-service structure requested by the Bank in my scenario. In other scenarios you may find the web-service structure slightly different but there will be no change in the MT100 file structure. You can use this logic to any sort of web-service with slight tweaking.

I would like to hear the feedback on this blog from all the BCM consultants and PI consultants who have worked on the Banking scenarios. I hope this would be helpful for all those working with SAP BCM integration with Banks.

Regards,

Nitin Deshpande

8 Comments
Labels in this area