cancel
Showing results for 
Search instead for 
Did you mean: 

Handle Table returning from a BC call Action

Former Member
0 Kudos

Hello everybody,

How can i handle a Table returning from a BC call Action.

Which Actions from Logic Editor should i need to map the rows withing the Table to my output document?

Thanks

20 Marks for Good answer.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Emile,

1.In SAP BC connection, the output presents in Response.

2.From XMII XML output, take Document. Right click and select configure.

3.Define the columns required in the output document.

4.From XMII XML output selet Row and configure the document.

5.Go to the Link editor, and map the correspoding columns from Reesponse xml.

6.Suppose the response xml returns multiple results, Use the repeater in between the document and Row.

I hope this helps you......

Regards,

Kishore kumar P.S.

Former Member
0 Kudos

Thanks

But the steps 4 and 5 are not so clear.More explication if possible.

How can i view the structure of the Response xml file?

E.T

Former Member
0 Kudos

Emile,

Look at the available templates on the https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/90537bfe-fd6b-2910-fda3-b04f1... [original link is broken] [original link is broken]. Now these were developed with the JCO block (not the BC) block, but you should be able to get a good feel of how to handle the response xml files.

Former Member
0 Kudos

Please can u tell me how to access a collumns withing a table returning from BC.

I use this expression but without success.

Call_RFC.Response{/rfc:function.Response/collum_name}

E.T

Former Member
0 Kudos

Hi Emilie,

First check your BC session is running properly. Add one xml saver below the BC interface.run the transaction and Open the xml.

Now paste these file in the Reference document folder.(path: C:\Lighthammer\Xacute\ReferenceDocuments)

Then using assign reference document(in menu bar) assign the same structure to the response xml.

By this you will get the structure of xml.

Regards,

Kishore kumar

Former Member
0 Kudos

Hello Kumar,

your answer was very helpful.

After saving the Response from the BC i was able to view the xml file who look like this:

<?xml version="1.0" encoding="UTF-8" ?>

- <rfc:Z_XMII_READ.Response xmlns:rfc="urn:sap-com:document:sap:rfc:functions">

- <TAB>

- <item>

<col_1>value_4</col_1>

<col_2>value_5</col_2>

<col_3>value_6</col_3>

-</item>

- <item>

<col_1>value_1</col_1>

<col_2>value_2</col_2>

<col_3>value_3</col_3>

-</item>

-</TAB>

</rfc:Z_XMII_READ.Response>

The xml file content 10 items

I try to access the items using a repeater Action and this is the xpath expression i used: {/rfc:Z_XMII_READ.Response/TAB/item}.I can view 10 rows in the output Doc but only the first row is repeated 10 time.So which expression can i use?

Thanks

E.T

Former Member
0 Kudos

Hi,

sapBCinterface.{/rfc:Z_XMII_READ.Response/TAB/item}.

Configure repeater with this.

In illumRow action configure the illum doc.

Link with values from repeater

for example:

IlluminatorRow_0 <Value1> Repeater_0.Output{/item/col_1}

I have tried with the file structure given above.

Its working fine for me.

I hope it solves your problem.

Regards,

Kishore

Former Member
0 Kudos

Hi Kishore

its works

I give you 10 marks

thanks an see you later for other questions

Emile.T

Former Member
0 Kudos

Hi Kumar,

please i need ur help.

I have a iGrid associate with a Xacute Query

The Xacute Query works properly when i test it in the query editor after setting params manuely.

When the applet load for the first time the Xacute is execute using default params and i can wiew the result.But when i set the params(using the javascript),the applet

did not refresh ,mining i can´t view the new infos

Javascript code:

document.AppletName.getQueryObject().setParam(1,name1.value);

document.AplletName.getQueryObject().setParam(2,name2.value);

document.AppletName.refresh();

Former Member
0 Kudos

Hi Emile,

I have some questions.

1. The grid get data xacute query...

2. When the javascript function is called?

Possible Cases:

Two igrids are there. Passing a value from one to another.

var x = document.iGrid1.getGridObject().getSelectedCellRow();

var No= document.iGrid1.getGridObject().getCellValue(x,1);

document.iGrid.getQueryObject().setParam(1,No);

document.iGrid.refresh();

always first column value is selected based upon the selected row.

To try with this, in display template check allowCell selection check box

Regards,

Kishore

Message was edited by:

kishore

Former Member
0 Kudos

Hi Kumar

this is the html code

<input type="text" name="name2" value1=" ">

<input type="text" name="name2" value2=" ">

<input type="button" value=" Update" onclick="Update_Grid()">

the JS function is called when the user entrer value1 and value2 and the press Update

Former Member
0 Kudos

Hi

i have this html code

<input type="text" name="name1" value1="">

<input type="text" name="name2" value1="">

<input type="button" value="Update" onclick="update_grid()">

so the user press the Update button to call the JS function update_grid().

update_grid(){

document.appletname.getQueryObject.setParam(1,value1)

document.appletname.getQueryObject.setParam(2,value2)

document.appletname.refresh()

}

Note: the queryobject is a Xacute ,so calling a transaction and the transaction accept 2 params.As i said the Xacute query works good when i test it with query editor

Former Member
0 Kudos

Emile,

You should probably have started a new thread with this new question.

Anyway, document.appletname.getQueryObject.setParam(1, value1) -- JavaScript probably doesn't "know" what "value1" is. You should use the DOM reference to the input field like document.myForm.value1.value. The same for Param2.

Former Member
0 Kudos

Hi emile ,

I thought that the values are passed from another applet.

<b>To pass the value from html form:-</b>

var x = document.<formname>.<inputfieldname>.value;

alert(x);

document.iGrid.getQueryObject().setParam(1,x);

document.iGrid.refresh();

use this type of code.

I hope it solves your problem

Regards,

Kishore

Former Member
0 Kudos

Sorry but i used a form and with alert(value) i can view the value bevor setting the params.Maybe i forgot to set some params configuring my displayTemplate but i don´t know

Former Member
0 Kudos

Sorry but i used the form check the the values with alert() bevor setting the params

so the problem anywhere

thanks

Answers (0)