Kony Studio allows you to access and use the external SAP services using the custom SAP Connector. A service that uses a custom SAP connector is a SAP service.
You must load the required Business Application Programming Interface (BAPI) functions to define a SAP service. The BAPI files contain the SAP methods and functions. These methods have the logic defined that is required for a service. A BAPI is remotely enabled function module since it can be invoked from remote programs like standalone JAVA programs, web interface.
Single Sign-on Feature
SAP offers several mechanisms for authenticating users. If you have many systems in your system landscape, then a single sign-on (SSO) environment can help to reduce the number of passwords that users have to remember. SSO eases user interaction with the many systems, components, and applications available to the user. Once the user is authenticated to the portal, they can use the portal to access different systems without having to repeatedly enter their user information for authentication.
There will be a Login and Logout services for SAP Connector irrespective of SSO or non-SSO. You do not have to pass any credentials for BAPI services. Middleware stores the authentication details in session after successfully executing log-in service.
If you provide authentication details for each BAPI services, middleware will take care of that and should work as expected to maintain backward compatibility.
Note: Prior to Release 5.6, for all non-SSO BAPI service calls, you had to pass the authentication details through request parameters.
If user sends credentials through request parameters, middleware uses the details, If it does not find details from request parameter, it will read from the service definition file provided by the user from IDE. If it does not find in both places, it will display error message "Please provide SAP server username as request parameter.."
If SSO server / SAP server details are not valid, you will get an error code in response. The following table provides the error code information:
Error code | Error message for log purpose | Error message for client or end user |
---|---|---|
8702 | Exception occurred in SAP system, while processing BAPI function module. | Exception occurred in SAP system, while processing BAPI function module. |
8703 | JCO Exception occurred | SAP System Connection Related Errors. (Not provided by the Dev Team). |
8710 | sapserverfile config value is missing in service config. | SAP server properties are missing from server configuration. |
8711 | Provide username as a request parameter. | Please provide SAP server username as request parameter. |
8712 | Provide password as a request parameter. | Please provide SAP server password as request parameter. |
8713 | SAP Server connection property file is missing. | SAP server properties are missing for connecting to SAP system. |
8716 | Unable to find the user session | User session not found. Log in to use the services. |
8717 | Problem in getting the SSO Token - Either User/Password/SSO Token/Certificate is not specified for <sap host> | Either User/Password/SSO Token/Certificate is not specified for : <sap host> |
8718 | Loggout failed due. No user logged in the current session | Session Expired or User needs to be logged in, to perform log out! |
8719 | Problem with network connection, while connecting to given SAP system | Problem with network connection, while connecting to given SAP system <Host> |
8720 | SSO Token does not exist in the session. | SSO Token does not exist in the session. |
8721 | Exception occurred in connecting to : <sap host> | Problem while connecting to SAP System : <sap host> |
8722 | Please provide username and password as a request parameters. | Please provide username and password as a request parameters. |
In case of expiry, an error code is received in response (no expiry notification) and user has to relog-in again. General expiry time is 10 mins (you can configure from SAP server level).
Note: In case of SSO, middleware ignores username and password from request headers and continues with the same session that is logged in earlier. If there is no associated login session, an error message is shown to the user "User session not found. Please login first in order to use the services".
The supported SAP Servers versions are SAP ECC5, SAP ECC 6.
To configure SAP Environment for IDE:
Copy the following files from SAP installation and place them in:
sapjco3.dll
sapjco3.jar
Note: If you have a Windows OS, copy the sapjco3.dll file. If you have a Linux or Unix environment, copy the sapjco3.so file.
Important: On Mac OS X:
chmod 777 Sapjco*
.
config.ini
file and add the following line at the end of the file:osgi.parentClassloader=ext
This file is available at <Eclipse_Installation_Path>/configuration.
To configure SAP for middleware
<!-- remove the comment for SAP connector enabled
<listener>
<listener-class>com.konylabs.middleware.common.SAPConnectorListener</listener-class>
</listener>-->
To create a SAP service, follow these steps:
Note: You can also add a SAP service using the Enterprise Explorer View. Right-click the SAP Servers folder and select Add Server. The SAP Server details screen appears.
Kony Studio captures log in details for SAP ABAP Server. With SSO, you has to select an option SSO or non-SSO login. For SSO Login, you has to provide portal hostname and port. Kony Studio generates properties files with SSO details.
In Login Information section, select either of the option:
Non-SSO Login.To use normal sign on feature, select Non-SSO Login and provide user name and password to connect to the server.
SSO Login.To use single sign on feature, select SSO Login and provide the following details:
To enable tracing on the RFC destination, select the RFC Trace checkbox.
You can view the added server and its corresponding business objects under the SAP Server folder.
Note: If you are getting unsatisfied link error add argument "-Djava.library.path = <JDK_Installation_Path>/jre/lib/ext/"under -vmargs in eclipse.ini file
Select a BAPI function, to view the corresponding input and output parameters.
The BAPI functions have input parameters of the following datatype:
You can add values for each parameter(column) in the rows provided below the parameter. You can add rows using the icon. To delete a row, select the row and click
. You can move the row values of each parameter using the up and down arrows provided.
Note: The parameters in the collection are displayed as an alphabetically sorted tree in the left pane. In the Right pane, the parameters are displayed according to the usage in the BAPI function. Scroll left or right to view all the parameters.
You can additionally specify:
Note: For more information on Preprocessor and Post Processor, see the section Preprocessor/Post Processor.
The Input and Output Parameters of the BAPI function can be viewed by click the Input or Output Tabs present at the bottom of the right pane
Select a BAPI function, right-click, and select Add to Selected to add the method to the Selected BAPI Functions folder for a specified server.
The Add to Selected option appears only if the BAPI function has already been loaded. The selected services are used by the device when the application is launched.
Important:
KonySAP.properties
. This property file includes all connection-related parameter details. KonySAP.properties
file will not contain user information like username and password. It only contains SAP server and SSO server details.A Service Definition file has information common to all the services like the server configurations, wsdl configurations and so on.
The individual information about each service is present in <service_id>.split files in the split_services folder.
Copyright © 2015 Kony, Inc. All rights reserved. |