Skip to Content

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

error during deep structure definition

Hi Colleagues,

I want to define a type which is a deep structure in a class.something like this,

public section.

Types: begin of a,

name type char40,

end of a.

types: begin of b,

value1 type standard table of a,

value2 type of i,

end of b.

but i always got an error saying that,

'you cannot use generic type definitions within structures'

Can anyone help on this?

Thank you very much!

Best Regards,





> When using ABAP Objects you need to declare the tables using a complete definition including the KEY to the standard table and in the TYPE i you don't need the OF.


> Regards.


When using return parameters or defining attributes in ABAP objects, they must be fully typed, which is as David says.

You must also use the fully typed specification for inner tables (deep structures) whether in objects or not.

In other contexts, include objects, at least in later versions, you can still use the non-full specification. But it's better not to.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question