cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the list of columns of a transaction output

Former Member
0 Kudos
200

Hi All,

My requirement is like this:

I want the list of columns of a transaction.In a drop down, I am displaying all the transactions.I will select any transaction and want to populate the list of columns of that selected transaction in another drop down.

Please suggest me how to achieve this.

Thanks in advance.

Regards

Manisha

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member4529
Active Contributor
0 Kudos

Hi Manisha,

I am not sure what do you mean by columns of a transaction. If you mean the input and output parameters of the BLS transaction you can execute the Catalog service in the following mode and get the details:

http://<server>:<port>/XMII/Catalog?mode=load&objectname=<objnameWithPath>;

Thanks,

Dipankar

Former Member
0 Kudos

Hi Dipankar,

Thank you for your response.

When we execute the transaction by using Xacute query,it is returning rows with columns.I want to display those columns in a dropdown.But in Javascript, I will pass only transaction name.So how I can accompolish this?

Thanks in advance.

Regards

Manisha

former_member4529
Active Contributor
0 Kudos

Hi Manisha,

The columns in that case are output parameters of the BLS transaction which can be either the non-XML parameters or the single XML parameter with one or more columns. So you can use the Catalog service I mentioned in the previous post to check those. The transaction parameters are present under the <Context> element and for the output parameters <ReadOnly> element value will be true.

If the BLS is anyway getting executed on selection then you can simply use JavaScript to check the name of the output parameters.

Thanks,

Dipankar

Former Member
0 Kudos

Thanks Dipankar.

I tried the below url in internet explorer.

http://<server>/XMII/Catalog?mode=load&objectname=<Transaction path>.

It is returning all the column and rows.But if i try this in xml query,it is saying that "load content is empty".

Thanks,

Manisha

former_member4529
Active Contributor
0 Kudos

Hi Manisha,

Better use a HTTP Post action in BLS with the URL :

server://XMII/Catalog?mode=load&objectname=<BLSPath>&Content-Type=text/xml

In the ReturnAsXML output property of the HTTP Post action you can get the response document which you can parse by Repeater.

Thanks,

Dipankar

Former Member
0 Kudos

Hi Dipankar,

Thank you. I tried by using HTTP post action block as you sugested.In the HTTP post action block, I am calling the below URL:

http://server//XMII/Catalog?mode=load&objectname=<BLS Path>&Content-type=text/xml

But In the ReturnAsXML output property of the HTTP Post action block,it is returning what is happening in the transaction which I am calling in the url.

It is not returning the output of the transaction.

Thanks,

Manisha

former_member4529
Active Contributor
0 Kudos

Hi Manisha,

You should not use http:// in the URL as sever:// will be dynamically replaced by http://server:port

Use exactly the URL

server://XMII/Catalog?mode=load&objectname=<BLS Path>&Content-type=text/xml

in the HTTP Post action and check the ReturnAsXML property in its output.

Thanks,

Dipankar

Former Member
0 Kudos

Hi Dipankar,

If I use the below URL in HTTP post , it is throwing the error message:

server://XMII/Catalog?mode=load&objectname=<BLS Path>&Content-type=text/xml

error messgae:

[ERROR]: Post error: java.lang.IllegalStateException: unsupported protocol: servername

Thanks,

Manisha

former_member4529
Active Contributor
0 Kudos

HI Manisha,

Are you using this URL exactly (not replacing server with actual hostname) ?

server://XMII/Catalog?mode=load&Content-Type=text/xml&objectname=<BLSName>

It works for me fine in MII 12.1 and I remember it works in 12.0 as well. Which version of MII you are using?

Thanks,

Dipankar

Former Member
0 Kudos

Hi Dipankar,

Now I tried exactly with same URL.Only BLSName I have provided.

server://XMII/Catalog?mode=load&Content-Type=text/xml&objectname=<BLSName>

Still it is throwing error message:

[ERROR]: Post error: java.lang.IllegalStateException: unsupported protocol: 'server'

I am using 12.0.

Thanks,

Manisha

former_member4529
Active Contributor
0 Kudos

HI Manisha,

If you are specifying the URL in object configuration of the HTTP Post action block I hope you are not surrounding that with double quotes. Otherwise I can't see why this will throw the error. You should use quotes only when specifying the URL in the link configuration. I tested the same in 12.0 as well and it worked fine, only thing I noticed is in 12.0 I need to pass the authentication as well whereas in 12.1 it was using the system user or current authentication when I use server://.

Thanks,

Dipankar

Former Member
0 Kudos

Hi Dipankar,

I have tried by specifying the URL in object configuration of the HTTP Post action block and it is not surrounding with double quotes.

When I am using Link,then it is not surrounding with double quotes.

Also I have passed the authentication.I will try in 12.1 and let you know.

Thanks,

Manisha

former_member4529
Active Contributor
0 Kudos

Hi Manisha,

You must have to use double quotes when you specify the url in the link configuration as string.

Thanks,

Dipankar

Former Member
0 Kudos

Hi,

Maybe you could just do something simple in the transaction - build a second SAP MII Output Document (Illuminator Document) that has only the column names. Add a transaction output parameter for this document. If you are outputting more than one document from the transaction, you can add a parameter to the iBrowser applet definition to tell it which output parameter to use in building the iBrowser, similar to the example below:

<PARAM NAME="OutputParameter" VALUE="colNameXML">

Kind Regards,

Diana Hoppe

Former Member
0 Kudos

Hi Dipankar,

Yes I am using double quotes when I am giving the URL in link.Still it is throwing same error message.

Hi Diana,

Please elaborate little more.I will pass the transaction name dynamically.How I will implement your solution?

Thanks,

Manisha

Former Member
0 Kudos

Hi Manisha,

Are you building SAP MII Output Documents in each transaction?

Kind Regards,

Diana

Former Member
0 Kudos

Hi Diana,

Yes I am building SAP MII Output Documents in each transaction.

Regards

Manisha

Former Member
0 Kudos

Hi Manisha,

I would add a second SAP MII Output Document action, configured with a column to hold the column name, followed by a Repeater action. Configure the Repeater to repeat on the first document's columns:

FirstDoc.Output{/Rowsets/Rowset/Columns/Column}

Add a Row action and assign the first document's column names:

Repeater_0.Item{/Column/@Name}

Assign the output of the new document to an XML output property, which can then be captured in an Xacute Query.

Kind Regards,

Diana