Create an API Factory Runtime Class with the Wizard

Here we describe how you can create a runtime class with the API Factory Wizard which is regarded as "easy mode" since you don’t need to care about the technical aspects (no individual metadata class needed).

Scenario

You want to create a POST Endpoint named newSalesorder

  • Start Transaction /NEPTUNE/AF_WIZARD in SAP GUI

600

  • Leave "Easy" selected and and put as classname ZCL_DR_SALESORDER_RUNTIME

600

  • Don’t define any Tags in the next step, just click "Continue".

600

  • Create the NEW_SALESORDER Endpoint as a post Operation

600

  • Define a name for the Interface which will contain all POST endpoints. You can simply use the already proposed name ZIF_DR_SALESORDER_RUNTIME_POST

600

  • Complete the wizard and assign a Package in the upcoming Popups. If you assign a package <> $TMP you will also need to specify a transport request.

600

600

600

  • After that you will automatically be guided to SE80 with class ZCL_DR_SALESORDER_RUNTIME.

  • Navigate to the method ZIF_DR_SALESORDER_RUNTIME_POST~NEW_SALESORDER and add some Parameters and ABAP Code

  • Activate the class and the Interface afterwards

600

After activating the class and the interface you should see it in the API Factory Cockpit Application in our Cockpit:

600

You then need to assign policies which fit to your user or enable the API globally with the "Unrestricted API Engine" Switch set to "YES" in the detail section of the API (click inside the row of ZCL_DR_SALESORDER_RUNTIME)

600

Finally, you can test your API with Swagger UI.

600

600