PackagePackagetypeA library you install and call yourself.See every one →What this type is →independently maintainedindependently maintainedoriginPublished by one person or a small company outside SAP. Says nothing about quality; the readings say that.See every one →

ABAPFire

An ABAP client library for Firebase's Realtime Database REST API, with email-and-password authentication and methods to read, set, update, push and remove data at a path.

Talking to Firebase's Realtime Database from ABAP otherwise means calling its REST API by hand. The library wraps that API behind ABAP methods for email-and-password authentication and for reading, setting, updating, pushing and removing data at a path, and it passes through Firebase's own query parameters (shallow, orderBy, startAt, endAt, equalTo, limitToFirst, limitToLast). It authenticates only with email and password, not Firebase's other sign-in methods.

Facts

Last pushLicenceMIT

Where it sits

Lives in
Provides
HTTP clientsABAPHTTP clientscapabilityCalling an HTTP API outside the system from application code, with the request, the credential and the response handled by a client each time the call is made. Serving HTTP is the other direction, and where the address and the credential are kept is [destinations](capability:destinations).

Who is behind it

FrancescoFrancescoPersonMaintains this
In the atlas: maintains 1, contributes to 1
@alborghetti
maintainerLars HvamPersonContributes to this
In the atlas: maintains 13, contributes to 92, wrote 1
@larshp
1 contributor

Before choosing this

Signals

ActivityQuietNo published releases; repository quiet for 95 months

It publishes no releases, and its repository has been quiet for at least 24 full months. This may be normal for stable software; check whether its current state still fits your use.

What it declares

Every artifact

Type
Package
Origin
Independently maintained

As a package

Where it runs
does not say
Distributed through
abapGit

Connections1

README

quoted from alborghetti/ABAPFire under MIT, read
alborghetti/ABAPFire/README.mdOn GitHub

Tested SAP release: ABAP 740 SP9

ABAPFire

ABAP Firebase REST API Helper Library

Installation

Clone it using abapGit

Install abapGit, then clone the repository in a package (e.g. $ABAPFIRE).

Install Google certificate

Install Root CA from Google Internet Authority G2 using transaction STRUST in SSL identity ANONYMOUS.

Usage

Program ZABAPFIRE_DEMO provides usage examples.

Initialize the Application

To initialize the library, just pass to it your firebase configuration:

DATA:
  firebase     TYPE REF TO zabapfire_cl_firebase,
  ls_config    TYPE zabapfire_cl_firebase=>ty_firebase_config.
  
  ls_config-apikey = '[your apikey]'.
  ls_config-authdomain = '[your authdomain]'.
  ls_config-databaseurl = '[your databaseurl]'.
  ls_config-messagingsenderid = '[your messagingsenderid]'.
  ls_config-projectid = '[your projectid]'.
  ls_config-storagebucket = '[your storagebucket]'.

  firebase = zabapfire_cl_firebase=>initialize_app( ls_config ).
User Authentication

The library support only email and password authentication:

TRY.
      firebase->auth->authenticate_with_email(
        EXPORTING
        email = p_email
        password = p_pass ).
    CATCH zcx_abapfire_firebase INTO lcx_firebase.
      WRITE lcx_firebase->get_text( ).

  ENDTRY.
Retrieve firebase data
TRY.
    ls_parameters-order_by = 'carrid'.
    ls_parameters-equal_to = 'AC'.
    firebase->db->get(
        EXPORTING
        path =  p_path
        parameters = ls_parameters
        IMPORTING
        child = lt_abap ).
  CATCH zcx_abapfire_firebase INTO lcx_firebase.
    MESSAGE i000(zabapfire_msg) WITH lcx_firebase->get_text( )
      DISPLAY LIKE 'E'.
    EXIT.
ENDTRY.

If your target ABAP structure contains a column with name $KEY, firebase generated unique keys are saved in this column:

 TYPES:
      BEGIN OF ty_abap,
        $key        TYPE string.
          INCLUDE STRUCTURE sflight.
  TYPES:
     END OF ty_abap

retrieve firebase keys

