Issue with data download to excel
Hi all,
iam downloading data from table to excel sheet.
when i see in the excel sheet i don't see the leading zero's
say if i have value in table as 0001234 but in excel when i download i see as 1234
instead i want it exactly it is in my table
this is the code
data : begin of it_heading occurs 0,
line(30) type c,
end of it_heading.
it_heading-line = 'ABC'.
append it_headING.
it_headING-line = 'XYZ'.
append it_headING.
call function 'WS_DOWNLOAD'
exporting
BIN_FILESIZE = ' '
CODEPAGE = ' '
filename = p_file
filetype = 'DAT'
mode = ' '
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
COL_SELECT = ' '
COL_SELECTMASK = ' '
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
tables
data_tab = it_data
fieldnames = it_heading
exceptions
file_open_error = 1
file_write_error = 2
invalid_filesize = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
others = 10
if sy-subrc eq 0.
endif.
Thanks
Kajol
The date field has nothing to do with the progarm, only with excel sheet. you can try increasing the length in the progam for the date field before pushing to excel and check it.
gui_download has got some extra features when compared to ws_download.
You can check this for some info
http://help.sap.com/saphelp_erp2005/helpdata/en/79/c554a3b3dc11d5993800508b6b8b11/frameset.htm
http://www.sapdevelopment.co.uk/file/file_otherpc.htm
WS_UPLOAD and WS_DOWNLOAD, the function modules used until now are not part of the standard set of ABAP commands. They are used to display the file interface on the presentation server. WS_UPLOAD and WS_DOWNLOAD are not compatible with USs and have been replaced by GUI_UPLOAD and GUI_DOWNLOAD.
The new function modules, GUI_UPLOAD and GUI_DOWNLOAD, have an interface that also allows you to write Unicode format to the local hard drive. For a description of these interfaces, refer to the documentation for each function module, available under SAP Easy Access " Development " Function Builder " Goto " Documentation.
Instead of using the function modules, you can use the static methods GUI_UPLOAD and GUI_DOWNLOAD of the global class CL_GUI_FRONTEND_SERVICES.
award points if it helps.
Similar Messages
-
Issue with Data download to excel from ALV
Hi,
I am trying to download data to excel from ALV.
The number of records are 26000.
When I am trying to download I am getting an error displaying a pop up saying that
problems came up in the following areas during the load
TABLE
The log displayed is not clear.
I need to know the limitations while downloading to excel... I tried in SDN but of no use. I am using office 2007.
What is the max downloading limit(MB)
What must be the Length of line that can be downloaded.
RegardsHi ,
First check whether your ALV grid OUTPUT is Consistent or Not .
if there are any inconsistency then you need to rectify that .
for Checking COnsistency / Inconsistency .do following steps
1) execute ALV report
2) Press Shift+Mouse Right Button (Twice) in blank area of report
3) you will get result whether ALV is good or not .
regards
Deepak. -
Issue with data populated in excel attachment
Hi Folks,
Im an emailing the report output as excel attachement. In the excel file, im getting only the header line and NOT the details, pls help me where im going wrong.
regds,
BGhi pls find the code im using as below.
TYPES : BEGIN OF ty_output,
no(18) TYPE c,
soh(13) TYPE c,
qty(13) TYPE c,
matnr TYPE mara-matnr,
maktx TYPE makt-maktx,
labst TYPE mard-labst,
avl_qty TYPE bapicm61v-wkbst,
END OF ty_output.
DATA:
docdata LIKE sodocchgi1,
objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE,
tab_lines TYPE sy-tabix.
DATA: lv_labst(13) TYPE c,
lv_avl_qty(13) TYPE c,
t_output TYPE STANDARD TABLE OF ty_output,
wa_output LIKE LINE OF t_output.
CONSTANTS: con_tab TYPE c VALUE cl_abap_char_utilities=>horizontal_tab,
con_cret TYPE c VALUE cl_abap_char_utilities=>cr_lf.
Body
docdata-obj_name = 'Mail_Excel_File'.
docdata-obj_descr = 'Excel file attachment'.
objtxt = 'Attached is the sample Excel file'.
APPEND objtxt.
DESCRIBE TABLE objtxt LINES tab_lines.
READ TABLE objtxt INDEX tab_lines.
docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'RAW'.
APPEND objpack.
Attachment
*i_data-a = 'Sample'.
*i_data-b = 'File'.
*CONCATENATE i_data-a i_data-b INTO objbin.
*APPEND objbin.
CONCATENATE 'NO 'SOH'
'QTY' 'MATNR ' 'MAKTX'
'LABST' 'AVL_QTY' INTO objbin SEPARATED BY con_tab.
CONCATENATE con_cret objbin INTO objbin.
APPEND objbinst.
CLEAR objbin.ut
wa_output-no = '123456'.
wa_output-soh = '39000'.
wa_output-qty = '39000'.
wa_output-matnr = '123-456'.
wa_output-maktx = 'test'.
lv_labst = '39,000'.
lv_avl_qty = '39,000'.
CONCATENATE wa_output-no wa_output-soh
wa_output-qty wa_output-matnr
wa_output-maktx lv_labst
lv_avl_qty
INTO objbin SEPARATED BY con_tab.
CONCATENATE con_cret objbin INTO objbin.
APPEND objbin.
CLEAR objbin.
DESCRIBE TABLE objbin LINES tab_lines.
objpack-doc_size = tab_lines * 255.
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 1.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'XLS'.
docdata-obj_name = 'Excel_File_Attachment'.
objpack-obj_descr = 'Excel File Attachment'.
APPEND objpack.
Create the list of recipients
reclist-receiver = mail address.
reclist-rec_type = 'U'.
reclist-express = 'X'.
APPEND reclist.
Send the e-mail
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = docdata
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = objpack
contents_bin = objbin
contents_txt = objtxt
receivers = reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
COMMIT WORK. -
Issue with File Download(messageDownload) on Search Page.
Hi,
I created a custom OAF search page which fetches values from one table. The document in getting stored in my custom table in a BLOB colums and NOT in FND_LOBS.
The table has 3 collumns along with others:
1st is primary key (Record_Seq) ==> number data type
2nd to store actual file name (File1Name) ==> varcahar2 data type
3rd to store the actual uploaded data (File1Data) ==> BLOB data type
The reason for having the “File1Name” is so that I can display the original file name of the document that was uploaded, instead of just the “view” in the search page results .
On the File1Data BLOB and created a messageDownload for that under query results table with following details:
ID : File1Data
ItemStyle : messageDownload
FileMIME Type : pdf
Datatype : BLOB
View Instance : LacEmpExposureVO1
view Attribute : File1Name
File View Attribute : File1Data
When I click on the "File1Name" data hyperlink, it is opening only the first document corresponding to the first record in the search page results.
For example, If my search page returns 10 rows then when I click on the file1name on any row, It is open the first row file name only.
I have a primary key column(RECORD_SEQ) in the Table / EO / VO which is displayed in the search page results.
Also one weird thing is happening:
If I try to do this more than 2 times then it is opening the update page with the first record from the search page results…
I tried to print the context and it is nul the first time, But the second time then context is changing to "update". Dont know how this is happening????
Any advice is greatly appreciated as it is very crucial for me to get this resolved ASAP. I have looked at several forums and did a lot of things as advised in the forums . But nothing seems to work for me.
Thanks,
Mir
CO code for the search page
===========================
if (pageContext.getParameter("Create")!= null)
System.out.println("Into LacEmpExposureCO in PROCESS FORM REQUEST with Context of CREATE");
pageContext.setForwardURL
("OA.jsp?page=/lac/oracle/apps/lac/lacempexposure/webui/LacEmpExposureCreatePG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true, //Retain AM
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES);
else if ("update".equals(pageContext.getParameter(EVENT_PARAM)))
System.out.println("Into LacEmpExposureCO in PROCESS FORM REQUEST with Context of UPDATE");
System.out.println("LacEmpExposureCO ==> RecordSeq in PROCESS FORM REQUEST is: " + RecordSeq);
HashMap params = new HashMap(1);
params.put("RecordSeq", RecordSeq);
pageContext.setForwardURL
("OA.jsp?page=/lac/oracle/apps/lac/lacempexposure/webui/LacEmpExposureUpdatePG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
params,
true, //Retain AM
OAWebBeanConstants.ADD_BREAD_CRUMB_NO, // Do not display breadcrumbs
OAWebBeanConstants.IGNORE_MESSAGES);
else {
String strEvent = pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM);
System.out.println(strEvent);
System.out.println("Into the last ELSE part in LacEmpExposureCO.java");Duplicate post -- Issue with File Download(messageDownload) on Search Page.
-
Issue with Data Provider name in variable screen for BEx Analyzer
Hello all,
We got an issue with Data Provider name in Variable screen in BEx Analayzer.
We want to change the DataProvider name there to Description of the report instead of its Technical name.
Any inputs are appreciated.
Thanks
KumarYou have to create a workbook to do this.
Refresh your query/report. In Bex analyser, there is one toolbar named BEx design toolbox, If you are not able to see it in analyser, right click on the toolbar space of BEx analyser and click on BEx design toolbox. Here, goto to design mode, by clicking on a sysbol like 'A'. after that place the curser where you want to see the Query description. and click on insert text (T) in BEx toolbox. click on it and check "Query description" in constant tab. in the general tab you need to assign a dataprovider, for that assign your query name in workbook settings (in Bex design toolbox). also check the "display caption" in general tab.
Pravender -
Issue with data dictionary -Table maintanance generator
Hi all,
I have an issue with Data dictionary, table maintenance generator. I have entered some records in a custom table (ZBCSECROLETOGRP) and changed the delivery class from C to A. When I create the table maintainance generator, I am encountered with the following errors:
1)Field ZBCSECROLETOGRP-PORTALGROUP shortened (new visible length: 000032)
2)0012 could not be generated
3)In TCTRL_ZBCSECROLETOGRP field LENGTH has the invalid value 01
My main motto is to create the table maintainace generator and transport to the furthur systems .
Please help.
ThnX in advance,
Vishal..HI,
Regenerate the table maintenance by selecting the checkbox of "Modified field structure" => new entry & then save.
Also ensure that the new changes are not affecting old data bcz of data type changes. If that is the case, then delete the old records, regenerate table maint. & re-enter those records which you had deleted.
Thanks,
Best regards,
Prashant -
Has anyone had issues with Microsoft Word or Excel requiring a set-up after software udates? I do not have product key, so unable to set up again.
This laptop has original Microsoft word & excel provided by Mac when purchased and is legal copy.
Do I understand you bought a Mac and it came with Microsoft Office? I could be wrong, but I wasn't aware that was an option. Or am I not parsing that sentence correctly and you bought a Mac and bought a legal copy of Office to install on it? In which case, never mind. -
Hi All,
I m facing an issue with Date format in the prompt. I have used date presentation variables in my column formula as shown below:
FILTER("SKU Order Details"."Fulfilled Quantity" USING Time."Calendar Date" <= DATE '@{todate}{2900-01-01}')
The report returns data when I don't select any date range for start & end date prompts on the page. But when I select the start & end date values in the prompt, I m getting the following error:
Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P:OI2DL65P
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 46047] Datetime value 10/22/2009 12:00:00 AM from 10/22/2009 12:00:00 AM does not match the specified format. (HY000)
I included the following formulas for start & end date prompts:
Start Date prompt: case when 1=2 then License."Ips Creation Date" else cast ('1.1.1900' as date) end
End Date prompt: case when 1=2 then License."Ips Creation Date" else cast ('1.1.2900' as date) end
Can you please help me resolve the issue.
Thanks,
KartikHi Nico,
I tried putting the format that you mentioned, I m getting an error message.
My prompts have the following formula :
Start: case when 1=2 then License."Creation Date" else cast('1.1.1900' as DATE) end
End: case when 1=2 then Time."Calendar Date" else cast('1.1.2900' as DATE) end
My column formula has the following syntax:
FILTER("SKU Order Details"."Fulfilled Quantity" USING Time."Calendar Date" between DATE '@{start}{1900-01-01}' AND DATE '@{end}{2999-01-01}')
Error Message:
Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P:OI2DL65P
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 46047] Datetime value 11/17/2009 from 11/17/2009 does not match the specified format. (HY000)
Can you please let me know if something needs to be changed.
Thanks,
Kartik -
Report data download to excel file
Hi experts,
My requirement is report data download to excel file and that file should be an attachment to send email to specified people.
first i want to to download data to excel file and that file should be an attachment.
Regards
V.VenuHi venu,
Before posting the question, just search for the related query, more number of post has been posted related to your query,
any ways check this below links, it will solve your problem.
<<linkfarm removed>>
Cheers
NZAB
Edited by: kishan P on Jan 10, 2012 4:51 PM -
Issues with Lightroom downloading
Is anyone else having issues with the download button for Lightroom 4.0 on the Adobe download page? Nothing happens.
Troubleshoot Adobe Download Assistant
Mylenium -
Issue with file download from BLOB type data
i have been using this for a while, with no problems, including on hosted machines.
the upload to the database works fine.. not the issue, and the download script also works fine, on the local WAMP machine.
but once moved to the server it fails.. the query does not work.
i have a feeling that it is something to do with the managed hosting i am using, but they say no, i have tried it on 2 seperate hosted machines (different providers), with no joy.
if i run the select query on the hoisting server via phpmyadmin, the query runs ok.
any suggestions as to what may be causing the problem on the server compared to the local WAMP machine?
i really don't know where to start looking, or where to point the hosting company.
This is the php code to download the blob data, works fine on local WAMP setup, browser asks if you want to save the file/open etc. as expected.
<?php require_once('Connections/connTracker.php'); ?>
<?php
// if id is set then get the file with the id from database
if(isset($_GET['docindex']))
{$id = $_GET['docindex'];
$query = "SELECT document_name, document_type, document_size, document_content " .
"FROM tracker_documents WHERE document_index = ".$id;
*** seems to be failing here when running the query ***
$result = mysql_query($query) or die('Error, query failed');
list($name, $type, $size, $content) = mysql_fetch_array($result);
header("Cache-Control: maxage=1"); //In seconds
header("Pragma: public");
header("Content-length: $size");
header("Content-type: $type");
header("Content-Disposition: attachment; filename=$name");
echo html_entity_decode ($content);}
exit;
?>Hi Gun,
You are the only one responded to my issue. I have allocated some points.
Yes. I have checked the assignment in CRM organizational model.
I did download the org. structure from ECC 5.0
All objects including sales offices are activated for determination and I have verified with green light
As per your suggestion if the sales area data is not matched between the two systems, then how come the error will not reappear during the bdoc reprocess?
What is missing during the first time bdoc process? Looks something is missing for validation module?
Any inputs?
Thanks,
Raj -
Hi Guys,
I am facing problem with the PDF download option. In the answers request I have to use Pivot tables to display data and since these pivot tables do not provide the option of Table Headings, I resorted to HTML to get a similar output. The issue I am facing right now is when I print it through PDF or Powerpoint, the HTML code I have written comes up instead of the result. In the case of excel or answers, I am getting the proper output. Is there some setting I am missing?? I am using the column with the HTML coding in the Columns section of the pivot table.
Thnx!Hi,
This is a known issue with HTML code embedded in your request, when you try to download the same in PDF, PowerPoint it will show the code.
You can the following bugs regarding this in metalink.
Bug 7187501: PDF SHOWS HTML TAGS WHILE PRINTING REPORT WITH BOLD LETTERS -HTML Tags Shown When Print or Export to PDF (Doc ID 1064060.1)
Bug 9372634: HTML TAGS SHOWN WHEN PRINT/EXPORT TO PDF
Bug 8899783: HTML TAGS APPEAR IN PDF REPORT
Thanks,
Vino -
Issue with Date and Time Picker on Windows 8.1 and Office 2013
We are having a issue with the Developer tool in Excel called the Date and Time Picker which puts a calendar field into the spreadsheet where you can select a date from the calendar popup
If we change this date field and then save and close and reopen it reverts back to the previous date before the change was made
If we do the same process on a Windows 7 machine with Office 2013 it saves the changes we made to the Date and Time picker fieldHi jdono2,
I'm using Windows 8 and Office 2013,and I can't reproduce this issue.
Please make sure you have already upgraded to the latest version of excel, try to reregister the MSCOMCT2.OCX.
Also you can try to use another date picker add-in to test this issue.
http://social.msdn.microsoft.com/Forums/office/en-US/36f83f24-cd76-4f8e-aa7b-5f166666e7d3/excel-2013-popup-calendar?forum=exceldev
Wind Zhang
TechNet Community Support -
Analyzer 7.0 issue with dates
Hi experts,
We have an upgraded BI to version 7.0 with a latin language and date format DD/MM/YYYY instead of MM/DD/YYYY.
Most users still use the 3.X versions of Analyzer, Query designer... This version works fine.
But Analyzer 7.0 has a date issue.
For example, using list_cube we can see that the value for the date key figure is 01.02.2011 and using Analyzer 3.X the value is 01/02/2011.
But if we use Analyzer 7.0, it changes the day and month and we see 02/01/2011 instead of the correct date 01/02/2011, like the analyzer 7.0 sends the date value to excel with english format (MM/DD/YYYY) instead of the latin format (DD/MM/YYYY).
We are using Microsoft Excel 2007.
Sap Bex: BI AddOn 7.X (based on 7.20)
Support Package 0
Revision 634
Any ideas ?
Thanks in advance.Change the format in regional settings...
Control Panel -> Regional settings -> Additional settings -> Goto Date tab and change the short date format to DD/MM/YYYY.
And then restart your analyzer and see if this works.
--- Thanks.. -
Recent issues with already downloaded movies redownloading on thier own
This appears to be a recent issue. But I have purchased and downloaded the following movies:
How to Train Your Dragon
How to Train Your Dragon 2
ParaNorman
These movies downloaded fine. No problems with them downloading or with playback. I have been having trouble downloading GOTG. (Nice to know I am not the only person.) This morning I start up iTunes and the above listed movies started downloading again. I have been having some issues with the recent versions of iTunes. Problems that I have never had before. Starting with iTunes 11 and continuing with iTunes 12, it seems to be losing track of what I have purchased. Ignoring what is currently in my Library and re-downloading already downloaded material. This cluttering up my Library with duplicate files I can't seem to get rid of. In some cases I am afraid to delete the duplicates. No telling what the impact will be. Does anyone know a way to stop this? Or is this the new normal with iTunes. I had been considering limiting myself to just digital downloads. But with some of this strange behavior in the part of iTunes I will continue to purchase Blu-rays or DVDs for the foreseeable future.Have posted an updated version of the MST to my webspace here:
http://homepage.ntlworld.com/minkus/shockwave/shockwave115606mst2.zip
This new version fixes the following issues (changes to this version in bold):
MsiInstaller repair & errors on first run as non-admin (removes 'AppData' directory entries)
DCOM errors once Shockwave is installed (adds double quotes to the beginnning of LocalServer32 value)
Incorrect TypeLib paths in the registry (fixed to use built-in [SystemFolder] property)
Default CLSID description value missing (set to 'Shockwave ActiveX Control', as per the executable installer)
Incorrect Shockwave 10 paths in the registry (fixed to use built-in [SystemFolder] property)
Misspelt 'OptionalComponets' registry key (renamed to 'OptionalComponents')
Missing .dcr, .dir, .dxr Content Type registry values (included in the executable installer)
Fixed incorrect AppID registry key (set to use installer's [VERSION] variable)
Removed 'Launch SWDNLD.exe' shortcut created in Programs subfolder (people don't want this - see here)
I have tested this on my network and it all seems to work fine. Unfortunately my original plan to use the executable installer didn't work out as it does not include the Shockwave 10 compatibility components described here and here, so it looks like I'll have to keep this MST file up to date with the latest versions until Adobe fix the problems themselves...
If you want to see the changes that I have made, load up Adobe's 11.5.6.606 MSI file in Orca, then use Transform / Apply Transform to apply the MST, and look for the entries in green.
Please post any feedback to this thread, and I will try to respond if I can help!
Chris Hill
Maybe you are looking for
-
Item number in sales order versus delivery not equal
Hello Guru's, Please help me solve this problem, i created a sales order with 6 items in it and save it. Before I create the delivery I deleted the sales order item number 1,2 and 3 so the item that was redy for delivery are sales order items nubmer
-
I have a 2012 MacBook Air. What I would like to be able to do is plug into an external display and project a looping Keynote presentation on the external display. The problem is when I play the Keynote presentation, my laptop screen goes black. Is it
-
Hi, neither can I "save / save as" a document in indesign nor can I "undo / redo" a task.. this just happend recently. Does anybody know what to do?
-
Lr/ACR edits missing when opening dng to Ps
hello, I´m using latest CC versions from Lightroom and Photoshop. Recently I have been having these issues with Photoshop opening file which don´t show basic edits done in Lr or ACR. Ps opens an original file. I have also Nik plugins, could that be a
-
How can i bind my hr form to my abap program?
Hi guys y have a little problem does any one knows how to bind hr form to an abap program ?