Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

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.