02-07-2007 9:14 AM
Hi all,
I am trying to create table to store the multiple record files in one field.
These multiple values are the listbox items which are selected in the BSP.
First I want to define the table field to store these values.
Please help me out.
thanks in advance.
02-08-2007 8:33 PM
Hi HCC,
I'm assuming you want to create a table field within another table.
Here is a sample code:
TYPES: BEGIN OF CONTAINERITEM,
SERIAL_NUMBER TYPE STRING,
END OF CONTAINERITEM.
TYPES: ICONTAINERITEM TYPE CONTAINERITEM OCCURS 0.
TYPES: BEGIN OF CONTAINER,
BOX_TYPE LIKE ZKIU-VHILM,
CONTAINERITEM TYPE ICONTAINERITEM,
END OF CONTAINER.
DATA: I_CONTAINER TYPE TABLE OF CONTAINER.
Now you'll have an internal table ( I_CONTAINER) with box_type as field and containeritem as a nested table where you can store many serial numbers.
How to use:
LOOP AT I_CONTAINER INTO WA_CONTAINER.
LOOP AT WA_CONTAINER-CONTAINERITEM INTO WA_CONTAINERITEM.
ENDLOOP.
ENDLOOP.
02-09-2007 6:26 PM
If you rae looking for creating database table field which can stored multiple records, then follow these steps.
1. Create a table type (SE11) with sructure that you wnat as line type.
2. Create data element with reference to above table type as data type.
3. When you create your table use above data element for filed defination.
This will allow you to store multiple records in that field.
-- Reward if helpful
Shrikant