abap2xlsx / abap2xlsx

Generate your professional Excel spreadsheet from ABAP
https://abap2xlsx.github.io/abap2xlsx/
Apache License 2.0
687 stars 284 forks source link

FM CV120_SPLIT_FILE in method load_worksheet_drawing missing in some systems #206

Closed ivanfemia closed 10 years ago

ivanfemia commented 10 years ago

The Function Module CV120_SPLIT_FILE (used in method load_worksheet_drawing of class ZCL_EXCEL_READER_2007) is not implemented in my system. I think that it is only available on ERP.

My system details:

SAP EHP 2 for SAP NetWeaver 7.0

Components installed:

SAP_BASIS         702         0010    SAPKB70210    SAP Basis Component\ SAP_ABA            702         0010    SAPKA70210    Cross-Application Component\ PI_BASIS             702         0010    SAPK-70210INPIBASIS    Basis Plug-In\ GW_CORE           200         0003    SAPK-20003INGWCORE    SAP GW CORE 200\ IW_BEP               200          0003    SAPK-20003INIWBEP    Backend Event Provider\ SAP_BW             702          0010    SAPKW70210    SAP Business Warehouse\ IW_FND               250          0003    SAPK-25003INIWFND    SAP IW FND 250\ SAP_AP              700          0026    SAPKNA7026    SAP Application Platform 7.00 WEBCUIF            701          0007    SAPK-70107INWEBCUIF    SAP Web UI Framework\ IW_CBS              200           0003    SAPK-20003INIWCBS    SAP IW CBS 200\ IW_CNT               200          0003    SAPK-20003INIWCNT    SAP IW CNT 200\ IW_SCS              200           0003    SAPK-20003INIWSCS    Screen Scraping\ IW_TNG              200           0002    SAPK-20002INIWTNG    SAP IW TNG 200\ POASBC            100_702    0008    SAPK0008INPOASBC    POA Shared Business Components 1.0\ SLL-LEG             900           0011    SAPK-90011INSAPSLL    SLL-LEG 900 : Add-On Installation

ivanfemia commented 10 years ago

In addition to the function module also the type draw which is used in method LOAD_WORKSHEET_DRAWING of ZCL_EXCEL_READER_2007 does not exist on a plain NetWeaver ABAP stack.

ivanfemia commented 10 years ago

Hi Let's create a method in COMMON and use it instead of the function. This is a simple function could be easy duplicated into a method. The draw reference can also easy be removed. Rene

ivanfemia commented 10 years ago

(In [[r:338]]) Ready to test #208

ivanfemia commented 10 years ago

common=>split_file does does not work properly for files w/o extension if "." is found in path.

Example: filename = "c:\temp\12.4.2012\init" should result in "c:\temp\12.4.2012" "" "."

but gives "c:\temp\12.4" "2012\init" ".2012\init"

ivanfemia commented 10 years ago

The method is copy of the standard Function module... I will try to extend it in order to support also this case.

Thanks

ivanfemia commented 10 years ago

Stefan method split file is supposed to split file name and extension while evaluating drawings and it is a copy of FM _CV120_SPLITFILE.

If you need to split filename as you proposed I suggest to use standard FM _TRINT_SPLIT_FILE_ANDPATH in the report.

In which case you need to split directory and filename? If your test case is solved please mark this issue as fixed

ivanfemia commented 10 years ago

Hi Ivan, a method named "split_file" should do exactly that. Especially if found the the ...common-class. If it is used soleley for the purpose of splitting filenames for drawings in the zip-structure in the readerclass it should be named differently and moved to the readerclass as protected of private method. Or at least some comments/documentation should be added telling about the restrictions.

ivanfemia commented 10 years ago

Stefan,

as for method description "File & Extension disconnect (clone of FM CV120_SPLIT_FILE)"

It is an utility for separating filename and extension, it have not to be used for directory splitting.

I would prefer to keep it simple and use standard FM for directory splitting replicating the SAP standard behavior.