cancel
Showing results for 
Search instead for 
Did you mean: 

File Content conversion

Former Member
0 Kudos

Hi..

In the source data structure we have one header record with 8 fields and many detail records with 900 fields each. The target data structure has only detail record with 21 fields. Only one field from source header record and 20 fields from the source detail record will be mapped to the target. Can anybody help me how we could handle the file content conversion for this scenario.

Also, due to the large volume of data if we have to split the file in to smaller packets, how could we retain the header record for all detail records?

Accepted Solutions (0)

Answers (2)

Answers (2)

moorthy
Active Contributor
0 Kudos

Hi,

My suggestion is, instead of doing all Data structures for 900 fields, it is better to read the file in general format i.e Row Structure

In this case your data type will look like this

DT_Source

-Record (0..n)

-Row (field)

Content Conversion

Record.fieldNames = Row

Record.fieldSeparator = 'nl'

If you do this, actual structure can be build in

- Using Adapter Module - output will be field wise structure-here you need to split entire row into fields..I think, if it is a csv file, just you need to write java function to split the records.

- Or using Java Mapping -in this case output will be your target structure..

Refer this blog-

/people/sravya.talanki2/blog/2005/08/16/configuring-generic-sender-file-cc-adapter

<i>how could we retain the header record for all detail records?</i>

>>

http://help.sap.com/saphelp_nw2004s/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm

Hope this helps,

Regards,

Moorthy

Former Member
0 Kudos

Arjun, The problem with this request is about the number of fields you have in the Detail record(s) (900 Fields) and how you are going to maintain them in the Adapter "file content Conversion", Honestly its tough to maintain 900 fields in the File content conversion.

If I were you I will be doing either one of the following

1) If the File is been Generated inside your firewall, I will ask the party to produce a file just with 20 fields in the Detail Record. Its looks like the file been generated from the Mainframe systems and they need to modify their Program and the copy book a little bit, but its worth doing in the legacy system iteslf.

If they agree for this, then you are going to get a file with One header record and many detail records with 20 fields apiece.

Using the NODE function UseOnesAsMany function, you can send your HEADER Field to the all the Detail fields for sure. refer the blog

/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii

But I am not quite sure, if you split the file into many bundles, whether the Header record will be retained for all the packages, logically I feel its going to be. But I have never tested that.

2) Approach II. If the file is created outside your firewall or the party is not interested to filter only the 20 fields of the Detail records, you need to write a MODULE PROCESSING in the File Adapter. So when the file lands into XI, your Module PRocess is going to filter all the unwanted fields and its going to send only 20 fields to the Pipeline.

3) Or you need to create an OSS notes for SAP for your 900 fields in the File Content conversion.

But I have never developed a Module Processing in my life.

Given an Option I will choose approach I for sure , it will make everyones life simple and easy.

MICHAL/Krishna/other legends what do you guys say???