28
How to call an SAP BAPI in SSIS.

How to call an SAP BAPI in SSIS

  • Upload
    hanga

  • View
    455

  • Download
    17

Embed Size (px)

Citation preview

Page 1: How to call an SAP BAPI in SSIS

How to call an SAP BAPI in SSIS.

Page 2: How to call an SAP BAPI in SSIS

We have to create a new SSIS projectStart Visual Studio. Click „File“ „New“ „Project…“(1)

Select „Integation Services“ “Integration Services Project“ (2)Enter a project name (3) and click OK to create the project (4)

www.theobald-software.com 2

Page 3: How to call an SAP BAPI in SSIS

Now we have a blank Control Flow. Drag and drop a Data Flow Task item into the Control Flow (1)

Double-click on the task to switch to the data flow view (2)

www.theobald-software.com 3

Page 4: How to call an SAP BAPI in SSIS

In the Data Flow Task we need a new Xtract connection.Right-click (1) and select „New Connection“ (2)

www.theobald-software.com 4

Page 5: How to call an SAP BAPI in SSIS

Select „XTRACT“ (1) Click „Add…“ to add the Xtract connection manager (2)

www.theobald-software.com 5

Page 6: How to call an SAP BAPI in SSIS

Double-click to open the Xtract IS Connection Manager(1) Fill in logon credentials (2) and host information (3)Test the connection (4) and click OK to confirm (5)

www.theobald-software.com 6

Page 7: How to call an SAP BAPI in SSIS

www.theobald-software.com 7

First we have to create SSIS variables (we will need them later).Right-click Variables to open variables panel (1)

Create the variables and set Data Type and value (2)Now the variables are ready to use in the package.

Page 8: How to call an SAP BAPI in SSIS

Drag and drop the Xtract IS BAPI component (1) Double-click to automatically assign the connection manager to

the Xtract IS BAPI component (2) Click OK to confirm (3)

www.theobald-software.com 8

Page 9: How to call an SAP BAPI in SSIS

The Data Source dialog opens.Click to open the Look Up dialog (1)

Fill in the BAPI/RFC name (2) and click to search (3)

www.theobald-software.com 9

Page 10: How to call an SAP BAPI in SSIS

Select your BAPI (1)Click OK to confirm the selection (2)

www.theobald-software.com 10

Page 11: How to call an SAP BAPI in SSIS

The Import, Export and Table parameters are retrieved from SAP and displayed in the dialog.

www.theobald-software.com 11

Page 12: How to call an SAP BAPI in SSIS

Scalar import parameters can be entered with a static value (1) or with an SSIS variable (2)

www.theobald-software.com 12

Page 13: How to call an SAP BAPI in SSIS

Click to switch to the Exports tab (1)Click to edit the export structure (2)

Structures are a special case of scalar parameters. In the case of this export structure you can assign the value to an SSIS variable (3)

www.theobald-software.com 13

Page 14: How to call an SAP BAPI in SSIS

Tables can be sent or be extracted from the function module / BAPI. We want to extract the “ADRESSDATA” table.

Set the Output Type of the table to Pipeline (1)

www.theobald-software.com 14

Page 15: How to call an SAP BAPI in SSIS

We have to specify a range of customer numbers.Set the Input Type of the table “IDRANGE” to Static (1)

and click “Edit” to open the Edit dialog (2)

www.theobald-software.com 15

Page 16: How to call an SAP BAPI in SSIS

Fill in the static range values (1)SIGN = I (Include) Option = BT (Between)

LOW = Lower range and HIGH = Higher Range of customer numbers.For more options refer to your SAP manual.

www.theobald-software.com 16

Page 17: How to call an SAP BAPI in SSIS

Now the component is ready for a preview (1)

www.theobald-software.com 17

Page 18: How to call an SAP BAPI in SSIS

Here is the preview.In the upper part you can see the export parameters (1)

In the lower part you can switch between the tables of the BAPI (2)

www.theobald-software.com 18

Page 19: How to call an SAP BAPI in SSIS

Drag and drop a Data Flow Destination. In our example we use the OLE DB Destination (1)

www.theobald-software.com 19

Page 20: How to call an SAP BAPI in SSIS

We need another connection manager for the DestinationRight-click in this area and select „New OLE DB Connection…“ (1)

Set up the connection manager in the dialog to an SQL Server

www.theobald-software.com 20

Page 21: How to call an SAP BAPI in SSIS

Drag the Xtract output flow path to the OLE DB Destination (1)Double-click to open the OLE DB Destination Editor (2)

www.theobald-software.com 21

Page 22: How to call an SAP BAPI in SSIS

Select an existing table from the dropdown list (1)or create a new one (2)

www.theobald-software.com 22

Page 23: How to call an SAP BAPI in SSIS

If you decide to create a new table, the „Create“ statement is automatically generated from the meta data (1)

Click OK to create table and return to previous screen (2)

www.theobald-software.com 23

Page 24: How to call an SAP BAPI in SSIS

Click on Mappings and the mapping between source and destination elements is generated automatically (1)

Click OK to confirm the mapping (2)

www.theobald-software.com 24

Page 25: How to call an SAP BAPI in SSIS

Now let‘s execute the package (1)

www.theobald-software.com 25

Page 26: How to call an SAP BAPI in SSIS

Xtract IS fetching the data from SAP

www.theobald-software.com 26

Page 27: How to call an SAP BAPI in SSIS

The extraction of the data finished succesfully.100 rows are sent to the OLE DB Destination (1)The output windows contains the log details (2)

www.theobald-software.com 27

Page 28: How to call an SAP BAPI in SSIS

If you have any questions or comments, please write at: [email protected]

www.theobald-software.com 28