Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to populate a Table inside a structure?

Hello,

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:

method TEST_02.

DATA: Shipment TYPE ZSHIPMENT,

case TYPE ZCASE_STR.

case-case_id = 'case1'.

INSERT case INTO Shipment-cases.

endmethod.

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.

Gonso

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question