on 09-24-2008 5:07 PM
I am working in xMII 11.5 with all the latest service packs. I know this is probably a really basic question but I am stumped.
I am trying to pass a multi row and multi column XML data set from a web page into a BLS transaction (actually, two of them) in order to populate the parameter. I want to use the Web Service interface to the transaction. I have tried using parameters on an Xacute Query in an Applet as well with an equal lack of success. I cannot persuade the transaction to see the incoming variable as an XML data type. I have tried encoding and decoding and string to xml conversions and nothing seems to successfully allow the data set to be seen withing the BLS as anything but a string. The String to XML action will not handle the number of columns in the dataset though it seems to work if the data set has only one column. The data set is formatted in the proper "Rowsets/Rowset/Row" format. I have considered writing the data to an XML file on the server (I know I can deal with that) but that is not acceptable in this application.
Can someone share the secret with me?
...Sparks
Sparks,
Have you looked at the 'InputParameter' mentioned here: http://help.sap.com/saphelp_xmii115/helpdata/en/Business_Logic_Services/illumintegrationguide.htm
Regards,
Jeremy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Jeremy.
Perhaps you can clarify that portion of the help file. I have read it and am not quite sure of the mechanism being suggested. It appears to be saying that you put your xml data in a file on the server, then pass the file name (??) as a parameter called "OrderDoc" then use something like the Load XML action to open the file from the BLS.
It seems it could also be something like the "Upload a file" functionality that I have often seen on web sites where you are uploading a local file to the server, but if so, the reference in the help file is short of enough information for me to understand exactly what it is suggesting. If that is the case, does the parameter contain the local path and location of the cache file?
Could you clarify this for me?
As I understand it (and I am hardly a SAP expert), SAP considers it bad practice to write data to an intermediate file before importing it unless it is from an external application. In this case, it is from a web interface that includes other data taken from SAP using xMII so we considered it a "native" application and subject to that constraint. If it were merely writing the data to a file and importing it, I would have no problems, but this perceived limitation of not using an intermediate data file has presented some unique challenges.
Does version 12 have the same limitations on passing in xml properties to BLS transactions?
FYI - SP05 is out there for both 11.5 and 12.0.
To clarify your confusion on the help doc link I sent you, you should be able to use an http post to Runner and the posted payload xml document will be mapped to the Transaction property that you've named as the InputParameter (you are telling it where to go and differentiate from other potential input properties to the TRX that you've handled in the Name=Value URL).
Regards,
Jeremy
I have never tried to do that with xml, but I have done this sort of thing using String List to Xml Parser (not String to XML) with no issues. Just use different deliminators for the columns vs. the rows. first pass should get you a list of your rows, repeat on that and get your columns. Usually i address the column values by index.
Regards,
Christian
Edited by: Christian Libich on Sep 24, 2008 6:14 PM
Edited by: Christian Libich on Sep 24, 2008 6:14 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It appears that the string list to xml action has the same problem as the string to xml action. That is, it wants to create a single column data set. As code intensive as it would be, it would seem to be just as easy to parse a csv as try an work with these somewhat limited xml functions.
While it is probably a personal problem, I don't understand how else you can transfer the data needed to complete a bapi call in a SAP jco function that requires extensive data that originates on a web page. There must be a better way.
It is very strange that the xml is the internal data structure of the BLS, yet you can't pass one into a BLS unless it comes through a query, file, or another BLS.
I am going to hope someone can give the specific direction, but I know clients who have used SOAPRunner to pass xml successfully. If no one can give specifics, post again and I will try to dig up the documents.
Found a decent link and there are more, but you definitely need to go back further than 90 days (even last year).
Good luck,
Mike
Edited by: Michael Appleby on Sep 25, 2008 2:47 PM
Parameter value:
r1d1,r1d2,r1d3;r2d1,r2d2,r2d3;r3d1,r3d2,r3d2
Pass thru String List to Xml Parser with delim ";"
<Row>
<Item>r1d1,r1d2,r1d3</Item>
</Row>
<Row>
<Item>r2d1,r2d2,r2d3</Item>
</Row>
<Row>
<Item>r3d1,r3d2,r3d2</Item>
</Row>
Repeat on each row/item and pass thru String List to Xml Parser with delim ","
<Row>
<Item>r1d1</Item>
</Row>
<Row>
<Item>r1d2</Item>
</Row>
<Row>
<Item>r1d3</Item>
</Row>
Of course, your columns aren't flat but they are easy to ref, to get "column 2" for example:
StringListToXml_1.Output{/Rowsets/Rowset/Row[2]/Item}
So now you have rows and columns. Assign your data to your BAPI structured as needed.
We have passed complex XML via the SOAP interface in 11.5, but it involved some "hacks". Basically we passed the sterilized XML via a String Type Parameter, and then unserialized it inside the BLT.
I have been told on this board that there is a solution to passing XML data vie the SOAP interface using ref docs, but i have never personally seen a working example.
Sparks,
Take a sample copy of your xml and save it to an xml document.
Create a transaction and add a Reference_Document_Loader action block.
Link the action block to the file you saved with your xml.
Create an Transaction property named InputXML.
Click on the menu item Reference and select Assign Reference Documents.
Select Transaction.InputXML and then click on the elipsis button for "Link to Other Object/Property"
Select RefDocLoader_0.XmlContent and hit OK.
Then (and don't forget this step) click on the Assign Reference Document.
Then hit OK.
Go back into the Assign Reference Documents screen and expand both the Transaction and RefDocLoader_0.
If you have done it correctly, InputXML should be green and XmlContent should be blue.
The expert who gave these instructions to me referred to this as a WSDL Hack. It worked for me back in late 06, but I haven't used it since. I used SOAPui (freeware) to test it.
Good luck,
Mike
User | Count |
---|---|
10 | |
6 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.