mirror of
https://github.com/abap2xlsx/abap2xlsx.git
synced 2025-05-04 15:16:21 +08:00
Move complete documentation #589
This commit is contained in:
parent
fd21ed8757
commit
7ea26da291
37
docs/F.A.Q..md
Normal file
37
docs/F.A.Q..md
Normal file
|
@ -0,0 +1,37 @@
|
|||
* Verify the version that you have installed
|
||||
|
||||
Starting from version 7.0.1 we introduced the version tracking.
|
||||
To verify the version that you have installed in your system just generate a demo report and verify the properties of the generated XLSX file. In field description you should find the current version.
|
||||
You can also check the attribute VERSION in the class ZCL_EXCEL.
|
||||
|
||||
* After import error "Interface method are not implemented" is thrown
|
||||
|
||||
This is by a well know problem with SAPLink, Import nugget twice.
|
||||
|
||||
* Demo reports do not compile, class CL_BCS_CONVERT is not available.
|
||||
|
||||
Implement SAP OSS Notes:
|
||||
|
||||
[Note 1151257 - Converting document content](https://service.sap.com/sap/support/notes/1151257)
|
||||
|
||||
[Note 1151258 - Error when sending Excel attachments](https://service.sap.com/sap/support/notes/1151258)
|
||||
|
||||
* You want to start a report with SUBMIT. The report you called has a parameter of type string. If a variable of type string is transferred to the parameter with SUBMIT, the system issues termination message DB036
|
||||
|
||||
Implement SAP OSS Notes:
|
||||
|
||||
[Note 1385713 - SUBMIT: Allowing parameter of type STRING](https://service.sap.com/sap/support/notes/1385713)
|
||||
|
||||
* Macro-Enabled workbook
|
||||
|
||||
Run report ZDEMO_EXCEL29 and use as VBA source file [TestMacro.xlsm](https://github.com/ivanfemia/abap2xlsx/blob/master/resources/TestMacro.xlsm) attached.
|
||||
Basically abap2xlsx works using an existing VBA binary (we do not want to create a VBA editor).
|
||||
|
||||
* Download XLSX files in Background
|
||||
|
||||
Run report ZDEMO_EXCEL25.
|
||||
|
||||
* Use Calibri font in Excel and auto width calculation
|
||||
|
||||
You can upload Excel's default font Calibri from the regular .TTF font files using transaction SM73. Make sure to upload all four files (standard, bold, italic, bold and italic) and to use the description "Calibri", i.e. exactly the name Excel displays for the font.
|
||||
|
154
docs/Getting-ABAP2XLSX-to-work-on-a-620-System.md
Normal file
154
docs/Getting-ABAP2XLSX-to-work-on-a-620-System.md
Normal file
|
@ -0,0 +1,154 @@
|
|||
Note these instructions will get ABAP2XLSX working on an older 620 system. In this case I am doing it on a 4.70 Enterprise ext 2 system.
|
||||
|
||||
The guide draws from the existing installation guides and includes additional steps specific to 620.
|
||||
|
||||
This is based on the Daily build of ABAP2XLSX version 4, revision 103, dated 19th of January 2011.
|
||||
|
||||
1. Download abap2xlsx_Daily.nugg.zip and extract the .nugg file from it.
|
||||
2. Download abap2xlsx6.20patch.nugg.zip and extract the .nugg file from it.
|
||||
3. Use ZSAPLINK to install NUGG_ABAB2XLS_UTILS620.nugg. Ensure overwrite Originals is ticked. You should get green lights against the 3 classes and 2 interfaces that it imports.
|
||||
4. Open abap2xlsx_Daily.nugg in text editor and do search and replace according to following table:
|
||||
|
||||
|
||||
Search Replace with # of occurrences
|
||||
CL_OBJECT_COLLECTION ZCL_OBJECT_COLLECTION 61
|
||||
IF_OBJECT_COLLECTION ZIF_OBJECT_COLLECTION 68
|
||||
CL_ABAP_ZIP ZCL_ABAP_ZIP 3
|
||||
|
||||
|
||||
5. Save that new copy of abap2xlsx_Daily.nugg
|
||||
6. Use SAPLINK to install your modified abap2xlsx_Daily.nugg. Again you should get a green light on everything it imports.
|
||||
7. Use transaction SE80 (Object Navigator) to activate the newly imported entries.
|
||||
|
||||
Select the Inactive Objects from the dropdown. Activate in the following order :
|
||||
|
||||
Activate all domains
|
||||
Activate all data elements
|
||||
Activate all Database Tables / Structures except
|
||||
ZEXCEL_S_FIELDCATALOG
|
||||
ZEXCEL_S_WORKSHEET_COLUMNDIME
|
||||
ZEXCEL_S_WORKSHEET_ROWDIMENSIO
|
||||
Note you may get a warning on activation. Continue on.
|
||||
Activate all Table Types except
|
||||
ZEXCEL_T_FIELDCATALOG Table binding field catalog
|
||||
ZEXCEL_T_WORKSHEET_COLUMNDIME Collection of column dimensions
|
||||
ZEXCEL_T_WORKSHEET_ROWDIMENSIO Collection of row dimensions
|
||||
Activate all interfaces
|
||||
Activate all classes (see step 8 below for the errors you will encounter)
|
||||
Activate remaining Database Tables / Structures (if any error occurs open the structure and double click on the class object, SAP needs to refresh its buffer)
|
||||
ZEXCEL_S_FIELDCATALOG
|
||||
ZEXCEL_S_WORKSHEET_COLUMNDIME
|
||||
ZEXCEL_S_WORKSHEET_ROWDIMENSIO
|
||||
Activate remaining Table Types (if any error occurs open the structure and double click on the class object, SAP needs to refresh its buffer)
|
||||
ZEXCEL_T_FIELDCATALOG
|
||||
ZEXCEL_T_WORKSHEET_COLUMNDIME
|
||||
ZEXCEL_T_WORKSHEET_ROWDIMENSIO
|
||||
|
||||
8. You will find during activation on a 620 system that ZCL_EXCEL_HYPERLINKS class is a particular problem. It is easiest to just deactivate and exclude this (remove any reference to it from any other class with the abap2xlsx group). Note that with these changes made, any hyperlink functionality in your programs will not actually make use of the hyperlink functionality.
|
||||
|
||||
Hyperlinks Cleanup :
|
||||
|
||||
The main issue is hyperlinks->get_iterator is unknown. Quick fix is to ignore any hyperlink functionality.
|
||||
|
||||
Class : ZCL_EXCEL_WORKSHEET
|
||||
|
||||
Method : GET_HYPERLINKS_ITERATOR
|
||||
|
||||
Comment out : **eo_iterator = hyperlinks->get_iterator( ).**
|
||||
|
||||
|
||||
Class : ZCL_EXCEL_WORKSHEET
|
||||
|
||||
Method : GET_HYPERLINKS_SIZE
|
||||
|
||||
Comment out : **ep_size = hyperlinks->size( ).**
|
||||
|
||||
|
||||
Class : ZCL_EXCEL_WRITER_2007
|
||||
|
||||
Method : CREATE_XL_SHEET_RELS
|
||||
|
||||
Comment out :
|
||||
**lo_iterator = io_worksheet->get_hyperlinks_iterator( ).**
|
||||
**WHILE lo_iterator->ZIF_OBJECT_COLLECTION_iterator~has_next( ) EQ abap_true.**
|
||||
**lo_link ?= lo_iterator->ZIF_OBJECT_COLLECTION_iterator~get_next( ).**
|
||||
**ADD 1 TO lv_relation_id.**
|
||||
|
||||
**lv_value = lv_relation_id.**
|
||||
**CONDENSE lv_value.**
|
||||
**CONCATENATE 'rId' lv_value INTO lv_value.**
|
||||
|
||||
**lo_element = lo_document->create_simple_element( name = lc_xml_node_relationship**
|
||||
**parent = lo_document ).**
|
||||
**lo_element->set_attribute_ns( name = lc_xml_attr_id**
|
||||
**value = lv_value ).**
|
||||
**lo_element->set_attribute_ns( name = lc_xml_attr_type**
|
||||
**value = lc_xml_node_rid_link_tp ).**
|
||||
|
||||
**lv_value = lo_link->get_url( ).**
|
||||
**lo_element->set_attribute_ns( name = lc_xml_attr_target**
|
||||
**value = lv_value ).**
|
||||
**lo_element->set_attribute_ns( name = lc_xml_attr_target_mode**
|
||||
**value = lc_xml_val_external ).**
|
||||
**lo_element_root->append_child( new_child = lo_element ).**
|
||||
**ENDWHILE.**
|
||||
|
||||
And to help with any transport issues later on :
|
||||
|
||||
Class : ZCL_EXCEL_HYPERLINKS
|
||||
|
||||
Method : ADD
|
||||
|
||||
Comment out : **data_validations->add( ip_data_validation ).**
|
||||
|
||||
8a (Alternative to allow Hyperlinks - Tested with ABAP2XLSX version 6) - This is unconfirmed but it seems to be working for us.
|
||||
|
||||
Class : ZCL_EXCEL_WORKSHEET
|
||||
|
||||
Method : GET_HYPERLINKS_ITERATOR
|
||||
|
||||
Change to : **eo_iterator = hyperlinks->zif_object_collection~get_iterator( ).**
|
||||
|
||||
|
||||
Class : ZCL_EXCEL_WORKSHEET
|
||||
|
||||
Method : GET_HYPERLINKS_SIZE
|
||||
|
||||
Change to: **ep_size = hyperlinks->zif_object_collection~size( ).**
|
||||
|
||||
The Class ZCL_EXCEL_WRITER_2007 Method CREATE_XL_SHEET_RELS code can remain uncommented.
|
||||
|
||||
|
||||
9. 620 is picky about parameter names being omitted if there is more than one possible parameter. Minor changes to the code are required in the following area :
|
||||
|
||||
Class : ZCL_EXCEL_WORKSHEET
|
||||
|
||||
Method : CALCULATE_COLUMN_WIDTHS
|
||||
|
||||
Find : **column_dimension->set_width( <auto_size>-width ).**
|
||||
|
||||
Replace with : **call method column_dimension->set_width exporting ip_width = <auto_size>-width.**
|
||||
|
||||
10. 620 doesn't support CONCATENATE...RESPECTING BLANKS or REPLACE...REGEX... so this needs to be changed to a more traditional CONCATENATE.
|
||||
|
||||
Class : ZCL_EXCEL_WRITER_2007
|
||||
|
||||
Method : CREATE_DOCPROPS_CORE
|
||||
|
||||
Find :
|
||||
**CONCATENATE lv_date lv_time INTO lv_value RESPECTING BLANKS.**
|
||||
**REPLACE ALL OCCURRENCES OF REGEX '([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})' IN lv_value WITH '--T::Z'.**
|
||||
|
||||
Replace with :
|
||||
**CONCATENATE lv_date+0(4) '-' lv_date+4(2) '-' lv_date+6(2) 'T' lv_time+0(2) ':' lv_time+2(2) ':' lv_time+4(2) 'Z' INTO lv_value.**
|
||||
|
||||
There are two occurances to replace.
|
||||
|
||||
|
||||
|
||||
11. You should now have no problems activating everything except for one of the Demo reports. Three of the four can be fixed as follows :
|
||||
|
||||
ZDEMO_EXCEL20
|
||||
Fix not attempted on this one.
|
||||
|
||||
Thanks to Regan MacDonald
|
6
docs/Installation-guide.md
Normal file
6
docs/Installation-guide.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
This is a short guide in order to install abap2xlsx to your system:
|
||||
|
||||
* abapGit (preferred)
|
||||
* STMS
|
||||
* SAPLink
|
||||
|
36
docs/SAPLink-installation.md
Normal file
36
docs/SAPLink-installation.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
## Prerequisites
|
||||
* [SAPlink](http://www.saplink.org) installed in your system.
|
||||
* [SAPlink Plugins](http://www.saplink.org) installed in your system: DDic, Interface (I would suggest to install the complete nugg package in build/SAPlink-plugins_Daily.nugg)SAP
|
||||
|
||||
## Procedure
|
||||
Download the nugg file from [build folder](https://github.com/ivanfemia/abap2xlsx/tree/master/build) and save it locally on your system. Logon on your SAP system and execute report ZSAPLINK Select "Import Nugget" and locate your nugg file, check overwrite originals only if you have a previous installation of abap2xlsx and you want to update.
|
||||
|
||||

|
||||
|
||||
Execute the report.
|
||||
If you have checked overwrite originals a popup could appears in order to confirm the overwrite; press Yes to all.
|
||||
You should get this result (all green light)
|
||||
|
||||

|
||||
|
||||
SAPLinks puts the objects into $tmp space and all the objects are inactive. So we need to activate now.
|
||||
From SE80, select inactive objects
|
||||
|
||||

|
||||
|
||||
Activate objects in the following order:
|
||||
I tried a new nugg import on a new system here the detailed steps I performed:
|
||||
|
||||
1. Activate all domains
|
||||
1. Activate all data elements
|
||||
1. Activate all Database Tables / Structures except: ZEXCEL_S_FIELDCATALOG, ZEXCEL_S_STYLEMAPPING, ZEXCEL_S_WORKSHEET_COLUMNDIME, ZEXCEL_S_WORKSHEET_ROWDIMENSIO
|
||||
1. Activate all Table Types except: ZEXCEL_T_FIELDCATALOG, ZEXCEL_T_STYLEMAPPING, ZEXCEL_T_WORKSHEET_COLUMNDIME, ZEXCEL_T_WORKSHEET_ROWDIMENSIO
|
||||
1. Activate all interface/classes (activate anyway)
|
||||
1. Activate remaining Database Tables / Structures (if any error occurs open the structure and double click on the class object, SAP needs to refresh its buffer): ZEXCEL_S_FIELDCATALOG, ZEXCEL_S_WORKSHEET_COLUMNDIME, ZEXCEL_S_WORKSHEET_ROWDIMENSIO
|
||||
1. Activate remaining Table Types (if any error occurs open the structure and double click on the class object, SAP needs to refresh its buffer): ZEXCEL_T_FIELDCATALOG, ZEXCEL_T_WORKSHEET_COLUMNDIME, ZEXCEL_T_WORKSHEET_ROWDIMENSIO
|
||||
1. Activate all demo reports
|
||||
1. ~~Due to a issue with interfaces in SAPlink you need to import the abap2xlsx nugget twice and activate again all the objects.~~ Fixed with latest SAPlink release
|
||||
|
||||
Report ZAKE_SVN_A2X is used to retrieve and commit object into subversion server, Delete it if you are not a contributor.
|
||||
|
||||
[Getting ABAP2XLSX to work on a 620 System](Getting-ABAP2XLSX-to-work-on-a-620-System)
|
4
docs/abap2xlsx-Calender-Gallery.md
Normal file
4
docs/abap2xlsx-Calender-Gallery.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
The Demo Program ZDEMO_CALENDAR gives you the possibility to create a calendar just be specifying the image locations and descriptions. If you're using this report please share your results here:
|
||||
|
||||
* [Calendar created since 2012 with abap2xlsx by Gregor Wolf](https://computerservice-wolf.com/privat/)
|
||||
* [New York Calendar 2012 by Hendrik Neumann](http://dl.dropbox.com/u/3894797/Calendar%20-%20New%20York%20City%20-%202012.pdf)
|
|
@ -4,7 +4,7 @@ This community project allows you to generate Professional Excel spreadsheets di
|
|||
|
||||
* Installation guide
|
||||
* [abapGit](abapGit-installation) (Preferred)
|
||||
* [STMS](wiki/stms-installation) (obsolete)
|
||||
* [SAPLink](wiki/SAPLink-installation) (obsolete)
|
||||
* [F.A.Q.](wiki/F.A.Q.)
|
||||
* [abap2xlsx Calender Gallery](wiki/abap2xlsx-Calender-Gallery)
|
||||
* [STMS](stms-installation) (obsolete)
|
||||
* [SAPLink](SAPLink-installation) (obsolete)
|
||||
* [F.A.Q.](F.A.Q.)
|
||||
* [abap2xlsx Calender Gallery](abap2xlsx-Calender-Gallery)
|
||||
|
|
Loading…
Reference in New Issue
Block a user