cancel
Showing results for 
Search instead for 
Did you mean: 

Complex tables -Creation, Read and Update under Syclo Agentry applications

Former Member
0 Kudos

Hello Experts,

I am working on a scenario where I can store the data temporarily on the Agentry Client.

I will be performing some operations on a work order's time entry object under SAPWM application and will store the temporary duration for which the user has worked.

I don't wish to pass the data to ECC instantly and wish to hold the data somewhere on the client, which I can re-use later.
I also wish to retain this data even in multiple synchronization cycles with Backend.

I have few questions on the same.

1) Creation of complex table: While checking the config panel, I see that Mobile Data Objects (MDOs) have been created for each complex table present under SAPWM application.

Can I create a complex table without having anything as its counterpart on the ECC side? I only wish to use the complex table to store user's data while he is using the application and I have no intent to transmit this data back to ECC.

2) Reading and updating Complex table:

Can we read the data from complex table, insert data into the table and update few entries in the complex table using java code?

3) Retaining data in the complex table:

Can we retain the data in the complex table after multiple synchronizations with the backend? I don't want to override the data present there, but I may want to delete the data through Java code later.

4) Last question, Can we trigger Java code on click on a button on the Agentry screens without using Transactions?

I wish to trigger a piece of code, which should execute before the user clicks on the "Transmit" button. I believe Transaction's update step can only be executed once the user clicks on Transmit button.

Request your input on the same.

Best,

Arihant Kothari

Tags edited by: Michael Appleby

Accepted Solutions (1)

Accepted Solutions (1)

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Arihant,

If you want to store data on the client I would recommend just using an object collection.  As long as you don't have any fetches targeting the collection the data will persist on the client until you remove it or the client is reset.

The products use this same process to capture multiple updates to work orders and then when the user clicks the transmit button a transaction (without user input) is run to bundle all the data into a transaction to send to the backend for processing.

While this does work, you have to make extra sure you are properly handling all your scenarios and edge cases.

With respect to your other questions...

1) Complex tables are designed to hold lookup data and perform updates on that data in response to changes in the backend.  Users do not typically update the complex tables on the device and regular transactions would be needed to handle any updates.

Since any updates to a complex table require a transaction, as long as you don't have any update steps defiened for the transaction the data will not be sent to the backend.

2) Java code really only runs on the Agentry Server.  You could create a java based complex table that never read any data from the backend if desired.

3) Data in a complex table (as well as data tables and objects) persists on the client unless otherwise configured to be removed.  For complex tables this means during the transmit the process checks for any updates to the complex table based on the last time the transmit occurred.  Any new additions since that time are sent to the client to be added to the table and any records marked to be removed are also sent to the client for removal.  If the check process doesn't detect any changes, no updates (add or delete) are sent and the data remains.

4) As I mentioned, the Java code only runs on the Agentry server, you can certainly define actions to be run on the client when the Transmit button is pressed prior to invoking the actual transmit communication process with the Agentry server.

Hope this helps!

--Bill

Former Member
0 Kudos

Thank you Bill for your very helpful reply.

I was coding this requirement with the object collection to hold my temporary values.

Is there anyway, I can check the values present under the object collection before inserting new entries?

As I understand from your reply, I cannot check the values present in the object collection from the Java code. Is that correct?

Answers (1)

Answers (1)

Former Member
0 Kudos

Instead of creating a complex table, if you are only using like a few fields as Temp values, I would suggest you correct them at the Main Object.  Then in your transaction you can point to this object.

Also, no the Agentry Client does not have access to the Java code.  That is all on the server.  Rules can use Javascript.