cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with xml.addHeaderLine in Module

Former Member
0 Kudos

Hi experts,

Iu2019m trying to add a header line using the module and not in the FCC. As specified in SAP HELP. I need only to add:

xml.addHeaderLine 3

xml.headerLine u2018TESTu2019

But is not working. It generate the file but without the headerline. This is an structXML2Plain

EX

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

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

XML2Plain xml.conversionType StructXML2Plain

XML2Plain xml.addHeaderLine 3

XML2Plain xml.headerLine u2018TESTu2019

XML2Plain xml.recordsetStructure NameA,NameB,NameC

XML2Plain xml.NameA.fieldFixedLengths 3,3

XML2Plain xml.NameB.fieldFixedLengths 3,3,3

XML2Plain xml.NameC.fieldFixedLengths 5

the links of help:

http://help.sap.com/saphelp_nw04/helpdata/en/24/4cad3baabd4737bab64d0201bc0c6c/content.htm

http://help.sap.com/saphelp_nwpi71/helpdata/EN/44/686e687f2a6d12e10000000a1553f6/content.htm

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member463616
Contributor
0 Kudos

Hi,

It seems to the problem in XML2Plain xml.headerLine u2018TESTu2019.

Please write like XML2Plain xml.NameA.headerLine TEST instead of XML2Plain xml.headerLine u2018TESTu2019.

Hopefully, it will work fine.

Regards,

Rajesh

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Example: Recordset Structure: Recordset * (Root node structure )

RecordSet.addHeaderLine = 3

Recordset.headerLine = TEST

Former Member
0 Kudos

It didnu2019t work because is in module I added

xml. RecordSet.addHeaderLine = 3

xml.RecorsSet.headerLine = test

Thanks

baskar_gopalakrishnan2
Active Contributor
0 Kudos

You cannot simply specify Recordset here. Look your structure name and give that name.

I gave example as Recordset..... like Rajesh mentioned

xml.NameA.headerLine TEST

Former Member
0 Kudos

That itu2019s what I do xml.nameA.addHeaderLine TEST but it didnu2019t work. It generated the file but without the headerLine.

My apologies for not explaining better before.

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

Maybe it is not working because there is a space in your .addHeaderLine

xml. RecordSet.addHeaderLine = 3

It should be xml.RecordSet.addHeaderLine = 3

Hope this helps,

Mark

Edited by: Mark Dihiansan on Feb 7, 2011 4:31 AM

Former Member
0 Kudos

Hi,

If the error is in typing errors as Mark mentions:

I see another one in:

xml.RecorsSet.headerLine = test. There is the letter d missing in Recors (should be Records)

kr

Robert.

(also check for capitals in words, i.e. RecordSet is not equal to Recordset, etc etc)

Former Member
0 Kudos

No, that was just a typo in the example. For some reason this works great when a simple is structure but when is an structXML it doesnu2019t work the same way in Module (Not in FCC).

Any idea on how to do this? I have multiples nodes repeating the structure multiples times. If I add header in the mapping it will also repeat with the complete structure (which I doesn't want):

For example:

Header (I want a unique Header here for the complete structure, only for testing)

Name of the employee1 -> Header (1 to 1)

Info1 -> Detail ( 1 to unbounded )

Info2 -> Detail

(End of RECORD )

Name of the employee 2-> (1 to 1)

Info1 -> detail

info2 -> detail

info2 -> detail

infor3 -> detail

info4 -> detail

(End of Record)

.... it continues this way