Skip to Content
0

Add Custom Fields to My Inbox App

Nov 11, 2016 at 01:00 PM

777

avatar image
Former Member

Hi Experts ,

I want to ask you a question about the extension of the My Inbox app.

I will trying to extend the s2 view in order to show some custome fields for an especifc work flow (Maintenace orders approval workflow).

The first step that i made was extend the TASKPROCCESING service and add the custome fields to TASK entity type:



Then, i redefined the ENTITYSET_TASK method of the /IWPGW/CL_TGW_EDP_TASK class in order to set the values of new fields (Aufnr, Value, Currency).


Finally, I created a SAP UI5 app, that extend the standard cross.fnd.fiori.inbox.Component, in which we are using the CustomerExtensionForObjectListItem extension point. But when i tried to use the new custome fields this aren't show when the app is started.






I rea



l really appreciate if you can give some comment about my issue.

Regards
Felipe

10 |10000 characters needed characters left characters exceeded

Open it in Chrome and find out the error message thrown by OData service and post it here.

0
Former Member
Krishna Kishor Kammaje

Hi Krishna

I tested the OData and it works successful, i appreciate if you look my last comment which have more details about the issue and give me your opinion

Regards

0
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Best Answer
avatar image
Former Member Dec 13, 2016 at 08:23 PM
0

Hi,

I finally found the solution to my issue, this link describes it!

"..you could disable the select query by doing adding the URL parameter : useOdataSelect = false in your tile configuration....."

https://archive.sap.com/discussions/thread/3878398

Tks

Share
10 |10000 characters needed characters left characters exceeded
Masayuki Sekihara
Nov 15, 2016 at 02:36 AM
0

Hi Felipe,

Please check the OData response. If there is the custom attribute, the issue is in extended UI side. If there is no custom attribute, the issue is in OData side. If the issue is in OData side, check the service document and $metadata.

Regards,

Masa / SAP Technology RIG

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Masayuki,


Thanks for your answer. Can you tell me in which tcode i can get the OData response, since when i try to get it from Sap Gateway client, i had an error related to de SSL Cert that is not configured in our DEv Gateway system.

If i look the $metada, this have the custom attribute


0
Masayuki Sekihara
Nov 22, 2016 at 03:19 AM
0

Hi Felipe,

You can look at the developer tools in the browser. Just press F12.

Check the Network tab and Console tab.

Regards,

Masa / SAP Technology RIG

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Masayuki

I review both tabs and this is de result:

Console Tab:

Network Tab:

I found the custom attributes in the service response, but without values (The complete response is on the attached file)

This is the formated json

This is all de response:

