Important Table Structures

Use

The methods for setting and getting data from a named range use the separation between the description of the range and the data itself. Note that the sequence must be observed both in the range description (structure soi_range_list) and in the data (structure soi_generic_table). This means that you must list all data from the first range before you can insert data into the second range.

Field

Type

Description

name

C

Name of the range

rows

C

Number of lines

columns

C

Number of columns

code

C

Function in the range:

  • SPREADSHEET->SPREADSHEET_CLEAR:

    Existing ranges will then be deleted.

  • SPREADSHEET->SPREADSHEET_COLUMNSHIDE:

    Columns are hidden.

  • SPREADSHEET->SPREADSHEET_ROWSHIDE:

    Rows are hidden.

  • SPREADSHEET->SPREADSHEET_PROTECT: Range is protected.

  • SPREADSHEET->SPREADSHEET_UNPROTECT:

    Range is not protected.

  • SPREADSHEET->SPREADSHEET_COLUMNSSHOW:

    Columns are displayed.

  • SPREADSHEET->SPREADSHEET_ROWSSHOW:

    Rows are displayed.

  • SPREADSHEET->SPREADSHEET_INSERTALL:

    Whole tables are inserted, irrespective of the size of the range.

  • SPREADSHEET->SPREADSHEET_NEWRANGE:

    Creates a new range.

The name identifies the range in the worksheet. This is, in effect, the key with which you always access the range. The size of the range is always given in columns and rows.

Some functions allow you to access a specific range in a worksheet. You can see from the table which functions are implemented.

Description of Data Type soi_generic_table

In this table, you can save data from the range and use the SAP Data Provider to transfer it to or retrieve it from the frontend. The data is transferred directly as a string with no type information.

Field

Type

Description

row

C(4)

Row

column

C(4)

Column

value

C(256)

Value

Description of Data Type soi_format_table

Use this table to specify the format of a range. The format consists of various attributes, all of which can be set in a single line. Each variable attribute corresponds to a column of the structure.

To create a work range for this table, use the structure soi_format_item as a reference.

Field

Type

Description

name

C(256)

Name of the range

front

I

Font color (see color palette)

back

I

Background color (see color palette)

font

C(256)

Name of the font family. The following values are permitted:

Arial

Courier New

Times New Roman

size

I

Font size

-1: Unchanged

bold

I

1: Bold

0: Normal

-1: Unchanged

italic

I

1: Italic

0: Normal

-1: Unchanged

align

I

Alignment:

  • -1: Unchanged

  • 0: Right-justified

  • 1: Centered

  • 2: Left-justified

frametype

I

Control byte for setting the frame

-1: Unchanged

framecolor

I

Frame color (see color palette)

-1: Unchanged

currency

C(3)

ISO standard currency code

number

I

Specifies the format of a cell in a range.

  • 1: Display as a simple number

  • 2 Scientific display

  • 3 Percentage display

The control byte type contains the following bits. If a bit is set, its corresponding line is drawn. You can set the thickness of the line to one of four levels using bits 6 and 7.

Bit

Description

0

Left margin

1

Top margin

2

Bottom margin

3

Right margin

4

Horizontal line

5

Left margin

6

Thickness

7

Thickness

Description of Data Type soi_full_range_table

Each line of a table with the type soi_full_range_table specifies the full definition of a range. The individual lines have the data type soi_full_range_item.

Field

Type

Description

name

C(128)

Name of the range

top

I

Top row of the range

left

I

Leftmost column of the range

rows

I

Number of rows in the range

columns

I

Number of columns in the range

sheets

C(128)

Worksheet on which the range is defined

Description of Data Type soi_cell_table

Each line of a table with the type soi_cell_table specifies the attributes of a range of cells. However, no range name is used. Instead the cell range is defined on the basis of its start position and the number of its rows and columns. The individual lines have the data type soi_cell_item.

Field

Type

Description

top

I

Top row of the range

left

I

Leftmost column of the range

rows

I

Number of rows in the range

I

Number of columns in the range

front

I

Font color (see color palette)

back

I

Background color (see color palette)

font

C(256)

Font. The following values are permitted:

  • Arial

  • Courier New

  • Times Roman

size

I

Font size

Use -1 if the font size is to remain unchanged.

bold

I

  • 1: Bold

  • 0: Normal

  • -1: Unchanged

italic

I

1: Italic

0: Normal

-1: Unchanged

align

I

Alignment:

  • -1: Unchanged

  • 0: Right-justified

  • 1: Centered

  • 2: Left-justified

frametype

I

Control byte for setting the frame

-1: Unchanged

framecolor

I

Frame color (see color palette)

-1: Unchanged

currency

C(3)

ISO standard currency code

number

I

Specifies the format of a cell in a range.

  • 1: Display as a simple number

  • 2 Scientific display

  • 3 Percentage display

decimals

I

Number of decimal places

input

I

  • 0: Input off

  • 1: Input on

Description of Data Type soi_dimension_table

You can use an internal table with this type to identify a range by specifying the coordinates of its top left-hand corner, its length, and its width. The lines of soi_dimension_table have the line type soi_dimension_item.

Field

Type

Description

top

I

Top row of the range

left

I

Leftmost column of the range

rows

I

Number of lines

columns

I

Number of columns