Posted By

qrist0ph on 06/09/10


Tagged

abap


Versions (?)

SAP CSV Export


 / Published in: Other
 

  1. REPORT ZCA_TEST1.
  2.  
  3. TYPE-POOLS: truxs.
  4. DATA: ITAB TYPE STANDARD TABLE OF zins_docre.
  5. DATA: ITAB1 TYPE TRUXS_T_TEXT_DATA.
  6.  
  7. SELECT *
  8. UP TO 5 ROWS
  9. FROM zins_docre
  10. INTO TABLE itab.
  11.  
  12. CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
  13. EXPORTING
  14. i_field_seperator = ';'
  15. TABLES
  16. i_tab_sap_data = itab
  17. CHANGING
  18. i_tab_converted_data = itab1
  19. EXCEPTIONS
  20. conversion_failed = 1
  21. OTHERS = 2.
  22.  
  23.  
  24. CALL FUNCTION 'GUI_DOWNLOAD'
  25. EXPORTING
  26. filename = 'C:\TeMP\test.CSV'
  27. TABLES
  28. data_tab = itab1
  29. EXCEPTIONS
  30. OTHERS = 1.

Report this snippet  

You need to login to post a comment.