cancel
Showing results for 
Search instead for 
Did you mean: 

XSODATA Service for Attribute Views

Former Member
0 Kudos

Hi,

I have created a Attribute View and trying to consume it in UI5 via ODATA Service .

Code for XSODATA:

service {

  "_SYS_BIC"."Nik_HANA/AT_EMPLOYEE_ADDRESS" as "Employee_table" keys local generate "EmployeeId";

            }

In UI5 Application I am not getting all the coloumns of the view only the coloumns of first table displayed .

Thanks,

Nikhil.

Accepted Solutions (0)

Answers (2)

Answers (2)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You have the schema name on the front of the specification and therefore accessing this as the catalog object.  This is not recommended as changes to the view won't be reflected in the service without reactivating the service. For repository objects please just provide the package path :: model name like the following example:

service {

  "sap.hana.democontent.epmNext.models::AT_BUYER"

  as "BusinessPartners"

  keys("PartnerId");

}

This could explain why you aren't seeing all columns. If you added the columns to the view after the service activation, they wouldn't be reflected. However if you change to the repository specification any changes are picked up automatically by the service.

Former Member
0 Kudos

Thanks Thomas for your Reply .

Now I have used MyPackage::AT_EMPLOYEE . But still the UI5 Application is not displaying the columns of second table in the attribute view.

Attribute view consist of 2 tables Employee Table and Address Table both from EPM Model.

I also checked the Service but it is only displaying the columns of Employee table

http://dewdftzld018u.pgdev.sap.corp:8001/XSJS_UI/Table.xsodata/Employee_table?$top=4&$format=json

Thanks,

Nikhil Arya.

sreehari_vpillai
Active Contributor
0 Kudos

Nikhil,

Provide us some screenshots(entity set output in browser-json and your attribute view output columns)

Sreehari

Former Member
0 Kudos

Hi Sreehari,

Please find the screen shot of Attribute view . In this all the columns are displayed .

Screen shot of UI5 Application :

Thanks,

Nikhil Arya.

sreehari_vpillai
Active Contributor
0 Kudos

hay,

looks like you bound the entity set to the ui5 table in a wrong way. Execute the entity set URL in JSON format and cross check if you are seeing all the columns there or not. I suspecct your UI5 application code you have written .

Sreehari

Former Member
0 Kudos

Hey ,

I have checked the ODATA file in Browser in JSON format but it is not showing me the columns of second table meaning all the columns of attribute view are not visible.

Thanks,

Nikhil Arya.

monalisa_biswal
Contributor
0 Kudos

hi,

While designing the attribute view, are the columns from the other table are also added in the output?

First check in data preview of attribute view, if all the columns are coming as per your requirement.

Where you are checking the columns, in the metadata of odata service?