cancel
Showing results for 
Search instead for 
Did you mean: 

XML Datatype as transaction output property

Former Member
0 Kudos

Hello everyone,

I'm having some problems while using the XML datatype as an output for a transaction and would like your input on this.

I've created a transaction that has one output property set as a XML. This transaction reads information from a SAP BAPI call and I assigns the response XML to the output parameter. I've checked the output value with a trace block and it is ok.

This transaction is called from within another transaction, but when I read the output parameter after the transaction block is executed, the output parameter is empty...

The only work-around this problem that I have found it to encode the XML as a string and then decode it in the outer transaction, but that just doesn't seem like the right thing to do... There must be a reason to have a XML datatype!

Thanks in advance,

Marcelo

Accepted Solutions (0)

Answers (1)

Answers (1)

agentry_src
Active Contributor
0 Kudos

Hi Marcelo,

What version of MII are you working on? There was a release of 12.1 some time ago that had the behavior similar to what you describe, but I don't remember which (12.1.5?). Check the release notes. It should have been documented.

Regards,

Mike

Former Member
0 Kudos

Hi Michael,

thanks for the quick reply.

I'm on SAP MII 12.1.8 (Build 20), but still have this problem...

jcgood25
Active Contributor
0 Kudos

Have you looked at the module library templates on SDN - they do this for both the Request and Response XML from the underlying BAPI.

Did you assign a reference document to the output xml property - mapping your transaction output to look like another object (the BAPI response). This assignment should expose the xml structure to a calling transaction action block.

Former Member
0 Kudos

I solved this problem by using a string parameter instead of an XML one.

I passed the parameter with xmlencode(myXML) and, at the other side, I did an xmldecode(myString) assigning it to a local XML variable.

Former Member
0 Kudos

That can be done as a work around, but I can't believe that this has to be done.

If there is a XML datatype it should be available for use...

I'm making some tests locally to understand how to make this work.

Former Member
0 Kudos

Marcelo,

I too tried this on 12.1.8 build 20 and this seems to be working for me.

Here's what I did, I am calling BAPI_ALM_ORDER_DETAIL in the "called" transaction. This has an output property called "outXML" of type XML.

I assign the response of the BAPI to outXML after the BAPI is executed.

I tried a tracer here and all's well.

In the "calling" transaction I have a tracer after the Transaction call where am able to see the respose from the called transaction.

Thanks

Udayan

Former Member
0 Kudos

Hi Udayan,

Sorry for the long delay, but I missed your reply.

To call the transaction from within MII it works fine.

But the main reason to call the transaction as a web service is to be able to call it from a third party system. When doing that, the web service doesn't respond with the data. You can try using SoapUI, VisualStudio, Eclipse or any other solution to make a web service call and test it.

Former Member
0 Kudos

Hi Jeremy,

you also talked about a "calling transaction", but the problem only happens when the request side of the web service is not a MII transaction, but a third party application. I believe that this is the main purpose of using the MII as web services, since doing a transaction call from within MII can be done directly and it doesn't have to go through a SOAP request.

Thanks!

Former Member
0 Kudos

Hi,

In order to access XML output of your MII trasnaction from outside MII, you need to make your output XML as "Reference Document"

so that the xml can be read/used in non-MII environment.

I tried the same with Visual Studio ( called MII transaction as a webs ervice from C# code), and it worked fine with me

Regards,

Shalaka

Former Member
0 Kudos

Hi Shalakap,

Would you be able to send me the export file for the transaction that you've used as a web service?

I just want to look at a sample to understand what needs to be done in order to get this working properly.

If possible, also the WSDL that you get from the MII WSDLGen.

Thanks for the help,

Marcelo

Former Member
0 Kudos

Hi,

I am looking for similar kind of Information, can you send me any help documents if you have any to achieve this.

Thanks,

Raveen