Hi Kornelia,
thank you for your detailed reply.
I'm a bit confused about your answer:
1) You refer to a variable definition without a value whereas I was asking about a value assignment which is obviously handled differently by the system. But regarding this case, I think you're right when you say it should look like this:
var MyDuration : apCommonGDT:Duration;
This also worked for me before, my problem came up when I tried to use static methods of a BO.
2) I didn't create a BO with the same name as a standard SAP BO ("Duration" in this case).
You recommend to try no namespace as follows, but that initially led to the error message that I had to qualify the namespace which I tried afterwards:
duration = Duration.ParseFromString("PT0H");
The second suggestion...
duration = apCommon::Duration.ParseFromString("");
...is something I tried before which led to the error "Static reuse services cannot be called instance-based"(see my second variable "duration2" in the screenshot attached to my question), which doesn't make sense for me at all.
However, at least I don't have no error message anymore, thanks again and
Kind Regards
Pablo