Official Content

The SAP BAPI Import feature (technically known as GeneXus™ ERP Connector) is executed from within GeneXus™ IDE.

image_20231211010_1_png

Applications developed with GeneXus integrate with SAP, interacting with its Business Objects through the BAPIs defined and maintained in the SAP Business Objects Repository (BOR).

Through SAP BAPI Import, GeneXus,  among other things, reads the Meta Data of the BAPIs using its RFC (Remote Function Call) interface, known as BOR-API.

SAP BOR API

RFC calls are made using the SAP Connector (SAP Connector for Microsoft .NET).

After you enter the corresponding credentials, SAP BAPI Import connects to a SAP server an inspection of all its BAPIs.

This BAPI “inspector” is a “browser” of objects, which, by accessing the BAPIs catalog (the BOR of the SAP installation to which it is connected), is capable of showing the hierarchy of SAP components and the types of Business Objects in a “tree” structure.

Not only does SAP BAPI Import show us that structure, but it also shows, for each BAPI corresponding to a BO, its methods, parameters and all related information. It allows to select  any methods of a BAPI to test its execution directly within the tool and also "import" them into the GeneXus™ KB, creating External Objects of the BAPI with all its methods (when executed from within GeneXus™), or generating an xpz with that External Object when the tool is executed in stand-alone manner).

When this EO is used in a GeneXus™ object, and the application is generated and executed, an RFC call to the corresponding BAPI is made.

The interface of SAP BAPI Import is similar to that of the SAP BAPIs Browser, accessed in an installation of SAP R/3 through "SAP Menu/Tools/Business Framework/BAPI Explorer", with this appearance:

SAPBapiBrowser1

Upon selecting a BO, it shows the BAPI’s different methods:

SAPBapiBrowser2

And for each element in the "i" button, in blue, it shows its Help:

SAPBapiBrowser3

  • To access the BOR Program Interface and show the information in tree or list format, GeneXus™ ERP Connector uses the following function modules:
    • SWO_QUERY_OBJTYPES
    • SWO_QUERY_API_OBJTYPES
    • RPY_BOR_TREE_INIT
    • RPY_BOR_TREE_EXPAND
    • SWO_QUERY_OBJTYPE_INFO
    • SWO_QUERY_OBJTYPE_
    •  SWO_QUERY_OBJTYPE_DOCU
    • SWO_QUERY_BASEDATA
    • SWO_QUERY_KEYFIELDS
    • SWO_QUERY_ATTRIBUTES
    • SWO_QUERY_METHODS
    • SWO_QUERY_EVENTS
    • SWO_QUERY_PARAMETERS
    • SWO_QUERY_RETURNCODES
    • DDIF_FIELDINFO_GET 
  • For processing the SAP Business Objects it uses the following function modules of the BOR Runtime Environment:
    • SWO_TYPE_INFO_GET
    • SWO_CREATE
    • SWO_INVOKE
    • SWO_FREE
    • SWO_OBJECT_ID_GET
    • SWO_OBJECT_ID_SET
    • SWO_SET_ENVIRONMENT
  • And lastly, in addition to the BOR-API mentioned above, it uses the RFMs (Remote Function Modules) present in the RFC1 Group of Functions:
    • RFC_FUNCTION_DOCU_GET
    • RFC_FUNCTION_SEARCH
    • RFC_GROUP_DOCU_GET
    • RFC_GROUP_SEARCH

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant