ALV Heading truncated when downloading to excel
Hi,
While downloading the ALV Grid output to Excel, the headings are getting truncated even I have given output length max.
Any one please let me know how to fix this in OO ALV - existing program using CL_SALV_COLUMN class for setting column texts, output length.
One of SCN thread stating to use DDICTXT, but that is in fieldcatalog - FM model. Is there any equal method in OO ALV.
Thanks,
Chandra.
Maybe you can declare the Field of your internal table a bit bigger? For example if the field has a length of 15, declare it as 20? This might help for the heading.
Similar Messages
-
Hyperlink in ALV output and when downloaded to Excel, maintain that hyperli
Hi SAP Friends,
I want to know if this is possible. My requirement is, display a column with Invoice # and hyperlink (or you can call it as Hotspot in SAP language). When clicked on the hyperlink, it should open a webpage, giving details of Invoice. I tried testing BCALV_GRID_VERIFY program. I can see hyperlink in ALV output and when I click, it opens a webpage. However, when I down load data to Excel using Excel inplace, hyperlink is gone. Only data is down loaded. How can we make it happen that hyperlink is maintained even after downloading data from ALV ?
Any ideas ?
NiranjanWaiting for any suggestions from users.
Niranjan -
ALV Heading truncating - Excel
Hi,
When downloading ALV output to excel, the headings the getting truncated.
Program is using CL_SALV_TABLE for ALV processing.
Can any one help on how to fix this.
In general fieldcatalog there is a field - DDICTXT by which we can pass 'L'/'M'/'S' - is there any thing available in OO ALV so that to fix this issue.
Thanks,
Chandra.Hi Chandra,
If it is through program then try to set the column text as below
gr_column ?= gr_columns->get_column( lv_col_text ).
gr_column->set_medium_text( lv_med_text ).
gr_column->set_long_text( lv_lng_text ).
gr_column->set_short_text( lv_shrt_txt ).
This will set the text to the column of ALV for a respective field.
Regards,
Rafi -
Header of ALV with space when exported to excel using Standard ALV
Hi,
I am Using Reuse alv grid display to dispaly my report and it works fine and I am using the standard SAP application tool to export it to excel.
But for some of the header fields I am getting space in the excel sheet but there is no space while displaying through ALV.
I am using the following field catalog for the same.
wa_fieldcat-col_pos = 10.
wa_fieldcat-fieldname = 'SOLLWERT'.
wa_fieldcat-seltext_l = 'text-t10'. "Target value (* this has no space here)
wa_fieldcat-outputlen = 32.
wa_fieldcat-colwidth_optimize = 'X'.
APPEND wa_fieldcat to it_fieldcat.
but there are still space for this Colomn when exported to excel if after optimizing the column.
kindly suggest what field needs to be passed to the field catalogoe to avoid spaces in excel for the header.
Thanks
Riteshhey all,
Thanks everyone for the reply.
I am using the foloowing field cat:
l_col_pos = l_col_pos + 1.
wa_fieldcat-col_pos = l_col_pos.
wa_fieldcat-outputlen = 32.
wa_fieldcat-fieldname = 'SOLLWERT'.
wa_fieldcat-inttype = 'P'.
* wa_fieldcat-tabname = 'i_final'.
wa_fieldcat-seltext_l = text-t11. "Target Value
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
I have use this also in the field cat but stil i get space in the excel header.
wa_fieldcat-REF_FIELDNAME = 'SOLLWERT'.
* wa_fieldcat-REF_TABNAME = 'QAMV'.
Also the space comes with the descrip[tion in the cell of excel.
its like [space Target Value] and i dont need this Space.
I have also used wa_layout-colwidth_optimize = 'X'. but it doesnt wrk.
Please suggest -
PO history report when downloaded in excel it truncates last digit of vendo
Hi,
We have a customized report developed for PO history.When executed ,it displays the report.However when we transport that to excel spreadsheet,surprisingly the vendor number gets truncated at the last meaning the last digit of the vendor number doesnot show up.
However in Quality,when downloaded,it looks perfectly okay.
What could be the possibility.
Please suggest
Thanks in advance
MBHI,
Let me share my experience regarding your situation. Last time I like to download reports from SAP to spreadsheet, however, the result not satisfy. What I did, download first using HTML format then from this file, I opened with excel and save it in excel format. As result the perfect report came out, my advice please try what I have done before.
Hope this help
Mahnansa -
NO header detail appears when downloading to excel from web template
When we run our queries via a web template and through the portal we get the results which shows the query title and report details. When we try to download this to excel the header(report title etc. )information doesn't come down but all the rest of the report does. If we go in again and change the variable values for characteristics (query is being changed and run the web template (via portal)again and download to excel the header (report title etc.)the whole report title and report detail now appear. Looking for someone who has resolved this problem.
For anyone who is interested, this was caused by our email client, not BIP.
-
ALV grid toolbar - standard download to excel error
Hi Experts,
In my ALV grid report, when i click on the standard ALV toolbar to download the output to excel file, the data gets downloaded fine execpt for one field called serial number. It is of size 18 chars.
The last number on this field is getting truncated when it is downloaded to excel. Only 17 characters is being shown. There is no output lenght specification in the field catalog. The column width optimize property is also not set. Any ideas on what might be the problem?
CheersHi,
Check this link:
Re: Digit missing in the alv export
Hope this helps.
Regards,
Satish Kanteti -
Column values truncating when exported to excel from OBIEE dashboard
Hi,
I am fairly new to OBIEE. recently I am facing an issue, when I try to export a report using the download to Excel or download to excel2000 option, one of the 18 digit column value is truncated to exponential value. Like for example the column is ESN with 18 digit numbers like 268235457500823991. But when I export it I get only 268235457500823000 or 2.68235E+17. Please help what could have been the issue.....
Thanks in advance!Convert it to text before you export it.
regards
John
http://obiee101.blogspot.com -
ALV cell translation when exporting to excel
Hi,
I am displaying an ALV with first column as traffic signal. When I export the ALV data to excel, nothing is displayed under traffic signal column.
My question is: When we are exporting ALV to Excel, can we substitute text for either red or yellow or green traffic signals?
For example:
If my first row in ALV is displaying traffic Red signal then when we export that to excel, in place of traffic Red Signal text 'NO' should be displayed.
If my second row in ALV is displaying traffic green signal then when we export that to excel, in place of traffic green Signal text 'YES' should be displayed.
Thanks in advance.Hi
I think we can't customize the SAP provided functionality to download in Excel from ALV grid.
Instead, we can create a button in application toolbar and we can add our customizing code when the
button is clicked, under user_command coding part.
For each icon (for traffic signal also), there will be four char code (like @OC@) in the ICON type pool.
In your code (for button in application toolbar), you have to check the value (for four char code) and
you can provide value (like NO) for that traffic signal (like RED).
But, in this method you have to take care about the data download from ALV grid to EXCEL.
Satya. -
ALV Report Error while downloading to Excel
Hi All,
when i downloading to Excel from a alv grid following message has been displayed.
Template not found in BDS - Layout: Template-
Guid:
please give me any solution to download the report to excel
Thanks & Regards
Ramu GHi,
Standard Function code for Download to Excel Icon used '&VEXCEL'(Microsoft Excel) instead of '&XXL'(Spreadsheet...) it solved my problem.
Thanks & Regards
Ramu Ganji -
Only Current Date showing when downloading to excel
<b>Hi,
I have a query is attached to a template, when I download to excel it only downloads the current date. I have dates ranging from 2001-2006, and it downloads to excel it only downloads the current year of 2006. When I run this query on the SAP template it downloads fine. We are currently using a different excel download the "white paper SAP print strategy approach" that the SAP template does not use. Does anyone experience this same problem? I appreciate your feedback! thanks so much!
</b><b>Hi,
I have a query is attached to a template, when I download to excel it only downloads the current date. I have dates ranging from 2001-2006, and it downloads to excel it only downloads the current year of 2006. When I run this query on the SAP template it downloads fine. We are currently using a different excel download the "white paper SAP print strategy approach" that the SAP template does not use. Does anyone experience this same problem? I appreciate your feedback! thanks so much!
</b> -
Logo seen in report Title is not properly alligned when downloaded to Excel
Hi All,
Iam facing an issue with Download to Excel link on my OBIEE report.
When I download my report to Excel which has a logo in the report title, in the excel sheet the logo occupies all the cells till the end of the report columns and my report title is seen after those columns.
Can you please suggest a solution or a workaround for this.
Many Thanks in adavnce.
Suman
Edited by: Suman B on Sep 20, 2010 4:10 AMhi
Suman
i am also faced same problem. if u got any solution for this post
let me know
Advance Thanks
Satya -
Cuts off leading zeros in a report column when "Download to Excel" function
Hello
When a text column contains leading zeros for example "000250" the download to Excel stores the string as "250" in the spreadsheet. I am using a column which is a string.(varchar)
Can somebody suggest me , how to go ahead with it
Thanks
Edited by: user647228 on Sep 11, 2008 1:40 PM
Edited by: user647228 on Sep 11, 2008 1:42 PM(To Vins) Actually, concatenating a space doesn't do it. When the file is downloaded into Excel, the leading space is ignored and it the leading zeroes are still trimmed.
To user647228: A non-space character needs to be concatenated. Regarding what character to append, I would give the following consideration: If the users are content with seeing an added character to the "number," you can append say an underscore "_" and Excel will download the number properly. It's fairly unobtrusive and can be "visually ignored."
If the end user insists on gettin rid of the extra character once the file is downloaded, I would append a character that is rarely, if not never, used in the report. (This ensures or mitigates replacing other instances of the character.) Then you can do a Replace All in Excel to replace the extra character with a single apostrophe. The single apostrophe will be interpreted by Excel to mean "text" and the appearance will change to exactly what is desired.
Note: Replacing the extraneous character with a space for example, will result in the leading zeroes being again lopped off by Excel... -
Problem with CITY field when downloading to excel
Hi Gurus,
I have CITY field which is of 30 char length.Now Iam downloading the record having other fields also along with city field....Now my requirement is that in the Excel the city field should be right justified and the remaining characters should be space....How can we do that...
Generally I know that when We download to excel the fields adjust according to the data it has rather then with thier field size in SAP.
Regards,
Rohan.Hi,
In case of standard objects, it would be better if you can share the details like report name, the way you tried downloading(From menu, tool bar etc). Also search if there is any OSS notes for that program.
Thanks,
Vinod. -
Short Dump when downloading to EXCEL from ALV
Hi,
I have an ALV grid display program. The data in the grid is displayed correctly. But when trying to download the data to excel it gives a short dump.
Assignment error: Overwriting a protected field.
What happened?
Error in ABAP application program.
The current ABAP program "SAPLKKBL" had to be terminated because one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
Some times it allows to download the data, but sometimes it gives short dump.
Thanks,
DeepthiThis is my part of the code:
i_fieldcat-key = gc_x.
i_fieldcat-no_zero = gc_x.
i_fieldcat-fix_column = 'X'.
i_fieldcat-hotspot = gc_x.
perform bild_fieldcat using
'' 'AUFNR' 'GT_REPORT ' ' ' 'CAUFV' ' ' 'C' '12' ' '.
perform bild_fieldcat using
'' 'DISGR' 'GT_REPORT ' ' ' 'MARC' ' ' 'C' '4' ' '.
perform bild_fieldcat using
'' 'AUART' 'GT_REPORT ' ' ' 'CAUFV' ' ' 'C' '04' ' '.
perform bild_fieldcat using
'' 'DISPO' 'GT_REPORT ' ' ' 'CAUFV' ' ' 'C' '06' ' '.
i_fieldcat-no_zero = gc_x.
perform bild_fieldcat using
'' 'MATNR' 'GT_REPORT ' ' ' 'MARA' ' ' 'C' '18' ' '.
i_fieldcat-no_zero = gc_x.
perform bild_fieldcat using
'' 'CHARG' 'GT_REPORT ' ' ' 'MDFA' ' ' 'C' '14' ' ' .
*begin insert RCHALASA
i_fieldcat-no_zero = gc_x.
i_fieldcat-fix_column = 'X'.
perform bild_fieldcat using
'' 'FTRMI' 'GT_REPORT ' ' ' 'CAUFV' ' ' 'D' '08' ' '.
*end insert
i_fieldcat-no_zero = gc_x.
i_fieldcat-fix_column = 'X'.
perform bild_fieldcat using
'' 'GLTRP' 'GT_REPORT ' ' ' 'CAUFV' ' ' 'D' '10' ' '.
i_fieldcat-no_zero = gc_x.
perform bild_fieldcat using
'' 'GLTRS' 'GT_REPORT' ' ' 'CAUFV' ' ' 'D' '10' ' '.
perform bild_fieldcat using
'' 'GSTRP' 'GT_REPORT' ' ' 'CAUFV' ' ' 'D' '10' ' '.
perform bild_fieldcat using
'' 'AGE' 'GT_REPORT' ' ' ' ' 'Age' 'C' '08' ' '.
i_fieldcat-no_zero = gc_x.
i_fieldcat-do_sum = gc_x.
i_fieldcat-fix_column = 'X'.
perform assign_alv_qty_format.
perform bild_fieldcat using
'' 'GAMNG' 'GT_REPORT' ' ' ' ' 'Order Qty' 'QUAN' '09' ' '.
perform bild_fieldcat using
'' 'STK_PROD_FLAG' 'GT_REPORT' ' ' ' ' 'Stk/Prod' 'C' '06' ' '.
i_fieldcat-no_zero = gc_x.
i_fieldcat-do_sum = gc_x.
i_fieldcat-fix_column = 'X'.
perform assign_alv_qty_format.
perform bild_fieldcat using
'' 'IGMNG' 'GT_REPORT' ' ' ' ' 'Order Yield Qty' 'QUAN' '11' ' '.
i_fieldcat-no_zero = gc_x.
i_fieldcat-do_sum = gc_x.
i_fieldcat-fix_column = 'X'.
perform assign_alv_qty_format.
perform bild_fieldcat using
'' 'IASMG' 'GT_REPORT' ' ' ' ' 'Order Scrap Qty' 'QUAN' '11' ' '.
**begin insert RCHALASA
perform bild_fieldcat using
'' 'YIELD_PER' 'GT_REPORT' ' ' ' ' 'Yield' 'C' '05' ' '.
**end insert
DATA: col_pos like sy-colno.
col_pos = '17'.
loop at gt_oper.
gv_tabix = sy-tabix.
i_fieldcat-no_zero = gc_x.
i_fieldcat-do_sum = gc_x.
i_fieldcat-fix_column = 'X'.
col_pos = col_pos + 1.
perform assign_alv_qty_format.
gv_yield6(03) = gt_oper-vornr1(03).
*begin insert RCHALASA
move gt_oper-ltxa1 to gv_text.
translate gv_text to upper case.
gv_text = gv_yield.
*end insert
gv_tabixn = gv_tabix.
gv_yield+6(03) = gv_tabixn.
gv_fieldname = gv_yield.
translate gv_fieldname to upper case.
perform bild_fieldcat using
'' gv_fieldname 'GT_REPORT' ' ' ' ' gv_text 'QUAN' '04' ' '.
perform assign_alv_qty_format.
gv_scrap6(03) = gt_oper-vornr1(03).
select single
grdtx
from trugt
into gv_text1
where
grund = gt_oper-vornr
and werks in s_werks.
gv_text = gv_scrap.
i_fieldcat-no_zero = gc_x.
gv_tabixn = gv_tabix.
gv_scrap+6(03) = gv_tabixn.
gv_fieldname = gv_scrap.
translate gv_fieldname to upper case.
perform bild_fieldcat using
gv_fieldname 'GT_REPORT' ' ' gv_text1 'X' 'QUAN' '08' ' '.
clear gv_text1.
endloop. " GT_OPER
DATA: count type c.
DESCRIBE table gt_grund lines count.
loop at gt_grund into gl_grund.
gv_tabix = sy-tabix.
i_fieldcat-no_zero = gc_x.
i_fieldcat-do_sum = gc_x.
i_fieldcat-fix_column = 'X'.
perform assign_alv_qty_format.
if gl_grund-grund is initial.
gl_grund = 'NONE'.
gv_text = gl_grund.
else.
gv_text = gl_grund-grdtx.
endif.
gv_tabixn = gv_tabix.
gv_scrap_code+11(03) = gv_tabixn.
gv_fieldname = gv_scrap_code.
translate gv_fieldname to upper case.
col_pos = col_pos + 1.
perform bild_fieldcat using
'' gv_fieldname 'GT_REPORT' 'XMNGA' 'AFRU' gv_text 'QUAN' '12' ' ' .
endloop. " GT_OPER
gb_layout-zebra = 'X'.
gb_print-no_print_listinfos = 'X'.
gb_variant-variant = p_varia.
perform create_events using gt_events[].
call function 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
text = 'Reading SAP Records.......'(600).
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gv_repid
i_callback_top_of_page = 'TOP_OF_PAGE'
i_callback_pf_status_set = 'SET_STATUS'
i_callback_user_command = 'CALL_UP_SAP_TRANS'
it_fieldcat = i_fieldcat[]
is_layout = gb_layout
i_grid_title = gb_title
i_default = 'X'
i_save = 'X'
is_variant = gb_variant
is_print = gb_print
it_events = gt_events[]
tables
t_outtab = gt_report
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.
***********ALV SUBROUTINE**************
TYPE-POOLS: slis.
DATA: gv_repid LIKE sy-repid.
DATA: i_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
DATA: gb_layout TYPE slis_layout_alv.
DATA: gb_selfield TYPE slis_selfield.
DATA: gb_print TYPE slis_print_alv.
DATA: i_sort TYPE slis_t_sortinfo_alv WITH HEADER LINE.
DATA: gv_keyinfo TYPE SLIS_KEYINFO_ALV.
DATA: gb_variant LIKE disvariant,
gb_def_variant LIKE disvariant.
DATA: gb_title(70).
DATA: gt_events TYPE slis_t_event,
gt_sort TYPE SLIS_T_SORTINFO_ALV,
gt_list_top_of_page TYPE slis_t_listheader,
g_status_set TYPE slis_formname VALUE 'PF_STATUS_SET',
g_user_command TYPE slis_formname VALUE 'USER_COMMAND',
g_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE',
g_end_of_page TYPE slis_formname VALUE 'END_OF_PAGE',
g_top_of_list TYPE slis_formname VALUE 'TOP_OF_LIST',
g_end_of_list TYPE slis_formname VALUE 'END_OF_LIST'.
DATA: it_event_exit TYPE slis_t_event_exit WITH HEADER LINE.
*--- Rotinas ---
FORM alv_init.
CLEAR: gb_variant.
gv_repid = sy-repid.
gb_variant-report = gv_repid.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = gb_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 0.
p_varia = gb_variant-variant.
ENDIF.
ENDFORM. " ALV_INIT
FORM alv_f4.
gb_variant-report = gv_repid.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = gb_variant
i_save = 'A'
IMPORTING
es_variant = gb_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 2.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
p_varia = gb_variant-variant.
ENDIF.
ENDFORM. " ALV_F4
FORM bild_fieldcat USING x_pos x_field x_tab x_reffld x_ref x_text x_type x_tam x_sym.
i_fieldcat-col_pos = x_pos.
i_fieldcat-fieldname = x_field.
i_fieldcat-tabname = x_tab.
i_fieldcat-ref_fieldname = x_reffld.
i_fieldcat-ref_tabname = x_ref.
i_fieldcat-seltext_l = x_text.
i_fieldcat-seltext_m = x_text.
i_fieldcat-seltext_s = x_text.
i_fieldcat-ddictxt = 'M' .
i_fieldcat-inttype = x_type.
i_fieldcat-outputlen = x_tam.
i_fieldcat-symbol = x_sym.
APPEND i_fieldcat.
CLEAR i_fieldcat.
ENDFORM. " BILD_FIELDCAT
FORM create_events USING rt_events TYPE slis_t_event.
DATA: ls_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = rt_events.
READ TABLE rt_events WITH KEY name = slis_ev_top_of_page
INTO ls_event.
IF sy-subrc = 0.
MOVE g_top_of_page TO ls_event-form.
APPEND ls_event TO rt_events.
ENDIF.
ENDFORM. "
Maybe you are looking for
-
Found solution for connection problems iPod Nano 3rd gen to Windows Vista!!
Hello people! I just found a solution to connection problems with iPod Nano 3rd generation when connecting it to a Windows Vista machine. Because of 'security reasons', Vista asks you to check the drive for errors when connecting the iPod. The thing
-
Keychain won't remember WEP password
every time I try and get mail or connect to the internet via airport this machine fails, and after going through network diagnostics requires me to enter the WEP password ... EVERY TIME ... very annoying. I check the "remember this password" box (eve
-
FIM 2010 R2 Sp1, Windows 2008 R2 SP1 and Recycle Bin issues
Hi, We are running FIM 2010 R2 Sp1 (build 4.1.3613.0) Also running Windows 2008 R2 Forest and Domain functional level environment. (Windows Server 2008 R2 SP1 on all DCs). The previous Recycle Bin hotfix https://support.microsoft.com/en-us/kb/979214/
-
What do I do? I dropped my iphone 4 in a cup of juice. Only the bottom was submerged. I turned it off immediately. THe speakers sound like they are busted like when you bust speakers in a car. When it rings it is ringing and vibrating and cutting in
-
Everytime I try to open my itunes it reads: itunes has encountered a problem and needs to close. Sorry for the inconvenience. How can I fix this problem? I need Music.