cancel
Showing results for 
Search instead for 
Did you mean: 

File Content Conversion problem

Former Member
0 Kudos

Hi Friends,

I have following XML file :

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

- <PaymentInfoMessageResponse>

- <PaymentInfoResponse>

<TransactionType>MT940</TransactionType>

<SequenceNum>1345</SequenceNum>

<ReceiptTime>4</ReceiptTime>

<ProcessStatus>ok</ProcessStatus>

<Comment>ok</Comment>

- <TransactionData>:20:2000000003 :32A:081227SAR10000,00 :50:AL WAHA PETROCHEMICALS AL-JUBAIL INDUSTRIAL CITY KSA :52A:AAALSARI :53B:/010-049-123-008 :57A:BSFRSARI :59:/812-8300-270 SAHARA PETRO. (TESTING FOR B2B) OFFICE NO. 987 45678 AL JUBAIL INDUSTRIAL CITY :70:INV. 9876543 FR.27.12.08

</TransactionData>

<CompanyCode>1100</CompanyCode>

</PaymentInfoResponse>

</PaymentInfoMessageResponse>

From this I want to create text file that only contains <TransactionData>, that is:

:20:2000000003 :32A:081227SAR10000,00 :50:AL WAHA PETROCHEMICALS AL-JUBAIL INDUSTRIAL CITY KSA :52A:AAALSARI :53B:/010-049-123-008 :57A:BSFRSARI :59:/812-8300-270 SAHARA PETRO. (TESTING FOR B2B) OFFICE NO. 987 45678 AL JUBAIL INDUSTRIAL CITY :70:INV. 9876543 FR.27.12.08

How can I achive this using FCC on receiver side?

Thanks

Brij..

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

if u want only the data of node<TransactionData> the create the target structure as


<MT_Target>
<PaymentInfoMessageResponse>
- <PaymentInfoResponse>
 <TransactionData>:20:2000000003 :32A:081227SAR10000,00 :50:AL WAHA PETROCHEMICALS AL-JUBAIL INDUSTRIAL CITY KSA :52A:AAALSARI :53B:/010-049-123-008 :57A:BSFRSARI :59:/812-8300-270 SAHARA PETRO. (TESTING FOR B2B) OFFICE NO. 987 45678 AL JUBAIL INDUSTRIAL CITY :70:INV. 9876543 FR.27.12.08
</TransactionData>
</PaymentInfoResponse>
</PaymentInfoMessageResponse>
</MT_Target>

in the receiver communication channel specify theFCC parameters as given below


_Parameter Name                                        Value_
RecordsetStructure:                   PaymentInfoMessageResponse,  PaymentInfoResponse
now add these parameters alsoby clicking on( +) button
PaymentInfoMessageResponse.fieldSeparator:   'nl'
PaymentInfoMessageResponse.endSeparator     'nl'

While Mapping do like this


TransactionData(Source Field)----------TransactionData(target Field)

Hope this will fullfill ur requirement

Thanks and reagads,

Kubra Fatima.

Answers (6)

Answers (6)

Former Member
0 Kudos

I was able to generated the required text file. Last message from Fatima was really helpful..

I created datatype as that.. and thn as suggested by Chandra I mapped...

and Cheers........:-)

Thanks All

Former Member
0 Kudos

Hi,

Chandra's suggetion is good.

Better way is, to implement Mapping Program to get only Transaction Data in the target XML message.

Regards,

Ravi.

former_member581827
Participant
0 Kudos

Hi,

Havent you tried to generate XML of target itself in Message mapping only for transaction data node.

Do not map all fields only map transaction data node.

Regards,

Chandra.

Former Member
0 Kudos

Hi,

I would go for message mapping and get a message like this:

<PaymentInfoResponse>

<TransactionData>:20:2000000003 :32A:081227SAR10000,00 :50:AL WAHA PETROCHEMICALS AL-JUBAIL INDUSTRIAL CITY KSA :52A:AAALSARI :53B:/010-049-123-008 :57A:BSFRSARI :59:/812-8300-270 SAHARA PETRO. (TESTING FOR B2B) OFFICE NO. 987 45678 AL JUBAIL INDUSTRIAL CITY :70:INV. 9876543 FR.27.12.08

</TransactionData>

</PaymentInfoResponse>

Once done this, in the content conversion parameters of the channel should be written something like:

Recordset Structure: PaymentInfoResponse

PaymentInfoResponse.fieldFixedLengths: (Length of TransactionData element) eg: 200

PaymentInfoResponse.addHeaderLine: 0

PaymentInfoResponse.endSeparator: 'nl'

Hope this helps.

Best Regards,

Luis

former_member581827
Participant
0 Kudos

Hi,

Try to map only transaction data field in Mapping and do File content conversion by not specifying field fixed lengths as parameter.

Regards,

Chandra.

Former Member
0 Kudos

Hi Chandra,

I am not sure how to use file content conversion here.

I tried it,by giving Recordset Structure on receiving side as PaymentInfoMessageResponse. but thn i get all the fields from xml into text file.

How can i have just the <transactiondata> field?

Former Member
0 Kudos

Hi,

As Chandra explained you, write that: RecordSet structure = TransactionData, because you want only information of tag <TransactionData>. All other tags should be ignored.

Try it.

Regards

Mickael

Former Member
0 Kudos

:20:2000000003 :32A:081227SAR10000,00 :50:AL WAHA PETROCHEMICALS AL-JUBAIL INDUSTRIAL CITY KSA :52A:AAALSARI :53B:/010-049-123-008 :57A:BSFRSARI :59:/812-8300-270 SAHARA PETRO. (TESTING FOR B2B) OFFICE NO. 987 45678 AL JUBAIL INDUSTRIAL CITY :70:INV. 9876543 FR.27.12.08

Do u want the above data in 3 lines as a text file

could u please eloborate more on ur req?

Former Member
0 Kudos

hi fatima,

it ok even if i get it in one line. the main thing is, from the complete incoming xml message , transaction data should only come in text file.