Dynamic Skip in BAPI
You can use the Dynamic Skip functionality on the Mapper tab to skip uploading or downloading of data based on the following criteria while running a BAPI Process file.
- J-Skip Current Call On Blank
- K-Skip Current Call On Zero
- L-Skip Current Call On Blank Or Zero Or Space(s)
- Y-Data Governance Rule
- Z-Custom Dynamic Skip
In the following example, we skip the data and see how dynamic skip can be used to skip data based on the specified criteria.
Call to SAP can be skipped using “Skip Current Call on Blank”, “Skip Current Call on Zero” or “Skip Current Call on Blank or Zero or Space(s)”.
Once the data consisting of 'Company Code' is ready in excel file for which data is to be extracted, go to Mapper tab and follow the steps mentioned below:
- In the Mapper, go to Dynamic Skip column for the field 'Company Code' and select “L-Skip Current Call on Blank Or Zero Or Space(s)” from drop-down menu.
- Click on 'Run' button, select the SAP system from server group and click on 'Logon'.
- Enter the user data and click on 'OK' button.
- After successful Run, one can clearly see the excel log column displaying “Call to SAP skipped due to custom DS”.
Custom DS allows users to write their VB.Net code to perform various run-time actions based on the data they put in their excel data sheet.
- Open BAPI process file, click on 'Mapper' tab.
- In the Dynamic Skip column for the Map Value 'A' select “Z-Custom Dynamic Skip...” from drop-down menu as shown in the image below.
- Write the VB.Net code that is to be performed in 'Custom Field Skip Editor' screen.
- Click on 'Run' button, select the SAP system from server group and click on 'Logon'.
- Enter the user data and click on 'OK' button.
- It will show the relevant message that “Call to SAP skipped due to Custom DS”.
Note: If the return value is:
- 0 - It will continue to work.
- 3 - Skip current Call
- 4 - Stop current SAP execution
You can use the data governance functionality to validate your data according to the rules configured in Innowera Control Panel before you run a BAPI Process file. If the data is not valid, you can correct the data and then run the Process file. For more information about data governance, see Data Governance Rule.
Note: You must configure the validation rules in Innowera Control Panel to use the data governance functionality. Also, make sure that you have access to open and run the BAPI Process file.
For example, create a sales order in SAP by providing the material number and other details in a BAPI Process file. Before posting the data into SAP, you can validate the data using the Data Governance rule configured in the Innowera Control Panel. If the material number does not exist in the SAP table, an error message will be displayed.
To run a BAPI Process file using Data Governance rule
- In Process Runner, open a BAPI Process file.
- On the Mapper tab > Upload/Download from SAP tab, select the field that you want to validate.
- In the Dynamic Skip list, select Y-Data Governance Rule. The Data Governance Rule window is displayed.
Note: Ensure that you have configured Control Panel through Tools > Options > Enterprise Settings.
- Select the Rule ID that is configured in the Control Panel. The corresponding name and description are populated.
- Select OK. You are returned to the process file window.
- Save the changes in the process file.
- In Run Actions, select Data Governance. The SAP Logon at <NameOfSAPSystem> window is displayed.
- Enter the logon credentials, and select OK. The data is validated, and a validation message is displayed for the field that you selected in step 2.
- After making the required changes, save the file, and select Run. The SAP Logon at <SAP System> window appears.
- Enter the login credentials, and select OK. The sales order will be created in SAP successfully.