Skip to Content

Generated parameters in OData service

Hello OData/SEGW experts,

I need to develop a generic HR Infotype OData service that allows retrieving/updating of any infotype record. So instead of defining an Entity for each different infotype, with all of the specific infotype fields as parameters list of the Entity, I want one Entity called “Infotype”, with INFTY, PERNR, BEGDA, ENDDA, SUBTY, SEQNR as key/filter and then a generated set of attributes, (i.e. depending on the Infotype being retrieved/updated).

Gateway Builder (SEGW) however requires a predefined set of parameters (columns) for each Entity and I know of no way to do this generically – if anyone has an idea I’d be grateful to hear from you.

(The only idea I have is to add a column “InfotypeData” which contains the extracted Infotype data in JSON format but not sure if that is OK in terms of the OData standard, for example if that will give problems when an XML response contains some JSON ..).

Any advice is much appreciated !

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Jul 27, 2016 at 02:29 PM

    Hi Jan,

    I think you would want to define some type of entity in the service named maybe "Definition" or "Config" and it would have some predefined set of columns that would give metadata about each field in an infotype. I would say at a minimum you would want field name, internal data type, field length (for applicable types), description, and maybe one or two others that you can think of. In that way when you launch your application and a user selects some infotype you would call out to get your definition first which would return a list of repeating values that give all the data about the structure (FM DDIF_FIELDINFO_GET or class CL_ABAP_STRUCTDESCR). When you go do a read on an infotype entity then it would simply return a list of repeating values with field name and field value which you can then match to your definition.

    Last year several members of our organization were doing an HR upgrade and I did a little bit of work on it. I think I recall some of the standard ESS/MSS OData stuff in BSP taking an approach like this.

    Regards,

    Ryan Crosby

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Jan,

      We made a modified version of the standard BSP application 'HRPAO_SEARCH_C' and I believe the service in question was simply named 'QUICKVIEW' or something like that. I cannot verify that because I don't have access to view in SEGW for our HR system any longer.

      Regards,

      Ryan Crosby

  • Posted on Jul 27, 2016 at 02:12 PM

    I do not think your solution is ok for OData standards/uses.

    I think you should build the different entities to have a more consistent approach.

    But i'm not an expert: i started to play with OData and Gateway this month :\

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 27, 2016 at 02:46 PM

    Hi Jan,

    That is a really tall order.

    I suggest to just search the fiori library for Infotype related stuff, then install that and see which Odata services are created and what they do.

    What is the business requirement? Where will this service be used?

    Kind regards, Rob Dielemans

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.