Read and Review Automation Anywhere Documentation

Automation 360

Close Contents

Contents

Open Contents

SAP BAPI package

  • Updated: 7/13/2021
    • Automation 360 v.x
    • Explore
    • RPA Workspace

SAP BAPI package

The SAP BAPI package contains actions to automate tasks and processes using SAP Business Application Programming Interface (BAPI). BAPI is a standardized method that enables a third-party application to interact with an SAP system.

Before you start

Perform the following actions within the SAP BAPI package as part of using the set of available actions:
  1. Establish a connection with the SAP application using the Connect action.
  2. Use the Create function action to create a user-defined function for the specified SAP BAPI function.

    Select the Begin sequence option to mark the start of a process followed by the actions to automate a task.

  3. Use the Run function action to run the function you have created using the Create function action.

    Select the End sequence option to mark the end of a process and the Commit transaction option to commit the changes.

Actions in the SAP BAPI package

The SAP BAPI package includes the following actions:

Action Description
Connect See Using Connect action for SAP BAPI.
Create function Creates an alias for a SAP BAPI function and saves it with an alias name. You can use the alias name in other actions to use that BAPI function in those actions.
  • In the Session name field, enter the session name you used to connect to the SAP application in the Connect action.
  • In the Function alias name field, enter the alias that you want to use for the BAPI function.
  • In the BAPI name field, enter name of the SAP BAPI function for which you want to create the alias.
  • Select the Begin sequence option if you want to execute the BAPI in a particular sequence to mark the start of a process.
Get field value Obtains data of a specific field from a function, table, or structure.
  • In the BAPI function alias field, enter the alias you have provided for SAB BAPI function using the Create function action.
  • Select one of the following option to specify whether you want to obtain data from a function, table, or structure:
    • Function: Enables you to get the value of a field from a function.
    • Table: Enables you to get the value of a field from a table in a SAP BAPI function.

      You must specify the Table alias from which you want to obtain data.

      You must use the Get table action before you use the Get field action to obtain the value of a field from a table in a SAP BAPI function. You must also specify the Table alias from which you want to get data.

    • Structure: Enables you to obtain data from a structure in a SAP application.

      You must use the Get structure action before you use the Get field action to obtain the value of a field from a structure in a SAP BAPI function. You must also specify the Table alias from which you want to obtain data.

  • In the Field name field, enter the name of the field from which you want to get data.
  • In the SAP BAPI session field, enter the session name you used to connect to the SAP application in the Connect action.
  • In the Save the output to a variable field, specify a string variable.
Get structure Obtains data from a structure using the function alias.
  • In the BAPI function alias field, enter the alias you have provided for SAB BAPI function using the Create function action.
  • In the Structure name field, enter the name of the structure from which you want to get data.
  • In the SAP BAPI session field, enter the session name you used to connect to the SAP application in the Connect action.
  • Select one of the following options to specify how you want to save the data retrieved from the structure:
    • Alias: Enables you to provide an alias for the structure and use the alias in other actions.
    • Variable: Enables you to store the data retrieved from the structure in a table variable.
Get table Gets tabular data from a table using the function alias.
  • In the BAPI function alias field, enter the alias you have provided for SAB BAPI function using the Create function action.
  • In the Table name field, enter the name of the table from which you want to obtain data.
  • In the SAP BAPI session field, enter the session name you used to connect to the SAP application in the Connect action.
  • Select one of the following options to specify how you want to save the data retrieved from the table:
    • Alias: Enables you to provide an alias for the table and use the alias in other actions.
    • Variable: Enables you to store the data retrieved from the table in a table variable.
Run function Runs the SAP BAPI function.
  • In the BAPI function alias field, enter the alias you have provided for SAB BAPI function using the Create function action.
  • Select the End sequence option to mark the end of a process and the Commit transaction option to commit the changes made during the process.

    If you want to end a sequence, you must select the Begin sequence option from the Create function action. If you have used queued Remote Function Call (qRFC), you must select the Commit transaction option to commit the changes you have made.

  • In the SAP BAPI session field, enter the session name you used to connect to the SAP application in the Connect action.
