Skip to Content

How to handle multiple structures in sender file content conversion in SFTP?

Hi,

I have a file structure like below with fixed length.

FileHeader  

      field1,field2,...

BatchHeader  

     field1,field2,....

DetailRecord    

     field1,field2,....

BatchTrailer

     field1,field2,....

FileTrailer

     field1,field2,....

File Header and File Trailer repeats once in the file. Batch Header, Detail Record and Batch Trailer repeat multiple times. May be take it as for each employee the Batch Header, Detail Record and Batch Trailer gets repeated with multiple line items (Detail Record ) for each employee.

FH0012016   28072016

BH0165757   28072016 1st

DT0165757   28072016  Richa 388893 34.09

DT0265757   28072016  Tina   385693 36.09

BT0165757   28072016  1st

BH0234345   29072016 2nd

DT0134345  28072016  Dilip   388893 44.09

BT0165757   28072016  2nd

FT0012016   28072016

I tried placing the file in NFS location and pick with file adapter , FCC is not working. Kindly help me how to pick the file with this structure from sender location.

Regards,

Suman

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    Jul 29, 2016 at 05:02 AM

    Hi All,

    'FileHeader,1,BatchHeader,*,DetailRecord,*,BatchTrailer,*,FileTrailer,1'

    RecordSet Sequence parameter be Variable

    This worked for my case.

    Regards,

    Suman

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 28, 2016 at 12:34 PM

    Hi Suman,

    It seems to be a very simple file structure. can you please share your FCC your are using so that prominent answer can be given.

    Thanks,

    Apu

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 28, 2016 at 04:15 PM

    Hi Suman,

    1. Please do FCC & have your 1st structure (All nodes at same level).

    2. For this 1st structure you can apply java mapping to have DetailRecord under your BatchHeader record.

    Let the RecordSet Sequence parameter be Variable while doing FCC in 1st step.

    Regards,

    Mohammed Farooq

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 28, 2016 at 10:33 AM
    Add comment
    10|10000 characters needed characters exceeded

  • Jul 28, 2016 at 10:50 AM

    Hi Suman,

    Please go through the below blogs for MTB in SFTP sender for your requirement.

    Solve Key Field Problem using StructPlain2XML in MessageTransformationBean!!

    Standard Adapter Framework modules [AF_Modules] in PI 7.1 –Part 2

    Regards,

    Suhale Shaik.

    Add comment
    10|10000 characters needed characters exceeded