{ "d": { "__metadata": { "id": "https://coibmsfdw6k01.grupoargos.loc/sap/opu/odata/sap/ZCA_MYINBOX_V2_SRV;v=2;mo/TaskCollection(SAP__Origin='EAD_CLNT_110_PGW',InstanceID='190001216289')", "uri": "https://coibmsfdw6k01.grupoargos.loc/sap/opu/odata/sap/ZCA_MYINBOX_V2_SRV;v=2;mo/TaskCollection(SAP__Origin='EAD_CLNT_110_PGW',InstanceID='190001216289')", "type": "ZCA_MYINBOX_V2_SRV.Task", "content_type": "application/octet-stream", "media_src": "https://coibmsfdw6k01.grupoargos.loc/sap/opu/odata/sap/ZCA_MYINBOX_V2_SRV;v=2;mo/TaskCollection(SAP__Origin='EAD_CLNT_110_PGW',InstanceID='190001216289')/$value" }, "TaskSupports": { "__metadata": { "type": "ZCA_MYINBOX_V2_SRV.TaskSupports" }, "AddAttachments": true, "AddComments": true, "Attachments": true, "Comments": true, "CreatedByDetails": true, "CustomAttributeData": true, "Description": true, "PossibleAgents": true, "PotentialOwners": true, "ProcessingLogs": true, "ProcessorDetails": true, "TaskDefinitionData": true, "TaskObject": true, "UIExecutionLink": true, "CancelResubmission": false, "Confirm": false, "Claim": false, "Forward": true, "Release": true, "Resubmit": true, "SetPriority": true }, "SAP__Origin": "EAD_CLNT_110_PGW", "InstanceID": "190001216289", "TaskDefinitionID": "TS00008267_WS91000078_0000000019", "TaskDefinitionName": "WS91000078_0000000019", "TaskTitle": "Liberar orden de mantenimiento: 400344645", "Priority": "MEDIUM", "Status": "IN_PROGRESS", "StatusText": "", "CreatedOn": "\/Date(1479436704000)\/", "CreatedBy": "WF-BATCH", "CreatedByName": "SAPNotifications", "Processor": "FGIRALDO", "ProcessorName": "Felipe Giraldo", "SubstitutedUser": "", "SubstitutedUserName": "", "StartDeadLine": null, "CompletionDeadLine": null, "ExpiryDate": null, "IsEscalated": false, "SupportsComments": true, "HasComments": false, "SupportsAttachments": true, "HasAttachments": false, "HasPotentialOwners": true, "SupportsClaim": false, "SupportsRelease": true, "SupportsForward": true, "mime_type": "", "PriorityNumber": 5, "ScenarioID": "", "ForwardingUser": "", "ForwardingUserName": "", "Aufnr": "", "Value": "0.00", "Currency": "", "TaskDefinitionData": { "__deferred": { "uri": "https://coibmsfdw6k01.grupoargos.loc/sap/opu/odata/sap/ZCA_MYINBOX_V2_SRV;v=2;mo/TaskCollection(SAP__Origin='EAD_CLNT_110_PGW',InstanceID='190001216289')/TaskDefinitionData" } }, "Description": { "__metadata": { "id": "https://coibmsfdw6k01.grupoargos.loc/sap/opu/odata/sap/ZCA_MYINBOX_V2_SRV;v=2;mo/TaskDescriptionCollection(SAP__Origin='EAD_CLNT_110_PGW',InstanceID='190001216289')", "uri": "https://coibmsfdw6k01.grupoargos.loc/sap/opu/odata/sap/ZCA_MYINBOX_V2_SRV;v=2;mo/TaskDescriptionCollection(SAP__Origin='EAD_CLNT_110_PGW',InstanceID='190001216289')", "type": "ZCA_MYINBOX_V2_SRV.TaskDescription" }, "SAP__Origin": "EAD_CLNT_110_PGW", "InstanceID": "190001216289", "Description": " Seleccione una de las alternativas de decisión. De esta forma finalizará el tratamiento de este paso. Antes de tomar una decisión, puede visualizar los anexos y objetos que se hayan añadido a la decisión del usuario. También tiene la posibilidad de añadir anexos propios. Si selecciona Cancelar , la decisión de usuario permanecerá en nuevo tratamiento en la entrada del usuario.", "DescriptionAsHtml": " <P>Seleccione una de las alternativas de decisión. De esta forma finalizará el tratamiento de este paso.</P> <P></P> <P>Antes de tomar una decisión, puede visualizar los anexos y objetos que se hayan añadido a la decisión del usuario. También tiene la posibilidad de añadir anexos propios.</P> <P>Si selecciona <B>Cancelar</B> , la decisión de usuario permanecerá en nuevo tratamiento en la entrada del usuario.</P>" }, "UIExecutionLink": { "__deferred": { "uri": "https://coibmsfdw6k01.grupoargos.loc/sap/opu/odata/sap/ZCA_MYINBOX_V2_SRV;v=2;mo/TaskCollection(SAP__Origin='EAD_CLNT_110_PGW',InstanceID='190001216289')/UIExecutionLink" } }, "CustomAttributeData": { "results": [ ] }, "Comments": { "__deferred": { "uri": "https://coibmsfdw6k01.grupoargos.loc/sap/opu/odata/sap/ZCA_MYINBOX_V2_SRV;v=2;mo/TaskCollection(SAP__Origin='EAD_CLNT_110_PGW',InstanceID='190001216289')/Comments" } }, "Attachments": { "__deferred": { "uri": "https://coibmsfdw6k01.grupoargos.loc/sap/opu/odata/sap/ZCA_MYINBOX_V2_SRV;v=2;mo/TaskCollection(SAP__Origin='EAD_CLNT_110_PGW',InstanceID='190001216289')/Attachments" } }, "CreatedByDetails": { "__deferred": { "uri": "https://coibmsfdw6k01.grupoargos.loc/sap/opu/odata/sap/ZCA_MYINBOX_V2_SRV;v=2;mo/TaskCollection(SAP__Origin='EAD_CLNT_110_PGW',InstanceID='190001216289')/CreatedByDetails" } }, "ProcessorDetails": { "__deferred": { "uri": "https://coibmsfdw6k01.grupoargos.loc/sap/opu/odata/sap/ZCA_MYINBOX_V2_SRV;v=2;mo/TaskCollection(SAP__Origin='EAD_CLNT_110_PGW',InstanceID='190001216289')/ProcessorDetails" } }, "PossibleAgents": { "__deferred": { "uri": "https://coibmsfdw6k01.grupoargos.loc/sap/opu/odata/sap/ZCA_MYINBOX_V2_SRV;v=2;mo/TaskCollection(SAP__Origin='EAD_CLNT_110_PGW',InstanceID='190001216289')/PossibleAgents" } }, "PotentialOwners": { "__deferred": { "uri": "https://coibmsfdw6k01.grupoargos.loc/sap/opu/odata/sap/ZCA_MYINBOX_V2_SRV;v=2;mo/TaskCollection(SAP__Origin='EAD_CLNT_110_PGW',InstanceID='190001216289')/PotentialOwners" } }, "ProcessingLogs": { "__deferred": { "uri": "https://coibmsfdw6k01.grupoargos.loc/sap/opu/odata/sap/ZCA_MYINBOX_V2_SRV;v=2;mo/TaskCollection(SAP__Origin='EAD_CLNT_110_PGW',InstanceID='190001216289')/ProcessingLogs" } }, "TaskObjects": { "__deferred": { "uri": "https://coibmsfdw6k01.grupoargos.loc/sap/opu/odata/sap/ZCA_MYINBOX_V2_SRV;v=2;mo/TaskCollection(SAP__Origin='EAD_CLNT_110_PGW',InstanceID='190001216289')/TaskObjects" } } } }

Regards

0
Masayuki Sekihara
Nov 24, 2016 at 03:40 AM
0

Hi Felipe,

I see there is no value in the additional properties.

You can set a bleakpoint at the backend method which set a value.

Regards,

Masa / SAP Technology RIG

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Masayuki,

In order to test only the application flow, i hardcode the attributes values on the ENTITYSET_TASK method redefinition

I finally could test the Odata Service and the Custom attributes has the correct value:

When I run the My inbox extended App the S2 view retrieves the custom attributes but whitout data:

0
Former Member

If found that the S2 controller has a Select statement with only the standard attributes:

If i change this "aSelectProperties" array in execution time, the App shows the custom attributes correctly

1