Technology: Business Objects Data Services, Version 3.1
This blog will guide you how to insert data into SAP Bank Master using BO Data services using a BAPI function call.
First , we shall create a tab delimited text file containing details for the Banks to be created. It must contain the columns that are mandatory for creation of bank, along with any other optional columns.
In the BODS designer you need to create a “File Format” that will have columns corresponding to the data in the tab delimited file. It is mapped to tab delimited text file BAPI_TEST.txt located in “C:\”
The “File Format” FF_BAPI_TEST acts as input for the “Query Transform” BAPI_TEST.
When you double click on the “Query Transform” BAPI_TEST, you can see that all the columns of the “File Format” FF_BAPI_TEST have appeared in the input schema. Right Click on the output schema and select “New Function Call”.
The below pop-up box appears. Choose the SAP system as function category and select the Function “BAPI_BANK_CREATE”.
Now you need to define the input parameters for the SAP Function “BAPI_BANK_CREATE”.
Select the fields defined in the input schema and populate the Input parameters as below. You can put “Null” for optional parameters.
The output parameters will provide you information about success/failure of your data upload and Bank creation process. One row is created in the output table for each row that is uploaded. The function will do various automatic checks to validate the data before creating the Bank.
If a Bank is successfully created, The BANKCOUNTRY and BANKKEY is returned and the MESSAGE column is blank. If a Bank is not created due to some error, then the MESSAGE column contains description of the error.
Common validations done by this BAPI function are :
1) Bank Already Exists
2) SWIFT code must be of length 8 or 11
3) Field Bank Key cannot contain blanks
This log is captured in the table TEST_BAPI_OUTPUT that is connected to the output of the “Query Transform” BAPI_TEST.
When you run the job in BODS, the data from the tab delimited text file BAPI_TEST.txt will be populated into SAP system. Looking at the contents of TEST_BAPI_OUTPUT you can understand how many records were successfully inserted into SAP system.