06-10-2019 8:55 AM
HI everyone,
I displayed traffic lights in alv using cl_gui_alv_grid . when i am trying to downlaod alv output into xl traffic symbols are not coming, instead @09@ values are coming. But i need traffic symbols. plz can anyone help me.
06-13-2019 3:16 PM
Thanks for all the answers. I resolved this issue by using ole.
1.we need to download traffic lights icons into local pc by using "cl_bds_document_set" class
"get_with_files" method.
2.we need to insert icon into xl cell, whenever it going to fill by using "insert" method in ole
06-10-2019 2:37 PM
Which tool did you use to download data (Use a html filetype, so Abap will also export some gif from /sap/public/bc/icons (Mime repository) and link to those in the html document that you can open with Excel for example)
06-10-2019 2:53 PM
06-10-2019 3:57 PM
Thanks for ur response, but in my system in does not show any for mhtml format. it directly file position. soo can u please tell whats the back end behaviour under mhtml format...
06-10-2019 4:06 PM
06-10-2019 3:58 PM
Tqs for ur response. can u plz tell me one thing is it possible with ole . if is it then how??
06-11-2019 1:36 AM
For standard ALV, you cant download to excel and its image. you have to handle download event and get the image yourself.
In the BCALV_GRID_04 demo which Nawanandana Edirisinghe mentioned, the light column is defined as exception column then when you download to MHTML, it become image. For exception column code, you can check below blog:
https://blogs.sap.com/2015/02/23/alv-list-output-exception-column/
the behavior when download to MHTML is quite the same with other format:
cl_salv_bs_lex=>export_from_result_data_table(
exporting
is_format = l_lean_export_format "Here is file format (MTHTML)
ir_result_data_table = lr_result_data "Here is ALV result data
importing
er_result_file = l_xml "download file in xstring
et_export_errors = lt_errors
es_filename = l_filename
es_file_extension = l_file_extension
06-11-2019 8:24 AM
Of course it's possible, you will have to first download the icons from SAP mime repository and paste those in the corresponding cells. Try to perform a macro recording when inserting a picture in an excel cell and then convert VBA to Abap.
06-11-2019 8:27 AM
You could also execute the mhtml export with methods such as
Perform some trace during an export (or use search tool and where-used search on those methods)
06-11-2019 10:50 AM
Can you please send me the sample code for inserting traffic symbols different for every cell.
i mean how to insert perticular image into perticular cell
06-12-2019 1:51 PM
06-13-2019 3:16 PM
Thanks for all the answers. I resolved this issue by using ole.
1.we need to download traffic lights icons into local pc by using "cl_bds_document_set" class
"get_with_files" method.
2.we need to insert icon into xl cell, whenever it going to fill by using "insert" method in ole