cancel
Showing results for 
Search instead for 
Did you mean: 

Datagrid to CSV: Problem generating page

Former Member
0 Kudos

Hi,

I am passing a few parameters to a grid query using web page. Once the parameters are entered, and a command button is clicked the results appear in the igrid. I am trying to export it to csv but get a "Problem generating page" appears. I do have "Save data to CSV" enabled. I tried using saveAsCSVFile(). I am able to export to csv before clicking the query button. I am thinking if the problem is in my applet or function.

<APPLET NAME=appGrid CODE="iGrid" CODEBASE="/XMII/Classes/" ARCHIVE="illum8.zip"

width="940" HEIGHT="400" MAYSCRIPT>

<PARAM NAME="QUERYTEMPLATE" VALUE="Default/Query">

<PARAM NAME="DisplayTemplate" VALUE="Default/DIsplay">

<PARAM NAME="SelectionEvent" VALUE="UpdateDetails">

</APPLET>

function doQuery() {

var A = document.ASelection.getBrowserObject();

var B = document.BSelection.getBrowserObject();

var C = A.getSelectedItem();

var D = B.getSelectedItem();

var GridQuery= document.appGrid.getQueryObject();

GridQuery.setParam(1, C);

GridQuery.setParam(2, D);

document.appGrid.updateGrid(true);

}

Any suggestion will be appreciated.

Thanks,

FF

Accepted Solutions (1)

Accepted Solutions (1)

jcgood25
Active Contributor
0 Kudos

Have you looked in the NW logs for a relevant error? The right-click and/or applet method for generating CSV actually creates the server side rendering of the data and then shows it to you - this is obviously failing and the Problem Generating Page is the end result on the client side.

Can you get XML (hold the Ctrl key down when selecting right-click data details)?

What is the source of your query - perhaps you have some non-unicode or bogus characters coming from Oracle or something like that.

Regards,

Jeremy

Former Member
0 Kudos

Hi Jeremy,

I am able to view the XML just fine .The data is from Oracle and i am able to save it to CSV when i test the grid by passing parameters.

I don't know how to look at the NW log. Any help?

Thanks,

FF

jcgood25
Active Contributor
0 Kudos

What happens when you test your Query Template in the WorkBench and put the same values in as the default Param.1 and Param.2 values?

Considering that my guess about Oracle was right we have seen this before when strange characters get into the oracle table.

You can also narrow this down by temporarily eliminating suspect columns and reducing the rowcount of the query.

The migration guide gives some pointers on the NW log side in Appendix D, look for it in: https://www.sdn.sap.com/irj/scn/articles-manufacturing-all

Regards,

Jeremy

Former Member
0 Kudos

Hi Jeremy,

It works fine when i test the query in the workbench. The data grid is able to save as csv in the workbench as well. I reduced the row count as well as dropped a lot of columns. However, it still gave the same error.

Thanks,

FF

jcgood25
Active Contributor
0 Kudos

So if I understand you correctly when testing in browser output with text/csv you get Excel to open and a URL something like this:

/XMII/OutputStorageServlet/View/1766598814.csv?TargetContentType=text/csv

But when you request CSV from an iGrid you get a similar URL but the error is Problem Generating Output?

Sounds to me like you need to look in the java console and especially in the NetWeaver logs.

Former Member
0 Kudos

Try rewriting your query to remove nulls.

Answers (0)