Deploy a UI5 application to AS ABAP using report /UI5/UI5_REPOSITORY_LOAD

Once you have created your SAPUI5 or FIORI app in Eclipse, the project can be uploaded into the SAPUI5 repository as a BSP application.

The ABAP report /UI5/UI5_REPOSITORY_LOAD can be used to upload the UI5 application.


  • Execute the report /UI5/UI5_REPOSITORY_LOAD in se38.
  • Enter the Z name for the SAPUI5 App.
  • Choose Upload.

2018-02-06 23_34_01-Upload, Download, or Delete Apps to or from SAPUI5 ABAP Repository

  • Execute.
  • A dialog box will appear prompting to enter the application source directory.
  • Enter the Eclipse project source directory, WebContent, and click on OK.
    • A summary of the objects to be uploaded is displayed.

2018-02-06 23_18_59-Load SAPUI5 Application from File System to the SAPUI5 ABAP Repository.

  • Click on the green highlighted link.
    • The files are now uploaded.
  • The following is shown in the status bar.

2018-02-06 23_24_47-Upload, Download, or Delete Apps to or from SAPUI5 ABAP Repository

  • Check the BSP application zwalkthrough in se80.

2018-02-06 23_27_35-Web Application Builder_ Edit Page ZWALKTHROUGH

  • Fix the src location of the file sap-ui-core.js if needed to


  • Also, check the service name zwalkthrough in SICF.

2018-02-06 23_25_35-Define Services

  • Right-click on choose Test service.

2018-02-06 23_48_03-Define Services

  • The application runs successfully in the browser.

2018-02-06 23_47_19-localhost_8000_sap_bc_ui5_ui5_sap_zwalkthrough_index.html_sap-client=001





Implement a Gateway service (Part 3) – CRUD Operations

Now we can implement the rest of the CRUD(Create, Read, Update and Delete) operations. We will do it for the entityset SUBJECTSSET.

  • Create – Redefine the method SUBJECTSSET_CREATE_ENTITY

METHOD subjectsset_create_entity.
DATAls_subject LIKE er_entity.

io_data_provider->read_entry_dataIMPORTING es_data ls_subject ).

ls_subjectmandt symandt.

er_entity ls_subject.

INSERT INTO zsubjects VALUES ls_subject.

  • Read – Redefine the method SUBJECTSSET_GET_ENTITY


DATAls_key_tab LIKE LINE OF it_key_tab,
lv_id      TYPE zsubjectsid,
lv_subject TYPE zsubjectssubject.

CLEAR ls_key_tab.
READ TABLE it_key_tab INTO ls_key_tab
WITH KEY name ‘Id’.
IF sysubrc EQ 0.
lv_id ls_key_tabvalue.

CLEAR ls_key_tab.
READ TABLE it_key_tab INTO ls_key_tab
WITH KEY name ‘Subject’.
IF sysubrc EQ 0.
lv_subject ls_key_tabvalue.

FROM zsubjects
WHERE id lv_id
AND subject lv_subject.
IF sysubrc NE 0.
CLEAR er_entity.



  • Update – Redefine the method SUBJECTSSET_UPDATE_ENTITY

METHOD subjectsset_update_entity.
    DATAls_data TYPE zcl_zstudents_mpc=>ts_subjects.
    io_data_provider->read_entry_dataIMPORTING es_data ls_data ).
    ls_datamandt symandt.
    UPDATE zsubjects FROM ls_data.

  • Delete – Redefine the method SUBJECTSSET_DELETE_ENTITY

METHOD subjectsset_delete_entity.

    DATAls_key_tab TYPE /iwbep/s_mgw_name_value_pair,
          lv_id      TYPE zsubjectsid,
          lv_subject TYPE zsubjectssubject.

    READ TABLE it_key_tab WITH KEY name ‘Id’ INTO ls_key_tab.
    IF sysubrc 0.
      lv_id ls_key_tabvalue.

    READ TABLE it_key_tab WITH KEY name ‘Subject’ INTO ls_key_tab.
    IF sysubrc 0.
      lv_subject ls_key_tabvalue.

    DELETE FROM zsubjects WHERE id lv_id AND subject lv_subject.


Install license key for SAP Netweaver AS ABAP 7.51 Innovation Package

When the license of your AS ABAP Server is about to expire, a warning message will be shown each time you log into the system.

2018-01-31 21_43_07-

License expiration date: 11.02.2018 (in 11 days)

Before applying a new license

The status is Expires Soon.2018-01-31 21_50_15-SAP License Administration

Note: Do not use the site It is only accessible to super administrators in your organisation.

Steps to install a new license key in AS ABAP trial version

2018-01-31 22_07_10-SAP License Keys for Preview, Evaluation and Developer Versions

  • Fill the required details, select Agree and click on Generate.

2018-01-31 22_10_07-SAP License Keys for Preview, Evaluation and Developer Versions

An NPL license file will be generated.

  • Go to the transaction slicense.
  • Right-click on the current license entry and choose Delete License.

