cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding MessageTransformBean

Former Member
0 Kudos

Hello Gurus,

I have an input file like this :

"AAAAAA"XXXXXXXXXXXXXXXXXXXXXX

COMUN21579879879GFHGFHFJF

FINUN21579879879GFHGFHFJFNJ

I want to skip the first line of input file.

In the File Adapter, we have a parameter called Document Offset, where we can achieve this.

I wanted to know the equivalent of that while using MessageTransformBean.

Thanks in advance,

Swathi

Accepted Solutions (0)

Answers (6)

Answers (6)

stefan_grube
Active Contributor

You find all parameters for the MessageTransformBean in the online help for the J2SE File adapter, as in fact it is the same module used in both cases.

http://help.sap.com/saphelp_nw04/helpdata/en/0d/00453c91f37151e10000000a11402f/frameset.htm

The parameter is:

xml.documentSkipFirstRows=<noOfRows>

Former Member
0 Kudos

Hi all,

Thanx for the reply..

But I am using Simple Plain2XML. Can I use xml.documentSkipFirstRows with Simple Plain2XML?

Because when I tried , the whole data gets skipped.Is there any option to do this.

Any help will be rewarded with points.

Thanks,

Swathi

vishnu_pallamreddy
Contributor
0 Kudos

Hi Swathi,

If the Module Parameter  xml.conversionType = SimpleXML2Plain

then insert value for pameter xml.processFieldNames = fromFile

Check this one.

Regards,

vishnu.

Former Member
0 Kudos

I have tested.

It works with the following configuration:

Plain2XML     xml.processFieldNames     fromFile

Plain2XML     xml.documentsSkipFirstRows     1

subhro_de
Active Participant
0 Kudos

You can use the same parameter with MessageTransformBean as well to achieve this.

Parameter Name - xml.documentOffset

Parameter Value - 2

Regards

Subhro

Former Member
0 Kudos

Hi All,

Were we able to find the solution for this issue.

I am facing the same?

Regards,

Sudeep

subhro_de
Active Participant
0 Kudos

Hi Sudeep,

If you are using conversion type SimpleXML2Plain and the input file has the column headers in the first row which is to be omitted as part of data the following can be done as mentioned by Vishnu above i.e.

xml.processFieldNames = fromFile

If the conversion type is StructPlain2XML you have the following parameters that can be used :

1) xml.documentOffset =  2

2) xml.documentSkipFirstRows=<noOfRows>

the other option would be to check if this can be handled in the mapping.

Regards

Subhro

Former Member
0 Kudos

Hi Swathi,

We can use exeternal java classes to modify XI payload for various adapters.

For this, the Java classes must have implemented a Transform Java interface.

To use these classes for the corresponding adapter types in the J2EE Adapter Engine as well, the module AF_Modules/MessageTransformBean is shipped with the module processor.

The MessageTransformBean module enables conversion of XML files to flat files and vice versa. You can use this module in the sender and receiver communication channels

We can use classes com.sap.aii.messaging.adapter.Conversion and com.sap.aii.messaging.adapter.XSLTConversion for conversion in sender and receiver communication channel.

Here we have to configure parametrs for module MessageTransformBean like :

Plain2XML Transform.Class com.sap.aii.messaging.adapter.Conversion

Plain2XML Transform.ContentType text/xml;charset=utf-8

Plain2XML xml.conversionTypE SimplePlain2XML

Plain2XML xml.processFieldNames fromConfiguration

Plain2XML xml.documentName Document

Plain2XML xml.structureTitle Title

Plain2XML xml.fieldNames field-name1,field-name2,field-name3

for more information visit SAP HELP: http://help.sap.com/saphelp_nw04/helpdata/en/57/0b2c4142aef623e10000000a155106/frameset.htm

For the above mentioned reauirement, you have to find similiar document offset parameter with above MessageTransformBean.

Best Regards,

Divyesh Vasani

Former Member
0 Kudos