K2 connect Test Cockpit
Use the K2 connect Test Cockpit to run queries against the SAP BAPIs. The Test Cockpit returns a data table in response to the parameters you provide. This is used during development to verify that the data returned is correct when provided with the current user credentials, and to display the data that would be in the published Service Object. The Test Cockpit also enables you to determine what parameters are required to return data from the BAPI.
The K2 connect Test Cockpit does not use the same methods to communicate with SAP as used by the K2 connect Service at run time. Unless the correct SAP permissions are implemented by your SAP Administrator, the K2 connect Service instance may return errors when the service calls to SAP are executed.
Access the Test Cockpit
To open the Test Cockpit:
- Click on the icon as illustrated in the image below from the BAPI Function in the K2 Service Object Designer in Visual Studio.
- This will open the K2 connect Test Cockpit window.
Use the Test Cockpit
Configure the following details:
- Destination (i.e. the SAP Instance where the BAPI is located)
- User Credentials
- Function Name
Click the Load Interface button to populate the Input and Output panels.
The K2 connect Test Cockpit assists you in determining whether the input query will return the correct data to the Service Object.
Once the three options are configured, the detail required will display in the K2 connect Test Cockpit.
Item | Description |
---|---|
Destination | Drop down selection for the Destination (SAP Instance) BAPI against which a query will be run. Any BAPI, provided it has been published can be accessed from the Test Cockpit. |
User Credentials | User access to the BAPI is achieved via either entering a set of credentials or using 'Predefined User Credentials'. Depending on the set of credentials entered this will determine if the BAPI can be accessed and data returned. Where credentials are incorrect or the user has not been given access rights, no access will be allowed. |
Function Name | The BAPI name, not the friendly name against which the query will be run. |
Information | Details about the query execution |
Load Interface | Loads the user interface once the BAPI has been selected and credentials have been passed successfully to the service enabling access. |
Execute | Executes search parameters. |
Roll back | Reverts the system back to its previous state. |
Commit Work | Changes to the system are committed. |
Input / Output | The Input / Output panes populate with details from the BAPI's once the interface is loaded. |