ABAP Excel data analyzer

2017-10-17 11:50:23

I wrote this code many years ago to analyze Excel data coming in from the clipboard.

Please review for performance and maintainability concerns.

One minor note, from an OO perspective, a class level property is pretty much global level as every method has access, so these are prefixed with G_

class ZCL_RM_EXCEL_DATA definition

public

final

create public .

public section.

*"* public components of class ZCL_RM_EXCEL_DATA

*"* do not include other source files here!!!

methods CONSTRUCTOR

importing

!P_DATA type ZRMTT_ALSMEX_TABLINE .

methods RANGE_TO_LIST

importing

!P_RANGE type STRING

!P_VECTOR type I default 1

preferred parameter P_RANGE

returning

value(P_OUT) type STRINGTAB .

class-methods DERIVE_LOCATION

importing

value(P_CELL) type STRING

exporting

!P_COL type I

!P_ROW type I .

class-methods COLUMN_TO_INT

importing

!P_COL type STRING

returning

value(P_OUT) type I .

c

  • I would recommend using CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'

    I do not think there is an option to use field symbols though.

    If a field symbol contains internal table data you can use ASSIGN COMPONENT sy-index. The values are retrieved one by one as well

    2017-10-17 14:28:31