Reading a Multiline Object Reference from a Container 

Prerequisites

The following prerequisites must be fulfilled in order to read an object reference from a container:

This prerequisite is always fulfilled if you are in the implementation program. The container is then addressed with the name CONTAINER .

Containers passed via a function module interface always contain persistent object references. Before you read an object reference from a container and store it in a variable, you must make all object references in the container into runtime references. To do this, execute the following macro instruction:

SWC_CONTAINER_TO_RUNTIME <Container>

You must process a container with this macro if you are:

Procedure

  1. Create a variable for the multiline object reference. Use the following instruction to do this:
  2. DATA <ObjectList> TYPE SWC_OBJECT OCCURS 0.

  3. Create a variable for an object reference. Use the following instruction to do this:
  4. DATA <Object> TYPE SWC_OBJECT.

  5. Read the multiline object reference from the container. Use the following instruction to do this:
  6. SWC_GET_TABLE <Container> <ContainerElement> <ObjectList>.

  7. To access the individual object references, read the individual object references from the multiline object reference in a loop. Use the following instruction to do this:

READ TABLE <ObjectList> <Index> <Object>.

You can read the object type and the key from the object reference. To do this, use the macros SWC_GET_OBJECT_TYPE and SWC_GET_OBJECT_KEY . For further information, refer to Macro Instructions for Accessing Objects, Attributes and Methods