- Unable to connect to SAP BW BEx Query or other SAP Data Sources in Crystal Reports 2013. The following error message is displayed:
Logon failed.: The attempt to log on with a password failed. The following credentials are invalid: CLIENT=<ID>LANG=EN ASHOST="<HOSTNAME>" USER=<USERNAME> PASSWD=********
- saplogon.ini cannot be found in the computer where Crystal Reports is installed, or saplogon.ini file content is different than list of systems you see in the SAPlogon pad.
- The SAP Logon 7.4 and NWBC 5.0 is installed on the same computer
- SAP Crystal Reports 2011
- SAP Crystal Reports 2013
- SAP Crystal Reports 2016 SP6 or lower versions
- SAP BW BEx Query or other SAP Data Sources
Reproducing the Issue
- In Crystal Reports, under the "File" menu, select New -> "Standard Report..."
- Double click one of SAP Data Drivers (e.g. SAP BW MDX Query).
- In the "SAP System Logon" windows, select the system.
- Provide credentials and may notice that the error message disappears: Logon failed.: The attempt to log on with a password failed. The following credentials are invalid: CLIENT=<ID>LANG=EN ASHOST="<HOSTNAME>" USER=<USERNAME> PASSWD=********
- SAP Crystal Reports 2011, 2013 and 2016 SP6 or lower versions, requires saplogon.ini file to connect to SAP ERP or SAP BW systems. This file may missing or contains different entries than as you see in SAPLogon pad application.
- With the installation of SAP GUI 7.40 and the Netweaver Business Client the connections that used to be saved in saplogon.ini file are now saved in SAPUILandscape.xml and SapLogonTree.xml files.
To use SAP Crystal Reports with SAP ERP or SAP BW datasources, saplogon.ini file needs to be generated from SapLogonTree.xml and SAPUILandscape.xml files. Follow these steps to generate the saplogon.ini file.
To generate saplogon.ini file you need to download "SAP GUI for JAVA 7.40". If this is already installed then skip to step 10, if this is not installed then you can still acomplish this with out installing SAP GUI by starting at step 1.
- In your web browser go to http://support.sap.com
- Click Download Software
- Click Support Packages & Patches
- Click Alphabetical List of Products
- Click G
- Select SAP GUI FOR JAVA
- Select SAP GUI FOR JAVA 7.40
- Download the most recent package or zip file. At this time "Presentation - 7.40 Comp.3 Present.2 SAP GUI for Java 7.40" file was downloadable.
- Install the SAPGui for Java 7.40 to a folder.
- Make sure you have Java installed, if not you can install JAVA from here https://java.com/en/download/
- Go to the "C:\Users\<Your User Name>\AppData\Roaming\SAP\Common" folder and make a backup of the content files
- From a command line run the following command:
"C:\<Path to Java Install Directory>\bin\java.exe" -Djava.awt.headless=true -jar "C:\<Path to Your SAP GUI for Java>\jar\GuiStartS.jar" convert exportConW "C:\Users\<Your User Name>\AppData\Roaming\SAP\Common\SAPUILandscape.xml" "C:\users\<Your User Name>\AppData\Roaming\SAP\Common\saplogon.ini" "C:\Users\<Your UserName>\AppData\Roaming\SAP\Common\SapLogonTree.xml"
- windows "administrator" user is logged in
- SAPGUI for Java is installed in "C:\Users\administrator\SAP Clients\SAPGUI for Java 7.40rev7"
- Java 8 0 45 is installed on the computer
the command line looks like:
"C:\Program Files (x86)\Java\jre1.8.0_45\bin\java.exe" -Djava.awt.headless=true -jar "C:\Users\administrator\SAP Clients\SAPGUI for Java 7.40rev7\jar\GuiStartS.jar" convert exportConW "C:\Users\administrator\AppData\Roaming\SAP\Common\SAPUILandscape.xml" "C:\users\administrator\AppData\Roaming\SAP\Common\saplogon.ini" "C:\Users\administrator\AppData\Roaming\SAP\Common\SapLogonTree.xml"