2390822 - Logon failed.: The attempt to log on with a password failed. error displayed in Crystal Reports Designer when connecting SAP BW BEx Query or SAP Datasources

SAP Knowledge Base Article - Public

2390822 - Logon failed.: The attempt to log on with a password failed. error displayed in Crystal Reports Designer when connecting SAP BW BEx Query or SAP Datasources

Symptom

  • 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

Environment

  • SAP Crystal Reports 2011
  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016
  • SAP BW BEx Query or other SAP Data Sources

Reproducing the Issue

  1. In Crystal Reports, under the "File" menu, select New -> "Standard Report..."
  2. Double click one of SAP Data Drivers (e.g. SAP BW MDX Query).
  3. In the "SAP System Logon" windows, select the system.
  4. 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=******** 

Cause

  • SAP Crystal Reports 2011, 2013 and some versions of 2016 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.

Resolution

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.

  1. In your web browser go to http://support.sap.com
  2. Click Download Software
  3. Click Support Packages & Patches
  4. Click Alphabetical List of Products
  5. Click G
  6. Select SAP GUI FOR JAVA
  7. Select SAP GUI FOR JAVA 7.40
  8. 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.
  9. Install the SAPGui for Java 7.40 to a folder. 
  10. Make sure you have Java installed, if not you can install JAVA from here https://java.com/en/download/
  11. Go to the "C:\Users\<Your User Name>\AppData\Roaming\SAP\Common" folder and make a backup of the content files
  12. 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"

For example,

  • 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"

Keywords

crystal, CR2016, CR2013, logon failed, invalid credentials, SAP logon, SAPGUI, NWBC  
, KBA , BI-RA-CR , Crystal Reports designer or BusinessViews Manager , Problem

Product

SAP Crystal Reports 2011 ; SAP Crystal Reports 2013 ; SAP Crystal Reports 2016