Skip to Content

How to provide ODATA service for sth like Select Option in a Web application?

Hi Experts,


In UI5 application, We want to create something like search help for a single field. For exmaple, A button next to field SalesOrder ID triggers a search help with search criterias Sales Group, Sales Offices and so on. This is just like the classic ABAP dynpro field.

Need suggestion in SAP GW service generation:

  • For the GW, how can I create a service which provide enough information to outside world?
  • Is Annotation related in this scenario?
  • Is there any document or step by step about this?

Thanks in advance.

Cain Sun

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Sep 23, 2015 at 04:37 AM

    Hello Sun,

    If at all you have Existing Search help which will full fill your requirement then, please check the below once ->

    Importing Search Help as a Data Source - SAP NetWeaver Gateway - SAP Library

    Creating OData service based on Search Help

    You can also create a service by implementing QUERY/Get_EntitySet which will take Sales Group, Sales Offices and so on as filter parameters as input and return the matching results.



    Add comment
    10|10000 characters needed characters exceeded

    • Hi Ashwin,

      Thanks for your help. The action of a SH is really like one for RFC. I think it is because SH itself is something like FM or is a FM in ABAP actually. But imagine a scenario we have a screen with 10+ input fields for search, 6 of them have SHs. Then 6 entity types should be created. And the UI guys spend a lot of effort on mapping ODATA metadata to UI elements.

      Recently, one of our UI5 guy told me that there is a new element 'Smart Field', which use 'Annotation' of GW service to generate a popup SH dialog window directly. This may make UI5 develoment earsier than before. So this is the reason I post this question here.

      I did some research on the feature 'Annotation', which is additionaly some Machine-Readable description tags in the XML sent to client. Annotation offer semantic or capability description to the original ODATA service. For example, to mark the current property (field of an Entity) is updatable or not. It si also possible to be used for UI5 library, which can generate some popup window for Search Help.

      Based on these concept I got some questions and am looking forward to some examples or demo scripts:

      1 Annotation is generated from an object 'Vocabulary file' provided by SAP. There were standard ones like CORE, MEASURE, UI. So in my scenario, which one and what TERMs in it should be used? and How to use it?

      2 How to get the search help result data. Because in GW/ODATA service, data should be retrieved in QUERY/READ method which is implemented by a method in ABAP class. So if we use Annotation, how to get thiese daa?

      3 Since this is a new feature, where can I find latest information on it? I do have the Annotation explanation, and how tag works. But I am looking for some documents to describe the Standard SAP Vocabuary File like VOC_UI.

      Thanks again for help and anyone reading this.