cancel
Showing results for 
Search instead for 
Did you mean: 

iCommand: How to display result efficiently

Former Member
0 Kudos

Hi everyone

I put an iCommand applet on a .HTML page. That page has an input field where users can specify WERKS parameter. When pushing a button, a Xacute query is called that will return WERKS related data.

So far, I am using JavaScript to create a table displaying Query output returned by iCommand.

But I am wondering if this is really efficient. I think one for sure can put sth. like an iGrid Applet on the page and link it to the iCommand. So everytime iCommand executes my query, the iGrid gets updated.

I created an iGrid in my catalogue and placed it as applet on my page. I then played around with the DisplayTemplate parameter of my iCommand and some other approaches but I did not succeed in connecting both applets...

Can anybody give me a hint on how to proceed or let me kow whether it at all is a good idea to display output that way?

Thanks for any help!

Marco

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Marco,

If I understood your requirement correctly here is what you can try:

1) Create a Grid Applet instead of a table.

2) Make the Xacute query as the underlying query.

3) When the user pushes the button, call updateGrid(true) java script method. This should refresh your Grid and run the underlying query together.

Regards,

Anushree

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi, thank you very much for your answers!

....It's that simple...My thoughts were way too complicated.

For my current proeblem, the solution proposed by Anushree and Swaroop worked out fine.

However, I think I will follow up on Adarsh's suggestion, because I don't feel comfortable with those applets.

swaroop_anasane
Active Contributor
0 Kudos

Hi Marco,

You  need not use an iCommand applet here. Call the transaction/query from iGrid applet and as Anushree mentioned use a document.AppletName.UpdateGrid(true) on hit of the button to refresh the data.

Hope it helps.

Warm Regards,

Swaroop

sidnooradarsh
Contributor
0 Kudos

Hello Marco,

Yes definitely there are many ways you can implement it and I am pretty sure others will point you to more cool ideas...

Assuming I understand your requirement correctly, personally I would try something like below,

1) I would basically avoid applets on html and instead make use of AJAX calls.

2) Instead of Input Box to enter Plant (werks) I would build a plain HTML Plant List box which is populated with list of available plants by making an AJAX call to Query Template which returns me Plant List.

3) I will place a Grid to display Selected Plant related details, now choosing the Grid you have many choices for instance, you can use an applet grid, or a 3rd party jQuery Grid plugin, i5Grid (if you are on MII 14 or higher) or a SAPUI5 grid.

My personal choice would be anything except an applet grid.

4) So upon selecting the Plant from List box I will make another AJAX call to Query template which gives me required Grid data and then I would populate Grid with data.

As I mentioned above, this one such sample idea there could be many different cool ideas.

Hope this helps!

Regards,

Adarsh