cancel
Showing results for 
Search instead for 
Did you mean: 

XML output as a string

Former Member
0 Kudos

Hello

I am having a XSLT where I am transforming multilevel source XML to a single level target XML. XSLT works fine from XSLTTester utility from SAP.

The same XSLT I reused in XI and its working fine over there too.But the problem is the output XML what it generates is to be passed as a string to target application class.The target application takes entire XML structure as a string.

Can anyone knows how this can be done from XI? In ABAP CALL TRANSFORMATION function takes XML string and returns transformed XML string.

Thanks in advance.

Regards

Rajeev

Accepted Solutions (0)

Answers (1)

Answers (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi Rajeev,

>>>XSLT works fine from XSLTTester utility from SAP.

can you tell me who can I see this utility?

Regards,

michal

Former Member
0 Kudos

Michal,

I guess you want where you can see that. Go to se80.On Workbench->Edit Object->Transformation.

Here you can create XSLT and test the same using sample XML files. These transformations can be then called by

CALL TRANSFORMATION function from ABAP.

Regards

Rajeev

MichalKrawczyk
Active Contributor
0 Kudos

thx:)

Regards,

michal

Former Member
0 Kudos

You can use SXSLT transaction. There's also a demo transaction SXSLTDEMO1. I havent used these but know them.

Regards

SKM

Former Member
0 Kudos

Hi Rajeev,

can you provide some more information abt the scenario, like sender, reciver systems/ formats, process involved etc.

Regards

Vishnu

Former Member
0 Kudos

Hello

My sender is an XML file which users can upload from a web-page i.e. HTTPSender to XI. This file gets transformed to target XML file using XSLT. My receiver system is SAP R/3 where there is a custom built application which already has got XML interface.This interface is a ABAP-class which has a method to parse the XML.

This method accepts XML as a string and then creates necessary objects.What I am doing currently is building an RFC in which I am instantiating this class and trying to use the same method to create its object.

So I want to convert the target XML as one string then my RFC would have only one importing parameter which is string which I could pass to the custom method.

Do let me know if u have idea about this.

Thanks in advance.

Regards

Rajeev

Former Member
0 Kudos

Hi Rajeev,

you can try this, let me know if it is a success.

Have two mappings in sequence

1) Sender format[A] --> XSLT mapping 1 --> Target format

2) Target format --> XSLT mapping 2 --> BAPI Structure (field) B

The output of your first mapping is passed to your second mapping. In your XSLT mapping 2, try to map the Root node to the Bapi field. (I hope the whole msg goes inside this field :-):-):-), I havenot tried this myself before )

A & B -> will be used in the Interfaces.

B is for the RFC adapter, which invokes your BAPI.

Hope this helps

Regards

Vishnu

Former Member
0 Kudos

Hello

I developed a inbound interface with one string as output format and used XSLT map as first mapping program and custom Java class as a second map. I guess in Java class which implements StreamTransformation interface has got method execute which takes inputstream as input XML.

I hope that should work but while I am importing java in imported archives its presently giving ClassFormatError.

Anyways thanks for the help.

Regards

Rajeev