cancel
Showing results for 
Search instead for 
Did you mean: 

How to distinguish between header and data field for fixed length file when keyvalue is same for header and data record

Former Member
0 Kudos

How to distinguish between header and data field for fixed length file in sender FCC when key value is same for header and data record.

Sample data file attached before .Problem at present is that even data record are getting reflected as header in the payload as the key field value is same for header and data .

Thanks

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member184720
Active Contributor
0 Kudos

Hi Anshu - What about that "EH" in your details? Can't you use it?

If you are getting everything into header then as suggested by Steve, you have to go for intermediate mapping..

Based on your sample file i don't see that "EH****" or "P8****" etc in your header line so you can easily convert it into nested stcrture using the intermediate grpahical mapping incase your third party is not ready to provide another key field..

steve_coombes
Participant
0 Kudos

Hello Anshu

You could create an intermediate data structure that works for both header and data records. Use FCC to load the file into the intermediate structure, and then map to the structure you wish to use.

regards

Steve

ankit_srivastava3
Participant
0 Kudos

Hello Anshu,

If you don't need the header, then specify the "Document Offset" as "1" in your sender FCC to ignore header. Converting Text Format in the Sender File/FTP Adapter to XML - Advanced Adapter Engine - SAP Library

Thanks & Regards,

Ankit

Former Member
0 Kudos

Ankit I need header as well as data records . I cant ignore header .

ankit_srivastava3
Participant
0 Kudos

Hello Anshu,

Can you please share sender FCC parameters that your are using?

Regards,

Ankit

Former Member
0 Kudos

Hi Anshu

The easiest solution will be get the file changed from 3rd party so that the key field value will be different for header and data.

If your input file has 1 header and that is on the first line, then you can write an java mapping or adapter module to populate the structure.Read the file as it is and then generate structure inside java mapping.

Former Member
0 Kudos

Hi Anshu

I think the key field value should be different for both header and data record. Otherwise the standard content conversion will not work as the way it should be.

Former Member
0 Kudos

Indra,

Check the attached data file its same and that's why its taking all of them as header in payload .

Any simple solution for this ?

Thanks.