cancel
Showing results for 
Search instead for 
Did you mean: 

Android OpenUI calling agentry action in a loop

rupeshpandit1999
Explorer
0 Kudos

Hello experts,

I have a requirement to enter multiple batches for each line Item in ZBatch collection under material document item object, to achieve this requirement i am trying the integration of OpenUI with Agentry.

In Agentry screen i have created a push button. On click of this button it will trigger the open UI Screen in which I am sending some agentry fields value to OpenUI (Material, Material Document, Material Description, ZAcceptedQty, ZAddBatch) and user will be able to enter the value of batch which includes Quantity, Sled, Mfd, Batch fields where entered value should come back to agentry in loop from OpenUI to ZBatch object which is collection under MaterialDocumentItem object e.g-

Batch1, Quantity-2, Sled-02/05/2023, Mfd- 10/02/2022

Batch2, Quantity-3, Sled-10/07/2023, Mfd- 05/02/2022

I have created an action under the push button which refers to the external value where it should get value, which is coming from OpenUI to agentry, but I am not able to call the Action in android code in a loop. Property under add transaction is map to fields external value sent by OpenUI. To resolve this issue could you please help me to call the action in a loop in android code?

for your reference attaching the screenshots

Thanks and regards,

Rupesh Kumar Pandit

Accepted Solutions (0)

Answers (6)

Answers (6)

jianhua_duan
Explorer
0 Kudos

I meant the RecordPoint action in the base SAPWM app.

jianhua_duan
Explorer
0 Kudos

Hi Rupesh,

I have talked with a Work Manager developer, he thinks the RecordPoint action that's acting on the MeasuringPoint object might be doing something similar as what you are attempting to do. Please use the actions steps of RecordPoint action as a reference.

Hope this helps.

Jianhua

rupeshpandit1999
Explorer
0 Kudos

Hi Jianhua,

we are implementing this functionality in Inventory Manager application.

jianhua_duan
Explorer
0 Kudos

We need more information to be able to help you, please provide us with the ticket you opened, so one of our Agentry developers could spend time looking into it. Thanks.

rupeshpandit1999
Explorer
0 Kudos

Hello Jianhua,

Please fine the below sap incident no :

Case ID: 584853 / 2023

Please help us what should be the OpenUI adapter to be used, we tried with the ButtonDisplayAdapter and CollectionDisplayAdapter, we require to update a agentry collection through the action in loop which is being called in OpenUI android code.

Thanks.

rupeshpandit1999
Explorer
0 Kudos

we had raised an incident with SAP and got reply that it would be a consulting call and can't be address through an incident.

we are now trying with ButtonDisplayAdapter and also CollectionDisplayAdapter as per the below OpenUI available documentation for Android

https://help.sap.com/doc/saphelp_smp305sdk/3.0.5/en-US/b5/b5215c6d0a10148a599dad9b3999ac/frameset.ht...

the observation is the getExtensionString(String) is getting invoke only for the first property and rest three defined properties not getting updated.

Also the action is not getting triggered :

public String getExtensionString(String name) {

String resultString = "";

try {

if (name.equals("Batch")){

resultString = batch.getBatch();

}else if (name.equals("Quantity")){

resultString = batch.getQuantity();

}else if (name.equals("SLED")){

resultString = batch.getSledDate();

}else if (name.equals("MFD")){

resultString = batch.getMfdDate();

}

} catch (Exception e) {

Log.e("TAG_E","Message: "+e.getLocalizedMessage());

}

return resultString;

}

public void onClick(View view) {

ZCaptureBatchAddDetails.batchModelList.addAll(batchModelList);

ZCaptureBatchAddDetails._model.executeAgentryAction("ZAddBatchOpenUI");

builder.dismiss();

finish();

}

Could anyone help us to call the action in a loop which updates the collections in agentry.

jianhua_duan
Explorer
0 Kudos

There is not enough information in this post to learn what you are trying to do. Please create a ServiceNow ticket, and attach the customers Agentry definitions, openUI source code, and customer's requirements for these openUI controls. Then one of our Agentry developers could help you.

Thanks,

Jianhua

jianhua_duan
Explorer
0 Kudos

The first three images you attached are very blurry, only the fourth image is clear. Please re-attach the first three images.

Can you please explain why you are defining openUI controls for these fields instead of using the standard Agentry controls?

Thanks,

Jianhua

rupeshpandit1999
Explorer
0 Kudos

Hello Jianhua,

Re-attached the image thanks for let me know. OpenUI is custom requirement from customer.

Thanks,

Rupesh