Writing a Table into a Container
Prerequisites
The following prerequisites must be fulfilled in order to write a multiline field value into a container:
-
The container must have been created and initialized.
-
For function modules, the include file < CNTN01> must be incorporated in the program. For ABAP classes, the include files < CNTN02> and < CNTN03> must be incorporated. For more information, see Macro Instructions for Processing a Container.
Procedure
-
Create a variable for the table.
-
Assign values to the table.
-
Write the table into the container using the following macro instruction:
SWC_SET_TABLE <Container> <ContainerElement> <Value>.
Results
If the container element with this ID is not yet in the container, it is inserted into the container with its value. If there is already a container element with this ID in the container, the old value is overwritten with the new value.