0

I would like to create a sales order with reference to a sales contract using the S/4HANA Cloud SDK. I do not see a get/set method for ReferenceSDDocument at the header- or item-level in the com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.salesorder.SalesOrder class, even though it is shown in the sample JSON-body in the POST of /A_SalesOrder in the API Hub. Not sure if I should be somehow using the SalesOrderField class, or something else ... or should be switching to the SOAP API.

scurry
  • 19
  • 5
  • 2
    Which version of the SAP S/4HANA Cloud SDK are you using? Are you using the latest one (2.13.2 at the time of this writing): https://mvnrepository.com/artifact/com.sap.cloud.s4hana/sdk-bom/2.13.2 – Emdee Mar 20 '19 at 14:35
  • Looking at 'External Libraries' in IntelliJ, it appears to be 1.11.1. I used the following to create the project:mvn archetype:generate -DarchetypeGroupId=com.sap.cloud.s4hana.archetypes -DarchetypeArtifactId=scp-neo-javaee6 -DarchetypeVersion=LATEST – scurry Mar 21 '19 at 13:49
  • Here is a snippet from pom.xml: com.sap.cloud.s4hana.cloudplatform scp-neo com.sap.cloud.s4hana s4hana-all – scurry Mar 21 '19 at 13:52

1 Answers1

0

As you are using version 1.11.1 of the S/4HANA Cloud SDK you have the OData VDM that corresponds to the state of S/4HANA at this point in time.

You now have two options:

  1. Use the newer scp-neo-javaee7 archetype. This exists in version 2.13.2 and supports the latest S/4HANA version.
  2. Create your own OData VDM for your system, check this blog for more information on how to do this.
Christoph Schubert
  • 1,089
  • 1
  • 8
  • 16