Posted: Wed Apr 18, 2012 10:37 am Post subject: Alv Grid - выгрузка в Excel
Добрый день!
Подскажите плиз с таким вопросом:
Имеется отчет созданный с помощью OOP ALV-Grid при выгрузке в Excel числовой формат, выгружается как в Сапе то есть тысячи разделены точками и минус сзади, А как сделать чтоб при выгрузке в Excel точки убирались и минус переносился в перед?
Age: 48 Joined: 25 Jan 2008 Posts: 580 Location: Москва
Posted: Thu Apr 19, 2012 10:08 am Post subject:
А какой формат для выгрузки вы использовали?
Quote:
Exporting to Spreadsheets
Use
You can export the list as various spreadsheet formats. The following list summarizes the most important of these formats and the corresponding file name extension for the files:
Format File Name Extension
Excel (in MHTML format) MHTML
Excel (in MHTML format for 2000/97) MHTML
Star Office (in ODS format 1.0) ODS
Excel (in Office 2003 XML format) MHTML
SAP-internal XML format XML
SAP standard (internal table) XML
Excel (in previous XXL format) XLS
Удав, я использовала стандартный тул бар ALV Grid для выгрузки
Но у меня получилось выгрузить как я хочу с помощью - XXL_FULL_API
Я в алв гриде добавила свою кнопку экспорта, а потом на основе ниже приведенного примера с делала выгрузку по ивенту на кнопке
Code:
REPORT Excel.
TABLES:
sflight.
* header data................................
DATA :
header1 LIKE gxxlt_p-text VALUE 'Suresh',
header2 LIKE gxxlt_p-text VALUE 'Excel sheet'.
* Internal table for holding the SFLIGHT data
DATA BEGIN OF t_sflight OCCURS 0.
INCLUDE STRUCTURE sflight.
DATA END OF t_sflight.
* Internal table for holding the horizontal key.
DATA BEGIN OF t_hkey OCCURS 0.
INCLUDE STRUCTURE gxxlt_h.
DATA END OF t_hkey .
* Internal table for holding the vertical key.
DATA BEGIN OF t_vkey OCCURS 0.
INCLUDE STRUCTURE gxxlt_v.
DATA END OF t_vkey .
* Internal table for holding the online text....
DATA BEGIN OF t_online OCCURS 0.
INCLUDE STRUCTURE gxxlt_o.
DATA END OF t_online.
* Internal table to hold print text.............
DATA BEGIN OF t_print OCCURS 0.
INCLUDE STRUCTURE gxxlt_p.
DATA END OF t_print.
* Internal table to hold SEMA data..............
DATA BEGIN OF t_sema OCCURS 0.
INCLUDE STRUCTURE gxxlt_s.
DATA END OF t_sema.
* Retreiving data from sflight.
SELECT * FROM sflight
INTO TABLE t_sflight.
* Text which will be displayed online is declared here....
t_online-line_no = '1'.
t_online-info_name = 'Created by'.
t_online-info_value = 'SURESH KUMAR PARVATHANENI'.
APPEND t_online.
* Text which will be printed out..........................
t_print-hf = 'H'.
t_print-lcr = 'L'.
t_print-line_no = '1'.
t_print-text = 'This is the header'.
APPEND t_print.
t_print-hf = 'F'.
t_print-lcr = 'C'.
t_print-line_no = '1'.
t_print-text = 'This is the footer'.
APPEND t_print.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.