Skip to content

Installation Guide

fdfurlan edited this page Jan 27, 2016 · 3 revisions

Welcome to Installation Guide!

SAP Gateway Service Creation

Step 1: It's necessary to create a SAP Gateway service as picture bellow:

Entity Types and Sets

Properties of Request Entity Type

Properties of Result Entity Type

Step 2: Generate Runtime objects.

Follow Runtime Artifacts are expected (names could be slightly different):

Runtime Artifacts

ABAP Implementation

It's necessary to "install" ABAP code in the class ending _DPC_EXT, in the case showed above, ZCL_ZABAP_ACTIVE_RE_01_DPC_EXT.

Step 3: Redefine following methods in ZCL_ZABAP_ACTIVE_RE_01_DPC_EXT:

  • /IWBEP/IF_MGW_CORE_SRV_RUNTIME~CHANGESET_BEGIN
  • /IWBEP/IF_MGW_CORE_SRV_RUNTIME~CHANGESET_END
  • REQUESTSET_CREATE_ENTITY
  • REQUESTSET_UPDATE_ENTITY
  • RESULTSET_CREATE_ENTITY
  • RESULTSET_DELETE_ENTITY
  • RESULTSET_GET_ENTITY
  • RESULTSET_GET_ENTITYSET
  • RESULTSET_UPDATE_ENTITY

And create follow methods bellow:

  • GET_FIELDS_LIST
    • Returning parameter: RE_FIELDS_LIST TYPE TY_T_PARSE_PARAMETER
  • GET_WHERE_CONDITIONS
    • Returning parameter: RE_WHERE_LIST TYPE TY_T_PARSE_PARAMETER
  • ITAB_FACTORY
    • Returning parameter: RE_REF_TABLE TYPE REF TO DATA
  • GET_FILLED_WORKAREA
    • Returning parameter: RE_WA_FILLED TYPE REF TO DATA

Copy the content of files at ./abap into correspondent method.

In the PROTECTED SESSION. include types from file ./abap/types.abap.

Activate whole class.

UI5 Instalation

Step : 4 Download Files

You can clone the Github repository or download ZIP file.

Step : 5 Change file ./abapActiveRecord/abapar.json to point to your service URI.

Testing

To test your service, just open index.html file in your browser, enter your user/password for your service and you should get a screen like that:

Success installation

Create Entity

Click on button "New Flight" and reload the page. A new flight should be created as bellow:

Create Entity

Read Value

Click on button "Read" and follow value should be retrieved in the "Price" field:

Read Value

Update Entity

Enter a new numeric value into "New Price" fiel, for example 350 and click on button "Change". Reload the page and new price should be changed in the table:

Update Entity - New price in the table

Delete Entity

To delete the entity created, click in the button "Delete Flight" and the flight created above will be deleted. Don't forget to reload the page.

Feedback

For questions/comments/bugs/feature requests/wishes please create an issue.