RFC Calls for Manipulating Internal Tables


These functions allow processing of ABAP internal tables in C.

ABAP internal tables follow the model of a relational database table.

ABAP internal tables consist of identical rows. When it is created, a table is empty. In ABAP you can fill rows into a table by the statements ‘Insert’ or ‘Append’. You can access a row by ‘Read Table’, and you can delete a row by ‘Delete’. You can free a table by ‘Free Table’, and you can receive information about tables by ‘Describe’.

These language constructs correspond to the following C routines:

The syntax and semantics of the above RFC calls are identical for all platforms supported.

The syntax of the RFC calls is described in saprfc.h. The syntax of the RFC calls for manipulating internal tables is described in sapitab.h.

Creating and filling a new internal table

const int myTableSize = 200;
ITAB_H handle;
void * ptr;

handle = IitCreate("MyTable", myTableSize, 0,0);
if(handle == ITAB_NULL)
... error

ptr = ItAppLine(handle);;

if(ptr != NULL)
memcpy(ptr,..., myTableSize);
while(ptr != NULL);