09-05-2008 11:46 PM
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
09-05-2008 11:53 PM
Just to be sure, enter the debugger in the method and see if shipment is really an an structure with a field and an internal table inside.
We also had a problem like that a few weeks ago, and we had the declaration wrong
09-06-2008 12:07 AM
Ramiro,
wow! you hit the nail in the head! The zshipment type was not active to its latets version. Thanks to the debugger I could see its real face.
Thanks!!!!