cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove heading from File Content Conversion

Former Member
0 Kudos

Hi All,

Can somebody please me how to remove the heading in the File Content Conversion.

I have a requirement in which I need to pick up the values/data from the txt file and transfer it to JDBC

File Contains the heading and values both so, I am wondering how do I remove the heading or pick up the value/data from the second line.

Sample File

Client    Date    Time    AppCode    User  Action

006       20121212  162545   SAP      abcd     VH

006       20121215  162546   SAP      xyz1     CH

006       20121217  162549   SAP      a1234     MN

fieldSeparator is space not ","

I have created the following structure

Data

   Records

     Row

        Client

         Date

and in comms channel I have done the following

Row.fieldNames: Client,Date,Time,AppCode

Row.fieldSeparator: 20

Row.endSeparator: 'nl'

Row.processConfiguration= FromConfiguration  (I don't know the exact purpose of this, What I found from other site is,means that no header information exists in the file to be converted, but it will be delivered by the present configuration)

Can somebody please help me.

Thanks,

Iqbal

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

use 'DocumentOffset' and give value as '1'

Former Member
0 Kudos

it is in file content conversion parameters

Former Member
0 Kudos

Hi Raveendra Babu,

How to use 'DocumentOffset' and give value as '1' in File Content Parameter.

Can you please explain.

Thanks,

former_member184681
Active Contributor
0 Kudos

Hi,

Quoted from SAP Help: Under Document Offset, specify the number of lines that are to be ignored at the beginning of the document. This enables you to skip comment lines or column names during processing. If you do not make an entry, the default value is zero lines.

So when you type Document Offset = 1, the first line of your input file will be ignored by the file adapter during FCC processing. Which is exactly what you require.

Hope this helps,
Greg

baskar_gopalakrishnan2
Active Contributor
0 Kudos

set in the file communication channel. Under content conversion tab. You will already see the field name.

Former Member
0 Kudos

Hi,

Former Member
0 Kudos

Thanks Raveendra for solving the issue.

Can anybody tell me the purpose of this

Row.processConfiguration= FromConfiguration

former_member184681
Active Contributor
0 Kudos

I believe this comes from an older version of PI, as it doesn't appear in newer versions of SAP documentation for FCC. See more details here: http://help.sap.com/saphelp_nw04/helpdata/en/0d/00453c91f37151e10000000a11402f/content.htm. By the way, I guess you have a typo there - it's processFieldNames, not processConfiguration.

Hope this helps,
Greg

Answers (2)

Answers (2)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>ignoreRecordsetName = true 

Agree. Not in this case.

former_member184681
Active Contributor
0 Kudos

Hi,

I believe the best solution here is to define FCC parameters for the header line, as some sort of Header structure (even as a single field), and then just ignore this part of the source XML message in the mapping. There are some options for processing a header line with receiver FCC, but not with sender, as far as I know.

Personally, I would also first try with Row.beginSeparator = 'whole header line content here' - this might possibly work, but I am not really sure if it will not cause errors with further lines, where the header does not occur. Just give it a try to confirm.

EDIT: Well, the solution by Raveendra Babu sounds best, I completely forgotten about that option

Hope this helps,
Greg

Message was edited by: Grzegorz Glowacki