Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ABAP Object Services -> Agent object

Former Member
0 Likes
1,386

Hello,

I am trying to write an example program using Object Services and Flight Model.An agent class is being generated when I create the persistent class, but this class does not have the public attribute 'agent', which had to be in. According to manuals, this has to be a static attribute of the singleton agent class. Do I oversee stg. during class generation?

Regards,

Sükrü

5 REPLIES 5
Read only

Former Member
0 Likes
1,000

Any updates ??

Read only

0 Likes
1,000

I don't know if it helps but I checked some of my Object Services Classes and all of my Agent classes do have the public attribute Agent. I didn't have to add it manually or do anything special when I generated the Persistent Class. The following is the attribute def in the agent class:

AGENT Static Attribute Public Type Ref To ZCA_ES_ASAP_ASS_PERS Class Agent - Singleton

Perhaps you simple have a bug in the persistent class generator in your system.

Read only

Former Member
0 Likes
1,000

hi

has this been solved somehow? I'm trying to generate my own persistent classes and there is no CLASS_CONSTRUCTOR method nor AGENT attribute in the generated agent class.

strange enough the provided sample classes cl_spfli_persistent and ca_spfli_persistent do seem to work like described in the documentation (and have the CLASS_CONSTRUCTOR method and AGENT attribute).

any hints are welcome!

regards

nicola

Message was edited by: Nicola Fankhauser

Read only

Former Member
0 Likes
1,000

hello

I managed to solve this very strange behavior: ONLY activate the persistent class itself after mapping the fields. if you activate ALL classes at the same time (i.e. your persistent class, and the two generated agent classes), it seems that it won't generate the needed code in the agent classes (method CLASS_CONSTRUCTOR and AGENT attribute).

regards

nicola

Message was edited by: Nicola Fankhauser

Read only

0 Likes
1,000

I too have seen some similar problems. I deleted some fields from my persistent mapping and then activated everything. My classes got in a strange state where the Agent class would not activate. I ended up having to delete and recreate my persistent object.