Download BW query names in excel
Hi Guys, This is BW question. Can someone please tell me if I want to copy or download all the query names (not queries) in excel what is the procedure for that?
Thanks in advance.
Kam.
Hi,
you have to combine (view) / or create a query (SQVI / SQ01) with tables RSRREPDIR and RSZELTTXT.
The link is
RSRREPDIRCOMPUID = RSZELTTXTELTUID
RSRREPDIROBJVERS = RSZELTTXTOBJVERS
QUERY_TECCH= RSRREPDIR~COMPID
QUERY_TXTSH= RSZELTTXT~TXTSH
QUERY_TXTLG= RSZELTTXT~TXTLG
and then dump it to excel...
You can also use the technical business content 0TCT* objects.
hope this helps...
Olivier.
Similar Messages
-
Error when attempting to download SQ01 query data to Excel
Hi Experts ,
I am getting error when attempting to download SQ01 query data to Excel .
Error message - Contact your system administrator. The following template is missing: sap_om.xls
Message no. 0K 407
I have looked through the SAP GUI installation files and can find no record of the missing file
HelpHi
Please check SAP note 305900 & 803067
Regards
Ravinder -
Hi Friends,
Instead of display Sheet 1 in the Excel sheet tab(Bex), is there a way we can display Query Name in the excel sheet tab? please let me know.
Thanks,
KKHi Kumar
Can you please share how it was solved ?
Ashish -
Error 'Unable to open file' when downloading SAP Query to Excel
Hi all
I'm running a SAP Query which is set to download straight to a spreadsheet (Pivot Table / Microsoft Excel). Intermittently it does not work - apparently at random (at least, I've can't recreate the error at will).
It does one of the following:
- Works ok, and creates the pivot table
- Gives an Excel error message 'Unable to open file', then returns to the 'save the data in a spreadsheet' popup when enter is pressed on the error.
- Does not issue error message, just goes to the 'save the data in a spreadsheet' popup.
In the last two cases, the excel pivot table sheet is not created.
Has anyone seen anything similar, or have any idea as to what is causing the problem?
Any help gratefully received!
Not urgent as I've found a way round - further testing seems to show that I don't get the error is Excel is already open - but in the past I've run many SAP query downloads without needing to open Excel first. I suppose it's possible that this is just something to do with the Excel setup at the user site
Message was edited by:
E GregoryHi,
Ensure that file name with same name and in same path should not be open while saving the data.
Award if it helps.
Jogdand M B -
Hey guys, I have a cfm page that I am using to query data, and the result set is displayed on the same page when a user clicks submit.
My question is, I would like to create a clickable icon where, after a user runs the query and the data table displays, I want the user to be able to click a little Excel icon that will allow them to download the data in Excel.
So, a user clicks on a little icon somewhere on the page and IE or Firefox or whatever pops up a little dialog box asking them if they want to OPEN or SAVE the file results.xls. How can I do this?
Here is my current code, but where do I implement the cfoutput stuff to export? On the same page?
<cfquery name="qActivity" datasource="khamp" result="resultInfo">
SELECT KHAMELEON.GL_DETAIL.ACCOUNT, KHAMELEON.GL_ACCOUNT.DES1, KHAMELEON.GL_DETAIL.ENTITY,
SUM (KHAMELEON.GL_DETAIL.AMOUNT) AS "TotalAmt"
FROM KHAMELEON.GL_ACCOUNT, KHAMELEON.GL_DETAIL
WHERE 0=0
<cfif Form.Entity IS NOT "">
AND KHAMELEON.GL_DETAIL.ENTITY = '#Form.Entity#'
</cfif>
AND KHAMELEON.GL_DETAIL.ACCTG_DATE <= '#Form.asofday#-#Form.asofmonth#-#Form.asofyear#'
<cfif Form.accountnum IS NOT "">
AND KHAMELEON.GL_ACCOUNT.ACCOUNT = '#Form.accountnum#'
</cfif>
AND KHAMELEON.GL_ACCOUNT.ACCOUNT=KHAMELEON.GL_DETAIL.ACCOUNT
GROUP BY
KHAMELEON.GL_ACCOUNT.ACCOUNT,
KHAMELEON.GL_DETAIL.ACCOUNT,
KHAMELEON.GL_ACCOUNT.DES1,
KHAMELEON.GL_DETAIL.ENTITY
HAVING SUM(KHAMELEON.GL_DETAIL.AMOUNT)<>0
ORDER BY KHAMELEON.GL_ACCOUNT.ACCOUNT ASC
</cfquery>
<cfif resultInfo.Recordcount eq 0>
No Records Match the Search Criteria.
<cfelse>
<hr/>
<br/>
<table border="1" class="displaytable">
<!--Headings Row-->
<tr>
<th>Account</th>
<th>Description</th>
<th>Entity</th>
<th>Book 1</th>
</tr>
<!--Result Rows-->
<cfoutput query="qActivity">
<tr>
<td>#qActivity.ACCOUNT#</td>
<td>#qActivity.DES1#</td>
<td>#qActivity.ENTITY#</td>
<td style="text-align:right">#NumberFormat('#qActivity.TotalAmt#', "_(999,999,999.99)")#</td>
</tr>
</cfoutput>
I got the following code off of a thread in the forum, but it trys to download the excel file as soon as the query is run (the excel download doesn't work though, it trys to download the actual cfm page instead):
<cfheader name="Content-Disposition"
value="inline; filename=tb.xls">
<cfcontent type="application/vnd.ms-excel">
<table border="2">
<tr>
<td> Account </td><td> Description </td><td> Entity </td><td> Book1 </td>
</tr>
<cfoutput query="qActivity">
<tr>
<td>#qActivity.ACCOUNT#</td><td>#qActivity.DES1#</td><td>#qActivity.ENTITY#</td><td>#NumberFormat('#qActivity.TotalAmt#', "_(999,999,999.99)")#</td>
</tr>
</cfoutput>
</table>
</cfcontent>
Thanks guysqTo actually get the data into excel, google "cold fusion excel poi" and look for Ben Nadel's cfc. Otherwise you might have issues with Office 2007.
For the icon or whatever, make your query a session variable. Then have the icon link to either a self closing popup or a very small iframe that exports the query to an excel file and then uses cfcontent to download it to the user. -
Reg: Downloading the internal table into excel file.
Hi,
My requirement is i am collecting data in the internal table and i have to download the contents in an excel file and i have declared like this.
PARAMETERS : x_test TYPE string
DEFAULT 'C:\temp\file.txt'.
I have given the default file path like this and i am using the function module .
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
FILENAME = OUTPUT_PATH
FILETYPE = 'DAT'
IMPORTING
FILELENGTH =
TABLES
DATA_TAB = INT_INPUT
FIELDNAMES =
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22.
My requirement is i dont want to change my extension as .txt from .exl to my parameter addition and in the function module the file type should be 'dat' only and in the runtime i want to change the file name which i have given in the .
PARAMETERS : x_test TYPE string
DEFAULT 'C:\temp\file.txt' this file.txt into datas.xls.
it would be grateful if some one share some valuable views to wards this query
Thanks and Regards,
KenyHi,
Use this code.
It will ask for the file name...there u can change.
data : l_filename type string,
l_filetype type char10,
l_path type string,
l_fullpath type string.
l_filetype = 'DAT'.
*Get the file name
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
EXPORTING
FILE_FILTER = '*.DAT'
INITIAL_DIRECTORY = 'C:\'
CHANGING
FILENAME = l_filename
PATH = l_path
FULLPATH = l_fullpath
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
others = 4.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
check l_fullpath is not initial.
*Download file
CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
EXPORTING
FILENAME = l_fullpath
FILETYPE = l_filetype
CHANGING
DATA_TAB = t_data_sum[]
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
NOT_SUPPORTED_BY_GUI = 22
ERROR_NO_GUI = 23
others = 24.
IF sy-subrc NE 0.
MESSAGE e398(00) WITH sy-subrc ' Error downloading file' '' ''.
ENDIF.
Regards
Sandeep REddy -
One field is not downloading properly from ALV to EXCEL
Hi,
while downloading ALV out put to EXCEL sheet one field(CSTCTR) is not displaying properly it's truncating left and right side digits,
I have used function REUE_ALV_GRID_DISPLAY
FORM SUMMARY_REPORT .
PERFORM BUILD_FIELDCATLOG.
IF I_FINAL[] IS INITIAL.
MESSAGE I000 WITH 'NO DATA EXIST'.
EXIT.
ENDIF.
ST_SETTINGS-EDT_CLL_CB = 'X'.
V_REPID = SY-REPID.
SORT I_FINAL BY WERKS GEBNR PERNR.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = V_REPID
I_GRID_SETTINGS = ST_SETTINGS
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
IT_SORT = IT_SORT[]
IT_FIELDCAT = IT_FLDCAT[]
IT_EVENTS = IT_EVENTS[]
TABLES
T_OUTTAB = I_FINAL[]
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
ENDFORM. " alv_display summary_report
*& Form build_fieldcatlog
text
FORM BUILD_FIELDCATLOG.
WA_FLDCAT-FIELDNAME = 'WERKS'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'PA'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '1'.
WA_FLDCAT-KEY = 'X'.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'GEBNR'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'LOC'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '2'.
WA_FLDCAT-KEY = 'X'.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'PERNR'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'SAP #'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '3'.
WA_FLDCAT-KEY = 'X'.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'ADPFN'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'ADP #'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '4'.
WA_FLDCAT-KEY = 'X'.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'PERID'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'SSN'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '5'.
WA_FLDCAT-KEY = 'X'.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'KOSTL'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'CSTCTR'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '6'.
WA_FLDCAT-KEY = ' '.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'NACHN'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'LAST NAME'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '7'.
WA_FLDCAT-KEY = ' '.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'VORNA'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'FORST NAME'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '8'.
WA_FLDCAT-KEY = ' '.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'HIREDATE'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'HAL DATE'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '9'.
WA_FLDCAT-KEY = ' '.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'VACDATE'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'VAC DATE'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '10'.
WA_FLDCAT-KEY = ' '.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'GBDAT'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'BIRTHDT'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '11'.
WA_FLDCAT-KEY = ' '.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'SENDAT'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'SRDATE'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '12'.
WA_FLDCAT-KEY = ' '.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'SERADJDAT'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'SVCADJDT'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '13'.
WA_FLDCAT-KEY = ' '.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'TERMDATE'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'TERMDT'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '14'.
WA_FLDCAT-KEY = ' '.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'MGTXT'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'TERM REASON'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '15'.
WA_FLDCAT-KEY = ' '.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'GESCH'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = '***'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '16'.
WA_FLDCAT-KEY = ' '.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'RACKY'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'RACE'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '17'.
WA_FLDCAT-KEY = ' '.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'VTEXT'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'VET STAT'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '18'.
WA_FLDCAT-KEY = ' '.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'EXPAT'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'EXPAT'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '19'.
WA_FLDCAT-KEY = ' '.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'DISAB'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'DISAB'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '20'.
WA_FLDCAT-KEY = ' '.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'PTEXT'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'STAT'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '21'.
WA_FLDCAT-KEY = ' '.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'STELL'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'JOB'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '22'.
WA_FLDCAT-KEY = ' '.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'STLTX'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'JOB TITLE'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '23'.
WA_FLDCAT-KEY = ' '.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'PLANS'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'POSITION'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '24'.
WA_FLDCAT-KEY = ' '.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'PLSTX'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'POSITION T'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '25'.
WA_FLDCAT-KEY = ' '.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'AAPCT'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'JOBGP'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '26'.
WA_FLDCAT-KEY = ' '.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'EEOCT'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'EEO'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '27'.
WA_FLDCAT-KEY = ' '.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'ZBAND'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'BAND'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '28'.
WA_FLDCAT-KEY = ' '.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'EEOEX'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'FLSA'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '29'.
WA_FLDCAT-KEY = ' '.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
*WHEN DIVG
WA_FLDCAT-FIELDNAME = 'BETRG'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'BW/HR'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '30'.
WA_FLDCAT-KEY = ' '.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'ANSAL'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'ANNSAL'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '31'.
WA_FLDCAT-KEY = ' '.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'WOSTD'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'HRS'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '32'.
WA_FLDCAT-KEY = ' '.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'ZBONPLAN'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'PLAN'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '33'.
WA_FLDCAT-KEY = ' '.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
WA_FLDCAT-FIELDNAME = 'ZTARGET'.
WA_FLDCAT-OUTPUTLEN = '10'.
WA_FLDCAT-SELTEXT_M = 'TGT'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
WA_FLDCAT-COL_POS = '34'.
WA_FLDCAT-KEY = ' '.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
ENDFORM. " BUILD_FIELD CATLOGAlso make sure if the reference field name and reference table name in the field cat .
There will be some fields where in when dropped to excel will not hold the field properties and may not download properly,In such cases pass the reference fileds to the field cat .
In the field cat u r using, pass this and check .
WA_FLDCAT-FIELDNAME = ' '. "
WA_FLDCAT-OUTPUTLEN = 'XX'.
WA_FLDCAT-SELTEXT_M = 'XXXXXXXXXXXXXXXXXXx'.
WA_FLDCAT-TABNAME = 'I_FINAL'.
wa_fldcat- -
>reference field name,
wa_fldcat----
>reference table name
WA_FLDCAT-COL_POS = '25'.
WA_FLDCAT-KEY = ' '.
APPEND WA_FLDCAT TO IT_FLDCAT.
CLEAR WA_FLDCAT.
Br,
Vijay. -
Exporting a query report in Excel gives a wrong value.
Hi All,
After running the query report, from the menu path, I do List > Export > Spreadsheet. At that point, you can save the file and Excel opens up. The value for the amount are displaying with additional zeroes
For example 14,000.00 is dispalyed as 14,000,00.00
Please let me know the if you have solution for this are related OSS note for this
Thanks,
Karthikeyan.Hi David,
Thanks for your response.
The OSS notes are related to ALV display where when i check with other ALV program and export it is giving a correct total.Where when i download the qurey report in excel using file-> export to option i am getting a additional zeroes.
Please let me know if there is any other solution for this.
Thanks for your help in advance.
Thanks,
Karthikeyan. -
Background processing- download multiple itabs into one excel with tabs
Hello,
I want to run a report as a background job and download the outputs in excel file into different tabs.
Problem is OLE does not run in background mode.
Are there any other alternatives for that?
I searched the forum and did not get any useful answer for background procesing. All the topics use for foreground processing.
(Old query for reference:- )
[background processing] multiple work sheets in single attachment file
Thanks.Hi,
Even i had the same issue before, what i did is, i written a program which will run in the background and stores the data in application server file, and also it sends the email to user saying that 'the data is soted in application server, to veiw please run the ZXXXX transaction code to view,
The second transaction code is having the OLE code which will download the data into an excel sheets with more than 1 tab.
Thanks
Sudheer -
Formatting problem when downloading classical report output to excel sheet.
Dear Experts,
My classical report o/p looks like:
SI Name ID
1 xyz 11
2 abc 22
3 eet 33
4 jnc 44
When I download the same to a excel sheet from List->Save->file->Spreadsheet and save it.
The formatting looks like this:
SI Name ID
1 xyz 11
2 abc 22
3 eet 33
4 inc 44
That is the heading and column entries are in different columns.
There is no GUI_Download used.
Kindly help what may be the issue.Hi,
In the report output the formatting looks fine. It is exactly below the heading. But only when I save it to excel, this alignment issue is coming. Even the columns after this column are are properly aligned and there is no issue at all. Only this column in the middle has issue. -
To download the query output to falt file
Hi all,
i have a query which i know will give more than 65k records as the output for a selection.
i cannot run this query in excel due to its limitation.
if i run on web i cannot download this as downloading is happening to excel file only.
The customer ideally wants to download the query result to a text file(csv,tab-delimited etc) which inturn it will upload to MS-Access.
How do i achieve this?
SAP has given response use try using these options:
1.open interfaces to receive the output of a query via the MDX language.
2.open hub tool as it is designed for big amounts of data.(i suppose this is not possible as i want to download query output not the data target contents)
how do i achieve my scenario with option 1?
Are there any alternatives??
Any useful help will be rewarded.
Regards,
Dhanya.hi vivek,
thnks for the useful reply.
i have some problem with my ID,hence loggin in through my coleague's ID.
i will assign u points as i get logged in.
I did as u said by downloading it to unconverted format.
the file got download to a text file.where the output has
1.header rows(10 lines almost)
2.the values r coming in single quotes e,g:
'144000023073 'TAAS SETTLEMENT CONV 738 '19333000 '30.09.2006 '0.000
how can i remove all this?
Regards,
Dhanya
I -
Download ICONS from ALV to EXCEL
Dear Friends,
IS there a way of downloading the ICON image exactly
from alv to EXCEL,right now,when the icon is downloaded
from alv to the excel,i can only see ascii characters in
the icon column in the excel.
kind regards
kaushik hegdeHi Jeff,
Please check if following analysis is helpful to you.
Analysis/Solution:
When we export ALV data to excel worksheet, as sap notes say the maximum lenght allowed is 1023 charaters and the max no of columns supported is 90.
(I never faced any issue related to no of columns as it worked fine for columns >90 too)
Issue occured when row size of exported data gets more than 1023 character.
Therefore the row data must not exceed 1023 character, otherwise column splits and moves to next row.
One additional aspect generally missed is that:
When data in any particular column changes it's length, alv header also changes its lengh (short text, medium text, long text; depending on the length of of the longest cell in the column)
therefore even if you have total length of row less than 1023 character, there might be cases when your ALV header size exceeds this length.
Reducing the header size (by forcing to use short text or specifying own header names) should resolve the issue.
Regards,
Parveen -
Steps to save a Query/Report as Excel file in Share folder
Hi,
I have a requirement where i need to schedule a BI report automatically on a daily basis and save it in a Sharepoint folder as a excel file. I have gone through the Forums but didnt get a clear idea on how to proceed this with. I read about RSCRM_BAPI transaction but i hope we need to do this manually to save the file each time. Also, in Broadcaster there are options only to send Email & save in Portal.
So, if anybody have idea on saving a Query/Report as excel file in a Share folder automatically, kindly help me in suggesting the steps to do this activity.
Regards,
MuraliHi
1. Create Three Floders in AL11 i.e. in Apllication Server. Eg Name it F1, F2 and F3.
2. First dump the .csv files into F1. (Name xyz.csv).
3. Then using UNIX/WINDOWS (depends on your OS) script , first check the file is there are not in F1, if yes then rename the file with date and time or date and transfer the files from F1 to F2 i.e xyz06032010.csv.
4. Then Create a small ABAP program to check the file in F2, if it is there then Trigger the Event, and using that event you execute teh PC.
5. Then using UNIX/WINDOWS (depends on your OS) script , transfer the files from F2 to F3 i.e xyz06032010.csv
6. Next day morning F1 and F2 are empty and F3 is having the backup files.
So use this method, I used the similar logic and it is working fine.
Timinings are importent i.e what time you need to dump the fule in F1 and what time you need to run UNIX/WINDOWS (depends on your OS) script , transfer the files from F1 to F2 and what time UNIX/WINDOWS (depends on your OS) script , transfer the files from F2 to F3.
OR
1. Create Two Floders in AL11 i.e. in Apllication Server. Eg Name it F1 and F2
2. First dump the .csv files into F1. (Name xyz.csv)
3. Then load the data using InfoPackage, through PC.
4. At the end of the load Attach a simple Program to Move the xyz.csv file from F1 to F2.
5. So next day the file will come to F1 and the it will load and at the end it will move to F2.
Else you can use simple one or two lines of UNIX/WINDOWS (depends on your OS) script to move the file from F1 to F2 , once you load is over.
While moving the file from F1 to F2 you can append the date at the end of the file and then move to F2, it is use full for future reference.
See Blogs and Article, similar logic...
https://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
How to transfer the Data from SAP-System to Non-SAP system without additional Cost/License
/people/surendrakumarreddy.koduru/blog/2009/03/11/how-to-transfer-the-data-from-sap-system-to-non-sap-system-without-additional-costlicense
To Check the Files/Reports in Application Server and Trigger Mail Alerts.
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/4096bf2d-bcea-2b10-4ab4-e0683830d9b2&overridelayout=true
Thanks
Reddy
Edited by: Surendra Reddy on Mar 12, 2010 6:41 AM -
Result of a Query in an Excel Sheet??
Hi,
I am using sqlplus on Unix environment.
How can I get the results of a query (a multi column select query) into a excel sheet, which I can later SCP to my windows environment.
Kindly reply asap.
Thanks In Advance :)
AbhiYou might be able to use the sqlplus colsep command
http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12040.htm#sthref2716
SQL> set colsep ','
SQL> select * from emp;
EMPNO,ENAME ,JOB , MGR,HIREDATE , SAL, COMM, DEPTNO
7369,SMITH ,CLERK , 7902,17-DEC-80, 800, , 20
7499,ALLEN ,SALESMAN , 7698,20-FEB-81, 1600, 300, 30
7521,WARD ,SALESMAN , 7698,22-FEB-81, 1250, 500, 30
7566,JONES ,MANAGER , 7839,02-APR-81, 2975, , 20
7654,MARTIN ,SALESMAN , 7698,28-SEP-81, 1250, 1400, 30
7698,BLAKE ,MANAGER , 7839,01-MAY-81, 2850, , 30
7782,CLARK ,MANAGER , 7839,09-JUN-81, 2450, , 10
7788,SCOTT ,ANALYST , 7566,09-DEC-82, 3000, , 20
7839,KING ,PRESIDENT, ,17-NOV-81, 5000, , 10
7844,TURNER ,SALESMAN , 7698,08-SEP-81, 1500, 0, 30
7876,ADAMS ,CLERK , 7788,12-JAN-83, 1100, , 20
7900,JAMES ,CLERK , 7698,03-DEC-81, 950, , 30
7902,FORD ,ANALYST , 7566,03-DEC-81, 3000, , 20
7934,MILLER ,CLERK , 7782,23-JAN-82, 1300, , 40
14 rows selected.
SQL> -
Hide the query name in the workbook
Hi Experts,
I have a workbook and contains four worksheets defained from the same query.whenever i run the workbook the query name is displaying in the worksheet.My requirement is to hide the query name from worksheets outputs after the workbook executes.
RegardsHi,
Open the orkbook. go to settings (Bex tool bar)> uncheck 'olap functions with right click'->Hide the header row of the workbook (using excel functionality..i.e right click on row>hide)->now enable 'olap functions with right click'-->save the workbook...
you will not see workbook name after refresh.
Maybe you are looking for
-
I seem to be getting this message fairly regularly. Even on start-up, I get a message in half a dozen languages, stating the the computer shutdown due to an error. I have spoken to support and conducted a disk repair but the next day it happened ag
-
How can I find out how many pros intend to use FCP X?
I work at a school and we have been teaching FCP 6 as part of a Multimedia program. Our goal is to provide training to students so they can continue on with a degree, or gain enough basic skills to get employment. I am now a bit concerned with FCP X.
-
Can't Send Picture's in iMessage
All of a sudden, I am unable to send picture's to anyone that is using iMessage. I have to send them as text messages. Any ideas?
-
How do you run a query to view duplicate records?
I need to run a query with the query generator to produce a list of matching records. We have a problem whereby sales orders can come in by phone and email and therefore they sometimes get put on the system twice. I need to produce a query which pick
-
Please help with ejecting disk from MBP that won't book
I was in the middle of installing a Leopard update when my MBP froze. Since I had to tunr it off, it now won't start up. I tried a friends OSX install disk to get it working and it won't install. Please help me eject the disk. No matter what I do I c