Set field value Sets data into a function, table, or structure using the function alias.
  • In the BAPI function alias field, enter the alias you have provided for SAB BAPI function using the Create function action.
  • Select one of the following options to specify whether you want to set data in a function, table, or structure:
    • Function: Enables you to set data in a function.
    • Table: Enables you to set data in a table in a SAP application.

      You must use the Get table action before you use the Get field action to obtain the value of a field from a table in a SAP BAPI function. You must specify the Table alias in which you want to set data. You can also select the Create new row option if you want to create a new row in the table and set value in that row.

    • Structure: Enables you to set data in a structure in a SAP application.

      You must use the Get structure action before you use the Get field action to obtain the value of a field from a structure in a SAP BAPI function. You must also specify the Structure alias from which you want to get data.

  • In the Field name field, enter the name of the field in which you want to set data.
  • In the Field value field, enter the value that you want to set.
  • In the SAP BAPI session field, enter the session name you used to connect to the SAP application in the Connect action.
Run standard workflow Enables you to run a standard workflow in SAP BAPI.
  • Use the Select workflow option to select the workflow from the Standard BAPI Selector dialog box.
  • The Import to BAPI section displays the import parameters for the selected workflow. You can select the Edit option from the action menu (vertical ellipsis) to specify a value for the parameters.
    • Select the Include option if you want to use that import parameter.
    • Select the Table tab to select a table variable containing the values you want to import to BAPI. Alternatively, select the Strings tab to specify the value manually.
  • The Export to BAPI section displays the export parameters for the selected workflow. You can select the Edit option from the action menu (vertical ellipsis) to specify a value for the parameters.
    • Select the Include option if you want to use that export parameter.
  • The Tables section displays the tables you can use as export or import parameters for your selected workflow. You can select the Edit option from the action menu (vertical ellipsis) to specify a value for the tables.
    • Select the Include option if you want to use that table as an export or import parameter.
    • Select either the Import tab to use a table as an import parameter or select the Export tab to use a table as an export parameter.
    • Select the Table tab to select a table variable containing the values you want to import to BAPI. Alternatively, select the Strings tab to specify the value manually.
  • Select the Begin sequence option if you want to execute the BAPI in a particular sequence to mark the start of a process.
  • Select the End sequence option to mark the end of a process.
  • Select the Commit transaction option to commit the changes made during the process.
  • In the SAP BAPI session field, enter the session name you used to connect to the SAP application in the Connect action.
  • In the Save exported structures and scalars field, specify a dictionary variable.
  • In the Save exported tables field, specify a dictionary variable.
Run custom workflow Enables you to run a custom workflow in SAP BAPI.
  • Select the custom workflow you want to run from the Select Custom workflow list.
  • The Import to BAPI section displays the import parameters for the selected workflow. You can select the Edit option from the action menu (vertical ellipsis) to specify a value for the parameters.
    • Select the Include option if you want to use that import parameter.
    • Select the Table tab to select a table variable containing the values you want to import to BAPI. Alternatively, select the Strings tab to specify the value manually.
  • The Export to BAPI section displays the export parameters for the selected workflow. You can select the Edit option from the action menu (vertical ellipsis) to specify a value for the parameters.
    • Select the Include option if you want to use that export parameter.
  • The Tables section displays the tables you can use as export or import parameters for your selected workflow. You can select the Edit option from the action menu (vertical ellipsis) to specify a value for the tables.
    • Select the Include option if you want to use that table as an export or import parameter.
    • Select either the Import tab to use a table as an import parameter or select the Export tab to use a table as an export parameter.
    • Select the Table tab to select a table variable containing the values you want to import to BAPI. Alternatively, select the Strings tab to specify the value manually.
  • Select the Begin sequence option if you want to execute the BAPI in a particular sequence to mark the start of a process.
  • Select the End sequence option to mark the end of a process.
  • Select the Commit transaction option to commit the changes made during the process.
  • In the SAP BAPI session field, enter the session name you used to connect to the SAP application in the Connect action.
  • In the Save exported structures and scalars field, specify a dictionary variable.
  • In the Save exported tables field, specify a dictionary variable.
Send Feedback