Symptom
- Unable to connect to SAP BW from Crystal Reports.
- When refreshing a report based on an SAP BW BEx Query, it generates a Logon Failed error.
- In SAP Logon, when connecting to the same SAP System using the same user name and password, it connect successfully, but fails in Crystal Reports.
- In Crystal Reports, when performing a set datasource location to another SAP System, it fails with the error: "Logon failed: The attempt to log on with a password failed..."
- When refreshing a report in Crystal Reports connecting to an SAP BW BEx Query, or SAP Tables, it fails with the following error message after entering the user name and password:
"Logon failed.
Details: The attempt to log on with a password failed. The following credentials are invalid:
CLIENT:<Client Number> LANG=<Language> AHOST=<Host Server> USER=<User Name> PASSWD=******"
Environment
- SAP Crystal Reports 2013
- SAP Crystal Reports 2016
- SAP Crystal Reports 2020
- SAP Netweaver 7.40
- SAP Netweaver 7.50
Reproducing the Issue
- In Crystal Reports, open a report based on an SAP Data Sources, like an SAP BW BEx Query.
- Refresh the report.
- Enter the user name and password to login to the SAP System.
- It then generates the error: "Logon failed: The attempt to log on with a password failed..."
Cause
- Crystal Reports search for the file containing the list of SAP Systems in the following directories:
C:\Users\<USER NAME>\AppData\Roaming\SAP\Common
C:\Windows
- The logon error occur when the SAP System the report is set to connect to, is not found the list of SAP Systems stored by the SAP Logon application in the file: SAPUILandscape.xml because:
- The file is missing; or
- The file is not in the directory where Crystal Reports search for; or
- There are duplicate version of the file on the computer, and it is reading the one where the SAP System is not listed in; or
- The file was edited manually, and the entries are no longer in a readable format; or
- For Crystal Reports 2013 - SP10 and Crystal Reports 2016 - SP05 there was a product defect where it only read the first 9 SAP Systems entries.
For reference see SAP Note 2625738
Resolution
- Create, update, or copy the file in which the list of SAP Systems is stored to the directory: C:\Users\<USER NAME>\AppData\Roaming\SAP\Common
- Start the SAP Logon.
- Confirm the SAP System you want to connect is in the list of SAP Systems.
- If the SAP System is not listed, then add the SAP System entry, and you will then be able to connect to it from Crystal Reports.
- If the SAP System is listed, then this will indicate the file Crystal Reports reads to obtain the list of SAP Systems is different than the one used by SAP Logon, therefore verify the location where the SAP Systems entries are stored. To do so:
- Still in the SAP Login, click on the upper left corner of the window, and in the menu select "Options..."
- In the left pane, expand "SAP Logon Options", then select "Local Configuration Files"
- If the path is not: C:\Users\<User Name>\AppData\Roaming\SAP\Common, then in MS Windows Explorer, navigate to the path you see, and copy the SAPUILandscape.xml, to the directory:
C:\Users\<User Name>\AppData\Roaming\SAP\Common
- If the path is correct, then it is possible the entries in the file are not in the correct format. In which case, go to the folder:
C:\Users\<User Name>\AppData\Roaming\SAP\Common
And rename the file: SAPUILandscape.xml, to: backup.SAPUILandscape.xml
Then open the SAP Logon, and add the SAP System entry. The SAP Logon will create a new file: SAPUILandscape.xml, in the folder Crystal Reports reads to retreive the list of SAP Systems.
Keywords
crystal, CR2016, CR2013, logon failed, invalid credentials, SAP logon, SAPGUI, NWBC
, KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem
Product
SAP Crystal Reports 2013 ; SAP Crystal Reports 2016 ; SAP Crystal Reports 2020