on 06-05-2006 1:37 PM
Hi All,
I am using 'Web Dynpro Binary Cache' for downloading data to excel file. Though, content is downloaded properly, I am facing the following problems:
1) Header text of columns is not appropriate, it shows me the name of context attribute and not the text I have set in Map.
2) Order of column is not proper. It does not match with the order in context or the order in which I have set the header text.
3) For columns holding an integer value, it adds an extra column for aggregate. Though type of corresponding attribute is string and not integer.
I printed the string formed in XML format, it shows correct header text without any extra aggregate columns.
Please help...
Regards,
Tejal
the linked hashmap does not solve the problem of repeated columns.
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello everyone,
I'm having exactly the same problem as Tejal. Can anyone help? My main concern is the column order.
Thank you,
Nuno
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I can help with the column order part.
You need to use an ArrayList (or similar list) to hold the list of columns. See forum web log /people/sap.user72/blog/2006/05/04/enhancing-tables-in-webdynpro-java-150-custom-built-table-utilities
and look in the 'Creating an Excel File' section.
The problem with Map is that it does not keep the columns in the order you add them to the map.
-Cindy
Hallo Cindy,
used LinkedHashMap instead of HashMap:
private Map getProductColumnInfos() {
Map columnInfosMap = new LinkedHashMap();
columnInfosMap.put(IPrivateTableCompBasketView.IProductsElement.QUANTITY, "Quantity");
columnInfosMap.put(IPrivateTableCompBasketView.IProductsElement.ARTICLE, "Article");
columnInfosMap.put(IPrivateTableCompBasketView.IProductsElement.COLOR, "Color");
columnInfosMap.put(IPrivateTableCompBasketView.IProductsElement.PRICE, "Price in EURO");
columnInfosMap.put(
IPrivateTableCompBasketView.IProductsElement.TOTAL__PER__ARTICLE,
"Total Per Article In Euro");
return columnInfosMap;
}
This keeps the order of key-displaytext-pairs passed by the client (table component) to the service (excel export component) stable.
Regards, Bertram
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.