cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with iGrid when loading page and calling updateGrid method

former_member810489
Discoverer
0 Kudos

Hi,

I have an issue with the iGrid applet. I have an iGrid with set with a Query Template that inserts a new line on a database table everytime it's called. The Query Template is just a wrapper that invokes a Transaction that really does the job.

The first issue: I've set the applet's InitialUpdate paramater to "false". The iGrid is NOT updated when the page loads, but the Query Template gets executed twice!

The second issue: when I call the method "updateGrid(true)" after setting the parameters values, again the query template gets executed twice. I have already debugged the code and I'm sure that updateGrid isn't called twice, but when I execute that line of code the table gets two lines inserted into it.

I have already tested the Transaction itself, and I also have tested the QueryTemplate using the Test button inside the Query Template Editor as well as using just the URL... the Query Template / Transaction only gets executed twice when it's called from the applet.

The server is running SAP xMII 11.5.

I'm using two different machines for these tests:

1. Windows XP, Internet Explorer 8 in Compatibility View, Java 1.6.0_07b6  and

2. Windows XP, Internet Explorer 8 in Compatibility View, Java 1.4.2_07

Thanks in advance for your time.

Sincerly,

Alisson Prestes, aka javalisson

Accepted Solutions (1)

Accepted Solutions (1)

former_member185280
Active Contributor
0 Kudos

I could be wrong but I remember something about some applets calling the underlying query twice for formatting reasons. I don't think its recommended to use igrids for performing inserts/updates etc. Try using an icommand to perform your insert.

jcgood25
Active Contributor
0 Kudos

Yes, the iGrid doesn't know what columns it will display so it runs the query to find out column data types, column names, etc.  Mapping in an artificial column name into the display template might prevent this, but using an iCommand like Christian recommends is the right thing for 'command' mode query templates.

Answers (1)

Answers (1)

former_member810489
Discoverer
0 Kudos

Thanks Christian and Jeremy, it's working correctly now. I changed the the iGrid for an iCommand and now I build the grid with HTML & JavaScript.