cancel
Showing results for 
Search instead for 
Did you mean: 

sftp content conversion issue

Former Member
0 Kudos

Hello SCN friends,

by working on sftp content conversion i need some help by XML2Plain conversion.

needed Output structure is

UserId,lastModified,cerName,institution,datetaken,description
20005934,01.01.2015,Company,Test,01.01.2015,description

Accepted Solutions (1)

Accepted Solutions (1)

sahithi_moparthi
Contributor
0 Kudos

Hi Peter,

Please refer below thread.

http://scn.sap.com/thread/3434421

Please let us know what exactly your problem is ?

Former Member
0 Kudos

I can produce following message

20005934,01.01.2015,Company,Test,01.01.2015,description

bu i need the name of the datatypes as header like below

UserId,lastModified,cerName,institution,datetaken,description

20005934,01.01.2015,Company,Test,01.01.2015,description

20005935,01.03.2015,Company,Test,01.03.2015,description

20005936,01.04.2015,Company,Test,01.04.2015,description

Former Member
0 Kudos

Hi Peter,

you have to set the paramter addHeaderLine Parameter accordingly:

  • Set addHeaderLine to fromConfiguration, and enter into headerLine the values you want to have as header line

or

  • Set addHeaderLine to fromXML. I'm not sure, either the header information is generated automatically from the element names (which you would only want to do if they fit your desired output names), or you have to put the actual line header names as values into the payload. Best to try it out.

From SAP Doku

addHeaderLine

Only define this parameter if you have already defined singleRecordType.

Define whether a header line is to be added to the result of the conversion.

○  none (default)

Does not insert a header line

○  fromXML

The header line is generated from the element name of the first recordset of the XML document

○  fromConfiguration

The header line is determined by the configuration parameter headerLine.


headerLine

Only define this parameter if you have already set addHeaderLine=fromConfiguration.

The value that you define is placed in front of the result of the conversion as a header line.

Former Member
0 Kudos

same result!  Header types not created.

Former Member
0 Kudos

If you choose fromConfiguration, you also have to add a Parameter line with "xml.headerLine" as Parameter Name, and enter "UserId,lastModified,cerName,institution,datetaken,description" as Parameter value.

If that doesn't work, try to use xml.addHeaderLine with fromXML

Former Member
0 Kudos

no luck! tried both of them.

Former Member
0 Kudos

Can you please try this configuration

xml.addHeaderLine = 3

xml.headerLine = UserId,lastModified,cerName,institution,datetaken,description

○  NameA.addHeaderLine

Specify whether the text file will have a header line with column names. The following values are permitted:

■  0 – No header line

■  1 – Header line with column names from the XML document

■  2 – As for 1, followed by a blank line

■  3 – Header line is stored as NameA.headerLine in the configuration and is applied

■  4 – As for 3, followed by a blank line





Former Member
0 Kudos

i tried this also without success.

Former Member
0 Kudos

Please verify that you have no leading or trailing spaces in in the parameter name (e.g. "xml.addHeaderLine    ")

Also check that your changes updated the cache (Integration Builder / Environment / Cache Status Overview) - you must not see any errors here.

It would also be great if you could post a screenshot of your latest Module Configuration.

Former Member
0 Kudos

My latest configuration

Former Member
0 Kudos

You are mixing conversion to a positional format (xml.fieldFixedLenghts) and conversion to a format with separator (xml.row.fieldseparator). Maybe this is confusing the system.

This is a working configuration, can you try setting up your scenario like this?

This scenario uses SimpleXML2Plain, which from what I see should be sufficient for you. If not, just use this a template and keep using StructXML2Plain.

Please also be sure to verify everything I said in my previous post (space and cache).

iaki_vila
Active Contributor
0 Kudos

Hi Peter,

Although you are not using StrictXml2PlainBean you can try with

xml.addHeaderLine = fromConfiguration

Regards.

JaySchwendemann
Active Contributor
0 Kudos

Try xml.addHeaderLine = 3 and xml.row.headerLine = <Yourheaderline>

Cheers

Jens

engswee
Active Contributor
0 Kudos

And the key to solving this addHeaderLine mystery is below

FCC parameter reference for MessageTransformBean module

That parameter is not available for StructXML2Plain conversion!

Since you just have 1 record type (just "row"), you should be using SimpleXML2Plain. This allows you to use addHeaderLine = 1.

If you need an example for SimpleXML2Plain, you can refer to the wiki entry at the end of the link above.

Rgds

Eng Swee

iaki_vila
Active Contributor
0 Kudos

Hi Eng,

Only i little curiosity, Have you used your own  blog to get the parameters?.

Regards.

engswee
Active Contributor
0 Kudos

As a matter of fact, yes! But I actually used the technique on a PI 7.11 system for my blog. Only got around to document the technique on PO 7.4 for the blog If I'm not mistaken, the source code has not changed since 7.11 so I think the list is still valid.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Peter,

and what exactly is your problem? Are you getting an error message?