Skip to Content
0

Fiori App Extension : Display G/L Account Line Items Custom Fields Bind Error

Jan 25, 2017 at 12:39 PM

398

avatar image
Former Member

Hi,

I am facing an issue while trying to extend Display G/L Account Line Items. I had redefined the standard service used by this app and added the custom z-fields to the entity type 'GLV_GL_ACCOUNT_LINE_ITEMS'. The fields were added to the corresponding ABAP Structure as well. The ABAP Logic to fetch data for these custom fields were also added to the respective GET_ENTITYSET Method in DPC_EXT Class of the custom redefined service. The service fetches the data for the standard as well as the custom fields. Also, the metadata has these fields in the respective entity-type where they were added.

After this step, I created an app extension on the SAP Web IDE and replaced the standard service with the custom redefined service. The custom Z-Fields are displayyed as columns in the smart table. But they don't render any data. When I went through the batch calls being made, I found that the custom fields are not present in $select inside the GET query on the batch service call irrespective of the custom field column visible in the smarttable view or not.

So my question is, did I miss any step in the oData Service Redefinition or I have to code something more in the app.

If anyone has done this before,a Help Documentation would be helpful :)

Further Information :

Standard app : FIN_GL_LITB

Thanks and Regards,

Balakrishna Sampath

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
avatar image
Former Member Aug 08, 2017 at 07:25 AM
0

Hi,

A senior at my firm got the issue working by creating annotations for the custom fields. This was done by redefining the DEFINE method of the mpc_ext class of the custom odata service in the following manner:

method DEFINE.


DATA: lo_entity_type TYPE REF TO /iwbep/if_mgw_odata_entity_typ,

lo_property TYPE REF TO /iwbep/if_mgw_odata_property,

lo_annotation TYPE REF TO /iwbep/if_mgw_odata_annotation.



super->define( ).


cl_fis_sadl_annotation=>dimension( io_model = model

iv_entity_type = 'Invoice'

iv_property = 'zcustomproperty1'

).


cl_fis_sadl_annotation=>dimension( io_model = model

iv_entity_type = 'Invoice'

iv_property = 'zcustomproperty2'

).


endmethod.

where zcustomproperty1 and zcustomproperty2 are the custom properties added to the invoice entity type of the custom odata service.

Share
10 |10000 characters needed characters left characters exceeded
Dong Nguyen Apr 28, 2017 at 06:43 AM
0

Hello Balakrishna Sampath,

Could you check on Gateway Service/ Data Model/ Entity's properties where has your custom fields. On the column Semantics, set value "aggregate". Then, generate the Odata service.

Hope that help.

Dong Nguyen

Share
10 |10000 characters needed characters left characters exceeded
GAURAV SARDANA Aug 03, 2017 at 09:56 AM
0

Hi Sampath,

Did you find the solution for it..? I am also facing the same problem.

Please let me the know the solution if you have got it..

Warm Regards,

Gaurav Sardana

Share
10 |10000 characters needed characters left characters exceeded