on 11-26-2014 11:51 AM
Hi All,
I have to display internal table data to excel as a attachment in WebUI after download data to excel not able to see numbers more than 15 digits any solution for convert excel cells as text format before downloading data.
Ex: Instead of this '4000000000000000123' excel output showing '4E+25'.
Thanks & Regards,
Nitish
Hi Nitish,
How you are downloading the abap data, is it using xslt transformation? You can check the particular field in xslt transformation and assign the string type Style ID to it.
Br Dharmakasi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dharmakasi,
Thanks a lot for your quick reply. I am using FM 'SCMS_TEXT_TO_XSTRING' to convert internal table to xstring. Finally passing xstring data to entity.
lr_doc->set_property_as_string( iv_attr_name = 'FILENAME'
iv_value = lv_value ).
lr_doc->set_property_as_string( iv_attr_name = 'CONTENT_TYPE'
iv_value = 'application/msexcel' ).
lv_description = lv_file_name.
lr_doc->set_property_as_string( iv_attr_name = 'DESCRIPTION'
iv_value = lv_description ).
lr_doc->set_property( iv_attr_name = 'CONTENT'
iv_value = iv_xstring ).
Thanks & Regards,
Nitish
Hi Dharmaksai,
I am passing below mentioned structure as input to the FM.
data: lt_con TYPE lvc_t_1022,
ls_con TYPE LINE OF lvc_t_1022,
i_contents_bin(1022) TYPE c.
LOOP AT lt_data INTO ls_data.
CONCATENATE ls_data-f1 ls_data-f2 ls_ls_data-f3 ls_ls_data-f4
INTO i_contents_bin SEPARATED BY c_tab1.
MOVE i_contents_bin TO ls_con.
APPEND ls_con TO lt_con.
CLEAR: ls_con.
ENDLOOP.
CALL FUNCTION 'SCMS_TEXT_TO_XSTRING'
IMPORTING
buffer = t_xstring
TABLES
text_tab = lt_con
EXCEPTIONS
failed = 1
OTHERS = 2.
Is there any changes need to be done ?
Thanks & Regards,
Nitish
Hi Nitish,
In general when you pass value to excel sheet cell system will consider field property as General field, this is one of the reason we will use xslt transformation to get the output as per the requirements. you just try below option, otherwise you have to go with transformation.
You can try converting the field into type i before doing the concatenation to the i_contents_bin.
suppose
if you want to see ls_data-f2 this field, define one new variable type i and then use conversion_exit_alpha_input fm by giving input as ls_data-f2 and out put new variable. Use this variable in concatenate statement instead of structure vairble.
Best Regards.
Dharmakasi.
HI Nitish,
You can find clrear documentation in below link for the xslt transformation creation.
http://scn.sap.com/people/manikandan.jeyaram/blog/2013/09/11/download-ms-excel-with-
User | Count |
---|---|
7 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.