How to populate a Table inside a structure?
Im very new to ABAP and Im having a rather sily problem. I have a Structure (ZSHIPMENT) with one component (CASES) of the type Z_CASE_TABLE. Z_CASE_TABLE is a table with a line type of ZCASE_STR. ZCASE_STR is a Structure with one Component (CASE_ID) of type String.
So ZSHIPMENT - ZCASE_TABLE - ZCASE_STR - CASE ID.
I want to write some code to create this object and use it in a method.
This is what Im trying:
DATA: Shipment TYPE ZSHIPMENT,
case TYPE ZCASE_STR.
case-case_id = 'case1'.
INSERT case INTO Shipment-cases.
But I get this error: CASE is not an internal table - the "OCCURS n" specification is missing.
Can someone give me a hint on how to populate my memory object?
Ive tryed all shorts of things but I never get it to work.
Thanks in advance.