Quantcast
Channel: SCN : Document List - ABAP Development
Viewing all articles
Browse latest Browse all 935

Display data with Prefix Zero's in an Excel Sheet

$
0
0

Types : begin of ty_final,

         a type string,

         end of ty_final.

 

data  : b type mara-matnr.

 

data : it_final type TABLE OF ty_final,

        wa_final type ty_final..

 

 

b = '0000147'.

concatenate '=REPLACE("' b '",1,7,"' b '")' into wa_final-a.

append wa_final to it_final.

clear: b, wa_final.

 

b = '0000167'.

concatenate '=REPLACE("' b '",1,7,"' b '")' into wa_final-a.

append wa_final to it_final.

clear: b, wa_final.

 

b = '0000747'.

concatenate '=REPLACE("' b '",1,7,"' b '")' into wa_final-a.

append wa_final to it_final.

clear: b, wa_final.

 

CALL FUNCTION 'GUI_DOWNLOAD'

   EXPORTING

     filename                        = 'd:/excel.xls'

   tables

     data_tab                        = it_final.

           .

IF sy-subrc <> 0.

* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>