Contents

The SAPR3 connects and executes the various services deployed on the SAP system. This bridge receives a request XML and executes SAP BAPIs and RFCs. Every component instance can be customized to access any BAPI using the BAPI browser which allows you to choose any BAPI (pre-built and custom-built) by browsing the business objects in the SAP repository.

Points to note

The following third-party files need to be downloaded to use this component in windows.

  • sapjco3.jar
  • sapidoc3.jar
  • sapjco3.dll (Windows) OR libsapjco3.so (Linux)

The files can be downloaded from the SAP Service Marketplace. The following URL may be used to navigate to the third-party website from where these files can be downloaded: http://service.sap.com/.

After downloading the files, you need to Adding Resources to a Microservice to the SAPR3 component.

Configuration and Testing


 Figure 1: SAPR3 CPS

Connection Properties

Use Connection Details From Input

If enabled, the microservice will use the connection details from the input request. If any particular connection property is not given in input, then the value given in the cps will be used.

SAP Connection Configuration


Figure 2: SAP Connection Configuration 

  • SAP Connection Configuration: Clicking on SAP Connection Configuration opens the above dialog box with the below options:
    • Client: SAP Logon Client.
    • User Name: SAP Logon user.
    • Password: SAP Logon Password.
    • Language: SAP Logon Language.
    • Host: Host name of the application server.
    • System: SAP system number.
  • Commit Transaction: If yes, it commits the transaction after each request.
  • Is Sequence: If set to Yes, multiple inputs can be sent from a feeder.Nothen only one input sent will be processed.
  • Commit Mode: Enabled only when "Is Sequence" is set to Yes.It supports AFTER_DOCUMENT, AFTER_EACH_CALL & NONE
    • AFTER_DOCUMENT: Transaction is Committed after all the inputs are processed.
    • AFTER_EACH_CALL : For each input call, transaction gets committed.
    • NONE : Transactions are not committed.
  • Error Action: Enabled only when "AFTER_DOCUMENT" is set as Commit Mode.If set to ROLLBACK, it rollbacks all the transactions if any error occurs while processing multiple inputs. If set to COMMIT, then it commits all transactions till it processes all inputs or till it gets an error for any of the inputs.
  • Check IDOC Syntax: Checks the document's and the contained segment's syntax using all possible syntax checks. This property is enabled only when Operation Name is SEND_IDOC.
  • Use same targetNamespace for Input and Output: Select this to set same target namespace for both input and output schemas. Otherwise /IN(Input Schema), /OUT(Output Schema) will be appended to targetNamespace provided

Interaction Properties

Operation Name: Operations which need to be called upon SAP System can be configured here. The operations SEND_IDOC & INVOKE_BAPI can be selected from drop-down list.

INVOKE_BAPI

  • BAPI/RFC Name: When we click the ellipsis button, a dialog box appears from which we can select multiple BAPIs. For each BAPI selected, input and output ports are generated with their names as "<BAPI NAME>_IN", "<BAPI NAME>_OUT".

    Icon

    Multiple BAPIs can be entered manually semi-colon separated. Refer Figure 6 for example.


    Figure 3: Dialog to select BAPI/RFC Name 

SEND IDOC

  • Select IDOC: When user clicks the ellipsis button, a dialog box appears from asking for IDOC TYPE, Version and a load button which loads IDOCs of type mentioned. User can select an IDOC.
  • IDOC Type: Accepts wildcards '%' and '*', to fill all IDOCs in dropdown list. User can also enter IDOC Type. After entering wildcards/IDOC Type press the load button to populate drop-down with IDOCs of desired IDOC Type. For IDOC Type selected, input and output ports are generated with their names as "<DOC TYPE>_IN", "<DOC TYPE>_OUT".
  • Select IDOC: Select IDOC from dropdown list.
  • Extension: User can provide the extension name for basic IDOC, if needed.
  • Version: Enter the version of IDOC.


Figure 4: Select IDOC

Functional Demonstration

Configure the SAPR3 microservice to perform three calls to SAP System, i.e., to fetch User list, check existence of a particular user and check details of a user.

Scenario 1

SAPR3 microservice with multiple BAPIs support.


Figure 5: SAPR3 Component configured to invoke multiple BAPIs


Figure 6: Configuration


Figure 7: Sample Input


Figure 8: Sample Output

Scenario 2

SAPR3 Component with multiple inputs for single BAPI


Figure 9: Sample Flow


Figure 10: Configuration


Figure 11: Sample Input


Figure 12: Output with a successful call and a failed call.

As "Commit Mode" is set as AFTER_EACH_CALL in configuration, first call got committed while the second did not.

Useful Tips

After migration, save the route transformations present on the routes connecting the SAPR3 before reconfiguring the component.

Adaptavist ThemeBuilder EngineAtlassian Confluence