cancel
Showing results for 
Search instead for 
Did you mean: 

File adapter content conversion

Former Member
0 Kudos

Hi all,

We are having File to File Scenario

We are facing problem in Content conversion in File

Adapter(Sender)

The source file is in text format and fields are

seperated by '|' character

The source file structure is :

Header|No. of Records

Data Record1

Data Record2

....

Data Recordn

Trailer|No. of Records

where Data Recordn is of type Field1|Field2|Field3|Field4

and the number of data records is variable

e.g.

Header|5

2|144012|20050801|20050801

212|012|20050801|20050801

244012|2|20050801|20050801

2144|144012|20050801|20050801

212|012|20050801|20050801

Trailer|5

Now , we need to ignore the contents of Header and Trailer Records

For Header , we are setting the property Document Offset to 1

Hence the Header record is ignored

However , we are facing problems in ignoring the Trailer record

We want to know :

1. Is there a direct way ( or some propety ) wherein we can ignore the last record of the file ,

which in this case is Trailer record

2. We also tried the following :

a. We set the Recordset Structure to : row,*,trailer,1

b. However in this case , the keyField is required for row ;

but since the number of data records is variable ,

the keyFieldValue cannot be specified

How should we go about in this case

Please guide us on this

Regards

Shikha

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Jain.

I was wonderring if you could post the actual solution you applied for this issue? I am facing the exact same issue and would really appreciate your thoughts on this issue.

Thanks in advance.

Mick.

Former Member
0 Kudos

Hi all,

Please help us on this as this is really urgent and

we are stuck on this.

Regards,

Shikha

Former Member
0 Kudos

Good day Shikha.

For my opinion there are two optional ways to deal with the issue:

first: define the footer as part of the file conversion so you'll get it in the payload , then dump this part using message mapping(just don't map the footer...)

second: create a user defined function that runs over the source structure and remove the footer data.

Good luck

Former Member
0 Kudos

Hi all

Thanks for replies

Actually , we are able to ignore header and that is not an issue

Now if we need to discard the trailer record , we believe that RecordSet Structure should be <b>row,,trailer,1</b> or <b>header,1,row,,trailer,1</b>

However , since structure is <b>row,*</b> ; we need to specify the <b>keyField</b> column for row ( data records )

Since <u>number of data records</u> is variable , we are not able to set the <b>keyFieldValue</b> for <u>row ( data record )</u>

Can you'all please guide us on this as we are stuck on this .

Regards

Shikha

Message was edited by: Shikha Jain

Former Member
0 Kudos

Hi,

please go thru the link. It will clearly tell you about the content conversio.

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

Thanks and Regards

Vishal Kumar

Former Member
0 Kudos

Hi Shikha,

I am not very common with the content conversion, but shouldn't be the Recordset Structure

header,1,body,*,trailer,1 ?

Regards,

Thomas