Usage and Test

This page helps you to use and test BAPI Application by using below mentioned procedure:

Create an Application

To create a BAPI application:

  1. In the AssistEdge Studio, navigate to the Admin tab and then the Applications sub-tab.
  2. Add an application of type Web API and specify all its properties.
  3. Specify the login URL for the SAP Instance.
    1. Typically, this URL is provided by the SAP-BASIS SMEs from the client’s IT team.
    2. This URL utilizes SAP’s internal HTTP/s server (SAP Netweaver web app server).
    3. Access to the HTTP/s server, port and the URL is required.
    4. The SAP SICF transaction code provides the URL, while the SAP SMICM transaction code provides the port. The default port is 8000. See herehere.
  4. Choose the Application Type as BAPI.
    The new application can be used now in an existing process or a new process.

Use API Activity in a Process

To use API activity in a process, follow below mentioned steps:

  1. In the AssistEdge Studio, select the Home tab and click Create New to create a new process.
  2. Open a new process or an existing process.
  3. Add an API Activity in the process designer.
  4. Select the new application created above.
  5. Select BAPI.
  6. Click on Browse to view all available BAPIs for the SAP instance configured for this application.
  7. From the API details page, select the BAPI to be invoked.
  8. Alternatively, log in to the SAP instance (see herehere), and browse to the BAPI using the BAPI explorer window provided by SAP (see herehere).
  9. Click Confirm.
  10. Configure Input, Output, and Headers.
    1. Click on Search Criteria Configuration and create the input arguments.
    2. Add out arguments to hold the output from the BAPIResponse.
    3. Click on Arguments next on Variables in the AssistEdge Studio.
    4. Configure parameters that are required to invoke the API by clicking the settings icon on the API Activity page.
    5. Under the settings icon, click on Headers to define headers required to invoke the API. For the BAPI activity, Authorization and Content-Type headers are typically required. E.g. Key: Authorization, Value: Basic
    6. Under the settings icon, click on Input Mapping to configure RequestXSLT for BAPI invocation.
    7. Select the process argument from the Process Argument XML to be replaced in RequestXSLT.
    8. In RequestXSLT, all the mandatory fields are marked with $$Y$$. While replacing specify the template to use. AssistEdge currently supports xsl:value of xsl:if, xsl:for-each and xsl:choose templates.
    9. Place the cursor on RequestXSLT at the location to insert the value.
    10. Right-click on the selected argument for the Process Argument XML, select which template to use and click on Confirm.
    11. Under the settings icon, click on Output Mapping to configure the ResponseXSLT to consume the response from BAPI invocation.
    12. Specify the same tags as in Process Argument XML, that is, <Argument></Argument> with “out-parameters” to be mapped inside the xsl:template tag.
    13. Select the item from the ResponseXML to be replaced in ResponseXSLT. While replacing, specify the template to use such as, xsl:value of xsl:if, xsl:for-each or xsl:choose.
    14. Place the cursor on ResponseXSLT at the location to insert the value.
    15. Right-click on the selected argument for ResponseXML, select which template to use and click on Confirm.
  11. Test the process.
    Click on Setup Environment and enter the credentials, if any. Test the process by clicking on Test Run. Adding a WriteLine activity after the BAPI response is received is useful to view the Response Value in the AssistEdge Studio.