cancel
Showing results for 
Search instead for 
Did you mean: 

File Content Conversion using SFTP

Former Member
0 Kudos

Hello All,

I have a requirement like, I need to read the text file using SFTP adapter. for this I have used ModuleTransformBean in Module tab of SFTP.

Text file contain Header filed values and record types(04,05,06) and then Files Trailer .

So I have created structure like as below

Since FileHeader and FilerTrailer records will be comes only once per text file so that i have given as Occurrence 1

And the parameter that I maintained in the adapter module tab are

Case 1:


xml.recordsetStructure - FileHeader,*,Documents,*,Payments,*,PaymentInstruments,*,FileTrailer,*

Now the output Structure is

Case 2:

Since FileHeader and FilerTrailer records will be occurs only once in a files so I have mentioned the parameters like as below

xml.recordsetStructure - FileHeader,1,Documents,*,Payments,*,PaymentInstruments,*,FileTrailer,1

xml.recordsetStructureOrder - var

Now the structure coming like

So As per my requirement I should repeat the Recordset and FileHeader and FileTrailer occurrence should be one

Can any one please help in this requirement

Thanks in advance.

Thanks

Pavan

Accepted Solutions (1)

Accepted Solutions (1)

former_member186851
Active Contributor
0 Kudos

Incase you get a fileHeader only once for a file,Repeat it for each recordset using mapping

Former Member
0 Kudos

Thanks for your response Raghuram,

No I can't repeat it at mapping level. Because I am sending this text data as IDoc at receiver side.

And also for example if incoming text file contains more than one  FileHeader's/FileTrailerr's  then I should reject that file.

Thanks

pavan

Answers (1)

Answers (1)

former_member186851
Active Contributor
0 Kudos

Pavan why dont you try multimapping,I guess you cant repead fileheader if it is coming once using Beans