cancel
Showing results for 
Search instead for 
Did you mean: 

Fill Collection on Agentry Application

Former Member
0 Kudos

Hello experts.

I have customized Work Manager 6.2 with Meter Management to extend Register Object with extra fields.

Now, the Register Object have 4 z fields that are working ok.

The problem is with a collections that calls the Register Object.

If I check the values coming for each object on ATE, I can see:

Main Object --> MeterReadingUnits Collection --> Meters Collection --> Register Collection --> Register item contains all the z fields with the values

Main Object --> MeterPeriodicRegisters Collection --> Register Collection --> Register item is with all the values, except my z fields, that are empty

I don't understand why this is happening when both are calling Register Collection.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Manish,

In Agentry you have added this z property that's why you can see these z property under Periodic collection also. Are you sure while fetching PeriodicMeter you are also setting up this values in Java?

In java to fetch Register properties normally we use different bapi classes.

e.g:   1. MeterPeriodicReadingFetchBAPI

          2. MeterInstallationBAPI

          3. Meter DisconnectionBAPI.

To set you z properties in to PeriodicMeter collection you have to add this to below method in Register class.

public void setProperties(JCO.Table registerTable, JCO.Table limitsTable, JCO.Table reasonsTable, JCO.Table previousReadingTable, JCO.Table equipmentTable) throws Exception

{

setzXXX(XXX)

}

Please cross verify this.

Thanks

Ajitesh

Former Member
0 Kudos

Hi Ajitesh.

I added the properties in Register object in Java, in fact, the data is coming to the object, the problem is the following:

What happen is that the Register object is called by 2 collections, MeterReadingUnits and MeterPeriodicRegisters, and is working only in MeterReadingUnits.

Do you think that modifying something in Java I can add things to the collection?

Regards.

Former Member
0 Kudos

Manish,

We are reusing same Register collection for both case. To get it work you have to add the above mentioned method in to extended Register object class. Please try to debug in Java either this methods are setting these properties or not.

Thanks

Ajitesh

Answers (1)

Answers (1)

0 Kudos

Hi Manish,

You must have extended Register object class in order to include your custom fields. Now what I think is, while fetching the data for MeterPeriodicRegisters collection, might be the control is going to the Standard Register Object class instead your Custom Register object class. You can find this out using Java debug.

Best Regards,

Sujit