Skip to content

Multi target low footprint ABAP table maintenance

License

Notifications You must be signed in to change notification settings

open-abap/open-table-maintenance

Repository files navigation

open-table-maintenance

Works with:

  • open-abap via npm install && npm run start-local
  • Steampunk
  • Embedded Steampunk
  • On-Premise v740sp05 and up
  • (Code is automatically downported on build, so it should also work with 702)
  • SAP Business Technology Platform (BTP) Cloud Foundry environment

Install with abapGit, or copy paste into a system

Warning: only hardcode the table name, don't use with important tables, use at own risk!

Use-case: On-prem shim

  METHOD if_http_extension~handle_request.

    DATA(result) = NEW zcl_otm_table_maintenance( 'ZOPENTEST' )->serve( VALUE #(
      method = server->request->get_method( )
      path   = server->request->get_header_field( '~path' )
      body   = server->request->get_data( ) ) ).

    server->response->set_data( result-body ).
    server->response->set_content_type( result-content_type ).
    server->response->set_status(
      code   = result-status
      reason = CONV #( result-status ) ).

  ENDMETHOD.

Use-case: Steampunk shim

  METHOD if_http_service_extension~handle_request.

    DATA(result) = NEW zcl_otm_table_maintenance( 'ZOPENTEST' )->serve( VALUE #(
      method = request->get_method( )
      path   = request->get_header_field( '~path' )
      body   = request->get_binary( ) ) ).

    response->set_binary( result-body ).
    response->set_header_field(
      i_name = 'Content-Type'
      i_value = result-content_type ).
    response->set_status(
      i_code   = result-status
      i_reason = CONV #( result-status ) ).

  ENDMETHOD.

Deploy to SAP Business Technology Platform (BTP) Cloud Foundry environment

Prerequisites

  • Cloud Foundry CLI
  • Multi Target App build tool (mbt)

Installation

Login to your SAP BTP Cloud Foundry environment

npm run cf:build
npm run cf:deploy

Then you can start the app by adding /abap/ at the end of the URL.

Removal

npm run cf:undeploy

About

Multi target low footprint ABAP table maintenance

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •  

Languages