Search code examples
sap-cloud-sdk

V4 Generator - OData V2 Non-Simple Function Import Parameters


I am using version odata-v4-generator-cli 3.40.0 to generate a client from the SAP B1 Service Layer definition.

However, there are many errors like the following:

Function import DraftsService_SaveDraftToDocument has non-simple type for parameter Document, but OData V2 does not support non-simple types as function import parameters.

And the function is not present in the generated client code. The error seems to indicate it is a limitation with V2, but this is a V4 definition with the V4 version of the generator.


Solution

  • The log message you are seeing is indeed very misleading - in fact it is plain wrong. We have a fix for the incorrect message in our pipeline.

    In general, however, generating function imports (V2) and (un-)bound actions (V4) with non-primitive parameters is not yet supported in our OData generators. This is why these methods are not included in the generated code.

    We are receiving many requests asking for this feature and have it rather high up in our backlog. Unfortunately, I cannot give any details for a release schedule - I will update this answer when we have more concrete information.


    EDIT (06/14/2021)

    With release 3.46.0 of the SAP Cloud SDK for Java, we have shipped a first version of bound functions and actions.