Excel downloading issue in modalDialog
Hi all,
I have a jsp page which is used to download an excel report.
Issue i am facing is the pop up jsp is working fine when i dont have it as
"modalDialog" page,if its a normal popup the download works fine.
is there any sspecial stuff to fix the same against modal dialog???
code i used for modal dialog jsp:
showModalDialog((mypage+"?ssnNo="+ssnNo),myname,"dialogHeight:290px;dialogWidth:650px;")code i used for normal popup jsp:
window.open(mypage+"?ssnNo="+ssnNo,myname,settings)server side code for download :
ServletOutputStream outputStream1 = response.getOutputStream();
outputStream1.write(bytes);
context.renderResponse();
outputStream1.flush();
outputStream1.close(); I believe the problem occurs only for the modal window not for normal popup.
Any idea on this???
regards,
sundar
Uh, there is a huge conceptual misunderstanding here.
Java code runs at the server side, not at the client side.
If you want to run Java at the client side, use a signed applet or web start application.
Similar Messages
-
Experts,
I have a exportCollectionActionListener to download table data in excel format. The issue is when i try to download in IE 8, i get the security message by internet explorer and the download doesn't happen. Any ideas on this ?
Partial submit is set to true on the commandButton
thnks
Jdev 11.1.1.5i get the security message by internet explorerI don't know what "the security message" is - perhaps it is saying "file download blocked due to security restrictions?"
You cannot in your code bypass the security restrictions set by the browser - if you could, then you can probably make a nice illicit living as a virus writer.
John -
Blocked ALV Excel Download Issue
Hi Experts,
My customers requirement is to download the output of Quotation Comparison Report with exact alignments as how it displays on Screen.
When I tried to download from Standard SAP Save options, like List->save.... Export.. Spreadsheet........, I am not getting the same format into the Excel Sheet.
I went into the program to check and found that it is a Blocked ALV.
I have 3 Blocks in the Outputs.
I am missing the alignment of Second Block having "Quoted" "Negotiated" to left side.
Kindly help me in downloading this as it is.
Regards,
G.V.S Praveen KumarHi Sumeet,
DATA: lv_exit TYPE char1, "#EC NEEDED
lwa_exit TYPE slis_exit_by_user, "#EC NEEDED
lt_excl TYPE slis_t_extab,
lwa_event TYPE slis_alv_event.
DATA: lwa_layout1 TYPE slis_layout_alv,
lwa_layout2 TYPE slis_layout_alv,
lwa_layout3 TYPE slis_layout_alv,
lt_events TYPE slis_t_event.
FIELD-SYMBOLS: <t_block1> TYPE STANDARD TABLE,
<t_block2> TYPE STANDARD TABLE,
<t_block3> TYPE STANDARD TABLE,
<w_block> TYPE any.
* Initializing the Block List
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
i_callback_program = sy-repid
i_callback_pf_status_set = 'PF_STATUS'
i_callback_user_command = 'USER_COMMAND'
it_excluding = lt_excl.
CONSTANTS:slis_ev_top_of_list TYPE slis_formname VALUE 'TOP_OF_LIST'.
lwa_event-name = slis_ev_top_of_list.
lwa_event-form = 'HEADER_TOP_OF_LIST'.
APPEND lwa_event TO lt_events.
CLEAR lwa_event.
lwa_layout1-no_colhead = 'X'.
lwa_layout1-zebra = 'X'.
* Appending the block data for header to the list
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
is_layout = lwa_layout1
it_fieldcat = t_fld1
i_tabname = '<T_BLOCK1>'
it_events = lt_events
TABLES
t_outtab = <t_block1>
EXCEPTIONS
program_error = 1
maximum_of_appends_reached = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
REFRESH lt_events.
lwa_event-name = slis_ev_top_of_list.
lwa_event-form = 'ITEM_TOP_OF_LIST'.
APPEND lwa_event TO lt_events.
CLEAR lwa_event.
lwa_layout2-no_colhead = 'X'.
lwa_layout2-zebra = 'X'.
* Appending the block data for item to the list
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
is_layout = lwa_layout2
it_fieldcat = t_fld2
i_tabname = '<T_BLOCK2>'
it_events = lt_events
TABLES
t_outtab = <t_block2>
EXCEPTIONS
program_error = 1
maximum_of_appends_reached = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
lwa_layout3-no_colhead = 'X'.
lwa_layout3-zebra = 'X'.
REFRESH lt_events.
* Appending the block data for item to the list
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
is_layout = lwa_layout3
it_fieldcat = t_fld3
i_tabname = '<T_BLOCK3>'
it_events = lt_events
TABLES
t_outtab = <t_block3>
EXCEPTIONS
program_error = 1
maximum_of_appends_reached = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* Displaying the block list
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
EXPORTING
i_screen_start_column = 0
i_screen_start_line = 0
i_screen_end_column = 0
i_screen_end_line = 0
IMPORTING
e_exit_caused_by_caller = lv_exit
es_exit_caused_by_user = lwa_exit
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF. -
Hi all
While I am running code for downloading data to excel I am prompted with following options :
Pleas select how you would like to open this file:
selection 1 As an XML table
selection 2 As a read only workbook
selection 3 Use the XML source task pane
ok cancel help
How can I remove this and have it directly open the workbook. Kindly help
Thank you
Regards,
Preet KaurHi John
Its a customised one. This is the code I have used for opening the excel:
private String toExcel(IWDNode dataNode, Map columnInfos) {
StringBuffer x = new StringBuffer();
String attributeName, headerName;
String entriesName = dataNode.getNodeInfo().getName();
String entryName = entriesName + "Element";
// trim given header texts, so that XML element names adhere to the
// rule 'no spaces contained'.
trimHeaderTexts(columnInfos);
x.append("<?xml version='1.0' encoding='UTF-8' standalone='no'?>\n");
x.append("<").append(entriesName).append(">\n");
for (int i = 0; i < dataNode.size(); ++i) {
IWDNodeElement dataNodeElement = dataNode.getElementAt(i);
x.append("<").append(entryName).append(">\n");
for (Iterator iter = columnInfos.keySet().iterator(); iter.hasNext();) {
attributeName = (String) iter.next();
headerName = (String) columnInfos.get(attributeName);
x
.append("<")
.append(headerName)
.append(">")
.append(dataNodeElement.getAttributeValue(attributeName))
.append("</")
.append(headerName)
.append(">\n");
x.append("</").append(entryName).append(">\n");
x.append("</").append(entriesName).append(">\n");
return x.toString();
thank you
regards,
Preet Kaur -
Hi Guys,
I have a problem that when I export a BO report to Excel, the bar graph from BO gets very scrunched up and narrow, with the X-axis barely visible once it goes to Excel. But in BO, the report looks great. With all the cells aligned and matching. Is there a way to manipulate something in the BO report to make it Excel friendlier?
thanks in advance, will award points.
-preyaHi All,
Trying to replicate WEBI Excel Download issue.
Operating system : Windows 7
Internet Explorer : IE8 Version 8.0.7600.16385CO.
Jre Version : 1.6_ greater than 1.8 version.
If anybody having above specifications in your machines Please try to save a webi reports to excel format and send me the results. -
Excel Download of a Web SAP BW Report asks userid and password.please help
Dear BW folks,
Issue: When I run a specific SAP BW Report from Web and download the same into excel & csv.
When I open the excel file downloaded, it asks me user name and password to enter. csv file downloaded doesn't ask.
The report has 0cust_sales hierarchy and SBU hierarchy.
Is there any thing to do with these hierarchies that the excel download is asking user name and password?
Please help me out!!!!! This report needs to be downloaded into excel sent to my manager.....
Regards
PavanHi Pavan
It is possible,please refer the below link
Report execution without prompting user id
Providing un-secured access to a web report.
Also, for the time being, you can run the query and save a workbook and sent across
These will resolve the issue
Thanks
Pavan Agarwal -
Problem in ALV to Excel Download
Good Morning Experts,
I am facing one issue related ALV to excel Download.
I Developed one custom report the output is correct displaying.
the output is like for example i am taking 3 columns (plant, material, amt).
plant material amt
1001 aaa 1000
1001 bbb 2000
while downloading to excel
it displaying like
plant
material
amt
1001
aaa
1000
1001
bbb
2000
I dont know why its coming like that.
this is my code
DEFINE field_cat.
wa_field-row_pos = &1.
wa_field-fieldname = &2.
wa_field-tabname = &3.
wa_field-seltext_m = &4.
wa_field-outputlen = &5.
wa_field-currency = &6.
wa_field-ref_fieldname = &7.
wa_field-ref_tabname = &8.
APPEND wa_field to it_field.
clear wa_field.
END-OF-DEFINITION.
field_cat '1' 'BUKRS' 'IT_FINAL' 'Company Code' '6' '' '' ''.
field_cat '2' 'BUTXT' 'IT_FINAL' 'Comp Descrip' '25' '' '' ''.
field_cat '3' 'LIFNR' 'IT_FINAL' 'Vendor No' '10' '' '' ''.
field_cat '4' 'NAME1' 'IT_FINAL' 'Vendor Name' '35' '' '' ''.
field_cat '5' 'STRAS' 'IT_FINAL' 'Vendor Addres' '35' '' '' ''.
field_cat '6' 'FDGRV' 'IT_FINAL' 'Nature Of Work' '30' '' '' ''.
field_cat '7' 'DMBTR' 'IT_FINAL' 'Net Amount' '16' 'X' 'WAERS' 'IT_FINAL'.
field_cat '8' 'QBSHB' 'IT_FINAL' 'TDS Amount' '16' 'X' 'WAERS' 'IT_FINAL'.
field_cat '9' 'TOTAL' 'IT_FINAL' 'Total Amount' '16' 'X' 'WAERS' 'IT_FINAL'.
it_layout-zebra = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = sy-repid
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
IS_LAYOUT = it_layout
IT_FIELDCAT = it_field
I_SAVE = 'X'
TABLES
t_outtab = it_final
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endform. " DISPLAY_ALV
FORM TOP_OF_PAGE.
REFRESH it_head. CLEAR it_head.
wa_head-typ = 'H'.
wa_head-info = 'Vendorwise Expense Details'.
APPEND wa_head to it_head.
wa_head-typ = 'S'.
IF NOT s_MONAT-high is INITIAL.
CONCATENATE 'Period : ' p_gjahr '.' s_MONAT-low ' to ' p_gjahr '.' s_MONAT-high INTO wa_head-info.
ELSE.
CONCATENATE 'Period : ' p_gjahr '.' s_MONAT-low INTO wa_head-info.
ENDIF.
APPEND wa_head to it_head.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_head.
ENDFORM.
Regards,
Dhina..Hi,
You can also try in this way
in the output screen
click List (in app tool bar) -> Export -> Spreadsheet
and save at your desired location.
(It will be save in .mhtml format , just rightclick on it and you can open it with excel )
Then you will be able to view in your required format.
Regards,
koolspy. -
Excel download feature in Web Dynpro Abap using OAOR document
Hi Friends,
I am facing an issue in implementing excel download feature in Web Dynpro.
Problem: I have stored an excel document in OAOR. I am displaying data on screen using ALV display in WDA.
I will provide a button to download excel in toolbar of ALV. When user clicks on this button i need to pick the document from OAOR and fill that with my screen values and download it to users desktop.
Please help me in this. Problem is when i am calling these classes c_oi_container_control_creator=>get_container_control and cl_gui_custom_container from my View's method they are returning error.
Thanks & Regards,
SaudHI,
You cannot use GUI classes and methods in web dynpro . That will dump.
Instead you can use file down load UI element or..
If you have the content in xstring format use ATTACH_FILE_TO_RESPONSE method of CL_WD_RUNTIME_SERVICES class.
Regards,
Madhu -
ALV Excel Download problem ( Special Character)
Hi,
I am unable to download completely in XLS format from ALV grid. When i tried in couple of ways there is a special character( " ) in one of the filed. Due to the same Excel download has some problem. I tested by removing those and it worked fine,
Please suggest me to solve the issue.
Thanks,
Bhanu Gattu,Data strings with special characters can not be downloaded into XLS format from ALV grid. In my case, I replaced the special character " with space and I could download the data into excel.
-
Excel download truncated characters
Hi,
I have a strange problem. I am trying to download an ALV report in a excel format to the work station and the last character of one of the many fields,Vendor Number, gets truncated. Strangely this problem is confined to quality and production environments, and the same excel download works fine in the development environment.
I have searched for replies in the forum that suggest program corrections but I would like to know how the same report download works correctly in development.Hi,
The issue is due to fieldcatalog not being populated properly and in the Layout - Column width optimize is checked. In this case the contents are display till the heading ( For ex: if the heading is 'Vendor' ) the conents will be displayed with a maximum length of 6 characters instead of 10 with ".." at the end truncating the output.
The reason why its working in development and not in Quality or production is that the maximum vendor number in development is less than or equal to 6 digits where as in quality or production its more. Please check.
Solution: If you are populating the field catalog manuallly, populate the ref_field and ref_table ( For ex: wth 'LIFNR' and 'LFA1' respectively ).
Edited by: Suman Jagu on May 9, 2011 11:48 AM -
Dear Guys,
I have one issue in WAD.
I have one report having Revinue and Expenditure. These are the two reports.
In WAD, i am showing these two tables in one template.
Everything is coming fine. When i am trying to download to excel, only first report is downloading. The second is not downloading.
I want to download both reports in a single shot.
I am using text element in WAD for downloading to Excel. My WAD code is,
<td class="SAPBEXNavLine">
<A href="<SAP_BW_URL CMD='EXPORT' FORMAT='XLS' DATA_PROVIDER='DP'>">
<IMG alt="<SAP_BW_TEXT program="SAPLRRSV" key="T77">
<SAP_BW_TEXT program="SAPLRRSV" key="T72">" src="Mime/BEx/Icons/S_X_XLS.gif" border=0 >
</A>
</td>
Please provide some inputs.
Regards,
Vivek.VVivek,
The Excel download is dataprovider specific and not template specific .. you would not be able to download both of them usung WAD..
Options :
1. Web Enabled workbooks
2. Use BSP to render the query ad use the excel download functionality - extremely complex and cumbersome
Hope it helps..
Arun
Assign points if helpful -
Export to excel - Formatting issue - OBIEE 11.1.1.5
Hi All,
When an analysis is exported to Excel, some of the values are showing some strange behaviour i.e. some values are multiplied by some huge number as you can see in the excel screenshot below.
BI Analysis Screenshot:
http://i44.tinypic.com/331eopf.jpg
Excel Screenshot:
http://i44.tinypic.com/34snqko.jpg
Is this BI issue or an Excel setup issue? And how to fix it?
Thanks in advance.Hi,
We too faced the similar issue.
We tried ROUND function and it was coming with proper formatting.
Try and let me know further.
Regards,
MuRam
NOTE: Please mention if this resolved your problem/still facing and close the thread to assist others with similar problems. -
Dump while running a program with OLE Excel download facility in ITS
Hi,
Because of some complex requirment, I had created a report program which will download the data to an Excel sheet using SAP OLE Automation Controller. For this report i had created a tcode too.
The report which i developed is perfectly working fine in SAPGUI. But if i access the same report throught SAP ITS serice. I am getting a dump. Please find below the dump details. I am not able to figure it out why the dump is not coming in SAPGUI.
Runtime Errors MESSAGE_TYPE_X
Date and Time 09.03.2010 05:35:41
Short text
The current application triggered a termination with a short dump.
What happened?
The current application program detected a situation which really
should not occur. Therefore, a termination with a short dump was
triggered on purpose by the key word MESSAGE (type X).
|
Error analysis
Short text of error message:
Control Framework : Error processing control
Long text of error message:
Diagnosis
An error occurred when the system tried to process the commands
from the Automation Queue on the presentation server.
There are several possible reasons for this:
- The installation of the SAP GUI on the presentation server is
faulty or obsolete.
- There is an error in the application program
- There is an error in the SAPGUI or an integrated control
Procedure
1. Make sure that you have imported the appropriate Support
Package, the current kernel, and GUI patch for the release of your
system
2. Check whether the error occurs locally on one or a few PCs, or
generally on all PCs. Note whether the error only occurs for some
users, for example because of a specific Customizing setting.
If it only occurs locally, this suggests an installation problem
with the PC. Check the installation; if necessary, reinstall the
software. In the dump, search for the SY-MSGLI field, since it may
point to the cause of the error.
3. Activate the Automation Trace (in accordance with SAP Note
158985).
4.Start the transaction and continue until the screen immediately
before the dump.
5. From the System -> Utilities menu, choose Autom. Queue,
Synchronous Processing.
The status bar of the GUI displays the text:
"Automation synchron flush mode on"
6. If you now proceed with the application, the short dump will
display the ABAP call that caused the error; the Automation Trace
will contain the error on the presentation server.
7. If necessary, load the short dump and trace files on to
sapservX, so that SAP can analyze them.
Technical information about the message:
Message class....... "CNDP"
Number.............. 006
Variable 1.......... " "
Variable 2.......... " "
Variable 3.......... " "
Variable 4.......... " "
How to correct the error
Probably the only way to eliminate the error is to correct the program.
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"MESSAGE_TYPE_X" " "
"SAPLOLEA" or "LOLEAU02"
"AC_SYSTEM_FLUSH"
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
1. The description of the current problem (short dump)
To save the description, choose "System->List->Save->Local File
(Unconverted)".
2. Corresponding system log
Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
(Unconverted)".
3. If the problem occurs in a problem of your own or a modified SAP
program: The source code of the program
In the editor, choose "Utilities->More
Utilities->Upload/Download->Download".
4. Details about the conditions under which the error occurred or which
actions and input led to the error.
User and Transaction
Client.............. 120
User................ "XXXXXX"
Language Key........ "E"
Transaction......... "ZGA_BEACON_SOX_RPT "
Transactions ID..... "4B95E2560EB62F9AE10000000A241C33"
Program............. "SAPLOLEA"
Screen.............. "ZGA_REP_BEACON_SOX_REPORT 9000"
Screen Line......... 0
Information on Caller ofr "HTTP" Connection:
Plug-in Type.......... "HTTP"
Caller IP............. "10.36.28.52"
Caller Port........... 8000
Universal Resource Id. "/sap/bc/gui/sap/its/webgui/~flNUQVRFPTIzNzIxLjAxNC4wNC4
wNA=="Hi All,
FYI.....
As I said because of my complex requirement, i am using OLE excel download facilities to download the data. ITS wont support this OLE download facility. This can be done only through local SAP GUI.
The reason for this is that, when i am using this download facility through SAP GUI, OLE object thats used in my report program will directly talk to the Local OLE excel objects (i.e. the local installed Excell application) and download the data. But if it's through ITS, my program wont be able to communicate with the local excel OLE objects because of this i am getting a DUMP.
Thank You all for the support. All the best in future.
Regards
Maneesh Chandran -
Excel download from ALV grid, for characters more than 1020
Hi,
When i am trying to download the report which is having character more than 1020, it is coming in two rows. I want all fields in one row. Please give solutions.
I am using below field catalog.
Car Eligibility
CLEAR lw_fieldcat.
lw_fieldcat-fieldname = text-001.
lw_fieldcat-reptext_ddic = text-011.
lw_fieldcat-tabname = text-021
APPEND lw_fieldcat TO gt_fieldcat.
I am using below FM.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
is_layout = gt_layout
it_fieldcat = gt_fieldcat[]
it_sort = gt_sort[]
it_events = gt_events[]
TABLES
t_outtab = gt_data
EXCEPTIONS
program_error = 1
OTHERS = 2.
Thanks in Advance,
Ravi Kumarravi,
its not about how you have used your field catalog or how you called ALV FM. its excel download functionality,
what you need to do is:
set pf-status '<<some value>>' -> you can find where to pass in ALV FM call.
then add a application toolbar button though this pf status.
then at use_command event, check sy-ucomm and if its the same as your new icons fcode then use the method to download it in excel. -
'REUSE_ALV_GRID_DISPLAY' Excel-download without dialog
Hi everybody,
we have a couple of reports displayed in dialog mode by using FM 'REUSE_ALV_GRID_DISPLAY'.
Now the question arose if there might be a possibility to perform an Excel-download NOT by pressing the dialog function button but instead with parameters such as path and filename given by the calling program, without any user-interaction, maybe even without having the report started in dialog but in batch/background mode instead. I don't see a solution to this. Does anybody else?
regards
Andreasbasically what you are saying is that as soon as the user executes the program, the output also should get downloaded to a predefined location in the user PC, without any further user interaction.
Right? if yes
you have the data in an itab (which is passed to T_OUTTAB tables parameter)
in the PBO (immediately after filling the itab with data before calling the function 'REUSE_ALV_GRID_DISPLAY'
call gui_download and pass filename, and the itab.
but you have to make sure thru a check to see this download happens only once during a session.
and this wont work in batchmode.
REgards
Raja
Maybe you are looking for
-
IPad1 stuck in recovery mode with and ITunes cannot restore with an error code of 11?
I tried to update to IOS 4.3.4 today but now my iPad1 stuck in recovery mode with and ITunes cannot restore with an error code of 11? (With the old discussion groups it was easy to see where other people had similar problems, these new groups seems c
-
Mobile number and telephone numbers not displying in lync contacts for other SIP domains.
Hi everyone, we recently migrated Lync 2010 to 2013, we have 2 SIP boc.bh and scys.gov.bh and local domain boc.local. lync users for boc.bh not getting telephone numbers & mobile number on lync contact list, same happening for scys.gov.bh lync users
-
How to undownload podcasts on ipad 3rd generation podcasts app
I just want to know how to undownload podcasts without removing them from the list.
-
Shane - DVCProHD Out To Second Monitor
Can I do this without a card? Two monitors with the canvas being sent to a second monitor while working with DVCProHD footage? Anybody else?
-
Hi Guys, help me..pls i have created one date prompt with calendar input, the date format in that prompt is like '03/15/2013' but i need to show the date format like '2013-03-15' . when i try to convert the date format, the user input calendar popup