質問

is there any type of Object in abap, so that I can save any kind of data in it?

the reason is the following: I'm writing some code and I dont know what kind of data I will get back. If I would work with java I would save it in a Object.

Is there something equal in ABAP?

役に立ちましたか?

解決

If you are looking for data types, there is a generic type named DATA. For objects (instances), a similar type named OBJECT exists. The generic type ANY will contain either one of these, but it's rather pointless to use it for both objects and values at the same time, because you'll end up handling data with references which can be really error prone (and is not something you should attempt to do if you don't know about generic types in the first place).

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top