cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to see more than 15 digits in excel from WebUI

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

dharmakasi
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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

dharmakasi
Active Contributor
0 Kudos

HI Nitish,

Oh, you are not using transformations.

What is the input structure you are passing to FM SCMS_TEXT_TO_XSTRING but i do not think you can change the field property using this FM.

Best Regards,

Dharmakasi.

Former Member
0 Kudos

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

dharmakasi
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

Hi Dharmakasi,

  Thanks for your quick reply. Can you let me know the steps to create XSLT transformation ? I will try above mentioned procedure.

Thanks & Regards,

Nitish

dharmakasi
Active Contributor
0 Kudos

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-

formatting-options-using-xslt

Former Member
0 Kudos

Hi Dharmakasi,

  Thanks a lot finally my problem got solved after generating XMLString with the use of 'xslt transformation' converted XMLString to xstring.

Thanks & Regards,

Nitish

Answers (0)