2018-01-31 22_33_48-

The license will be deleted.

2018-01-31 22_34_47-

2018-01-31 22_35_50-SAP License Administration

  • Right-click the empty row on the Digitally Signed Licenses tab and choose Install License. Alternatively, use the Edit menu.

2018-01-31 22_37_25-SAP License Administration

  • Browse and select the NPL file obtained earlier.

2018-01-31 22_40_21-

  • Click OK and you will see that the license has been installed properly.

2018-01-31 22_42_13-SAP License Administration

Important SAP Gateway transactions


tx Description
 SEGW  Service Builder
/IWFND/MAINT_SERVICE Maintain services
/IWFND/GW_CLIENT Execute and test services
/IWFND/ERROR_LOG Error Log for Gateway
/IWFND/TRACES Trace tool
/IWFND/APPS_LOG Application log
/IWBEP/REG_SERVICE Register services. Functionality is built-in SEGW

Note: Always precede transactions starting with / with /n.

Implement a Gateway service (Part 2) – Coding the Query operation

After having defined the Data Model in part1, you have to implement the business logic in ABAP to retrieve the data from the backend.

  • Expand the Runtime Artifacts folder.
  • Double-click on the Data Provider Extension Class, namely ZCL_ZSTUDENTS_DPC_EXT. Double-click on the class again to open the Class Builder.
  • Go to change mode.
  • Select the method STUDENTHEADERSET_GET_ENTITYSET and click on Redefine Method.


  • Some placeholder code appears in the method as shown below.


  • Delete the placeholder code and type the code shown below. Then, activate.


SELECT FROM zstudent

IF et_entityset IS INITIAL.
iv_msg_type   symsgty
iv_msg_id     symsgid
iv_msg_number symsgno
iv_msg_v1     ‘No records in db’

RAISE EXCEPTION TYPE /iwbep/cx_mgw_busi_exception
textid            /iwbep/cx_mgw_busi_exception=>business_error
message_container mo_context->get_message_container).


  • The Redefinitions folder shows that the method has been successfully redefined.


  • Check the output again for the entity set StudentHeaderSet. Data is now fetched from the backend table as expected.



Implement a Gateway service (Part 1) – Define a data model based on Data Dictionary Structure

We are going to define a Gateway service in the Service Builder SEGW.

The first stage of implementing a service is to define the data model. For that, we will create custom z tables from scratch.

  • Create 2 tables named ZStudent and ZSubjects as shown below.




  • In transaction SEGW, create a new project.


  • Give the project name ZStudents and a description.


  • Right-click on Data Model node and choose Import->DDIC Structure. We are not creating entity types from scratch as the data tables are already created in the Data Dictionary in the previous step.


  • Enter a Name, ABAP Structure, select Create Default Empty Set and click on next.


  • Select all the fields to include in the service for the student and click on Next.


  • Specify the field ID as key.  Click on Finish.


  • The result is as shown below. The Entity Type, Entity Set and the Service Implementation have been generated.


  • Similarly, create the child Entity type and Entity Se. Import another DDIC object for Subjects.


  • Click on the Generate Runtime Objects icon. The Service Builder will generate Model Provider classes and Data Provider classes.


  • Open the Service Maintenance node and click on Register. Specify the local package, the External Service Name and click on Ok.


  • Click on Maintain to open the transaction /IWFND/MAINT_SERVICE.


Select the service from the Service Catalog and in the ICF Nodes section, click on SAP Gateway Client to test the service.


The URI of the service is /sap/opu/odata/sap/ZSTUDENTS_SRV/. You can use various oData Query options such as $metadata, ?format=xml and sap-ds-debug=true.

  • Click on Execute to test the service.


  • Click on Add URI Option and choose $metadata and sap-ds-debug=true options.
  • Execute to see the results below.


Do note that at this point we can only access the metadata of the service. The service will not return any data yet. If you try to get the data for an entity set, you will get an error as shown below.


Business data retrieval logic will be implemented in part 2.

Stop SAP NetWeaver AS ABAP instance in Linux

Make sure you are logged in as user npladm.

Issue the command stopsap ALL on the terminal.

vhcalnplci:npladm 52> stopsap ALL
Checking syb Database
Database is running
stopping the SAP instance D00
Shutdown-Log is written to /home/npladm/stopsap_D00.log
/usr/sap/NPL/D00/exe/sapcontrol -prot NI_HTTP -nr 00 -function Stop
Instance on host vhcalnplci stopped
Waiting for cleanup of resources
stopping the SAP instance ASCS01
Shutdown-Log is written to /home/npladm/stopsap_ASCS01.log
/usr/sap/NPL/ASCS01/exe/sapcontrol -prot NI_HTTP -nr 01 -function Stop
Instance on host vhcalnplci stopped
Waiting for cleanup of resources
stopping database NPL …
stop database completed successfully
Checking syb Database
Database is not available via R3trans