For data retrieving, following query parameters are supported:

  • shallow: Limit the depth of the data returned. If the data at the location is a JSON primitive (string, number, or boolean) its value will simply be returned. If the data snapshot at the location is a JSON object, the values for each key will be truncated to true.
  • orderBy: Set a sequence order that can be used to filter the data in combination with startAt endAt and equalTo parameters.
  • startAt: Set an arbitrary starting point.
  • endAt: Set an arbitrary ending point.
  • equalTo: Filter on specific value.
  • limitToFirst: Set a maximum number of children for which to receive data.
  • limitToLast: Set a maximum number of children for which to receive data in reverse order.

Refer to official firebase documentation for more info.

Save data to firebase
Set

Writes data to firebase Database location. This will overwrite any data at this location and all child locations.

SELECT * FROM sflight
INTO CORRESPONDING FIELDS OF TABLE lt_abap.
TRY.
    firebase->db->set(
      EXPORTING
        path =  p_path
        child = lt_abap ).
  CATCH zcx_abapfire_firebase INTO lcx_firebase.
    MESSAGE i000(zabapfire_msg) WITH lcx_firebase->get_text( )
      DISPLAY LIKE 'E'.
    EXIT.
ENDTRY.
Update

As opposed to the set( ) method, update( ) can be use to selectively update only the referenced properties at the current location (instead of replacing all the child properties at the current location).

TRY.
    firebase->db->update(
      EXPORTING
        path =  p_path
        child = lt_abap ).
  CATCH zcx_abapfire_firebase INTO lcx_firebase.
    MESSAGE i000(zabapfire_msg) WITH lcx_firebase->get_text( )
      DISPLAY LIKE 'E'.
    EXIT.
ENDTRY.
Push

Generates a new child location using a unique key and return the generated unique key.

TRY.
    LOOP AT lt_abap ASSIGNING <ls_abap>.
      <ls_abap>-$key = firebase->db->push(
         EXPORTING
           path =  p_path
           child = <ls_abap> ).
    ENDLOOP.
  CATCH zcx_abapfire_firebase INTO lcx_firebase.
    MESSAGE i000(zabapfire_msg) WITH lcx_firebase->get_text( )
      DISPLAY LIKE 'E'.
    EXIT.
ENDTRY.
Remove

Removes the data at this firebase Database location.

TRY.
    firebase->db->remove(
      EXPORTING
        path =  p_path ).
  CATCH zcx_abapfire_firebase INTO lcx_firebase.
    MESSAGE i000(zabapfire_msg) WITH lcx_firebase->get_text( )
      DISPLAY LIKE 'E'.
    EXIT.
ENDTRY.
MIT, read
HTTP clients
  1. abapify/fetch-cloudCloud-compatible plugin for the abapify Fetch API polyfill
  2. abapify/fetch-legacyLegacy-release Fetch API implementation for outbound HTTP in ABAP
  3. abapify/fetchFetch API-style HTTP polyfill for cloud and classic ABAP
  4. B-Tocs ABAP SDKWeb service client and connector layer for calling out of ABAP
  5. abap-soql-queryABAP report that runs Salesforce SOQL queries and exports results
  6. abap2gappsABAP API for Google Apps, with upload to Google Docs
  7. ABAP SDK for AzureABAP classes for calling Azure services from SAP processes
  8. cross-http-clientHTTP client for classic on-premise ABAP and ABAP Cloud
  9. abap2gsheetABAP framework wrapping the Google Sheets API for SAP S/4HANA

Details

Sources3
dotabapdiscovered herechecked
github.com/alborghetti/ABAPFiretree, pushes, contributors, CIchecked
README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
discovered viadotabap
first seen in the atlas
ecosystem and domainabap, protocols-and-apis
abaplint
issues under its own abaplint configuration1,086
lines2,532
statements1,438
objects12
files20
analysed, master
abaplint version2.120.84
Contributors1

From the repository’s contributor list, .

History in the atlas1
  1. First seen.
For your agent
Ref
artifact:alborghetti-abapfire
JSON
/artifacts/alborghetti-abapfire.json
MCP
Connecting an agent