Lukman Hakim

Failed to load PDF document’ error when printing in SAP Fiori

Symptom

Getting ‘Error’ popup: ‘Failed to load PDF document’ while executing Purchase orders in the ‘Change Purchase Order’ and ‘Approve Purchase Order’ tiles in Fiori.

failed_to_load_pdf.png

Environment

 SAP Netweaver

Reproducing the Issue

  1. Change existing PO in change PO tile or approve a PO in approve PO tile.
  2. Save the PO, PO should get saved.
  3. New tab opens in browser, URL called: http(s)://<host.domain>:<port>/sap/bc/bsp/sap/frontend_print/?sap-client=…….
  4. Get ‘Error’ popup: ‘Failed to load PDF document’ (as per above screenshot)
  5. For a more information error message
  6. Start transaction SICF on the respective backend system
  7. Open the corresponding tree nodes for the service you would like to test i.e webgui> default host ->sap -> bc -> gui -> sap -> its -> webgui
  8.  Select ‘Test service’ from context menu of the service nodei.e: Right ‘Click’ -> Test Service
  9. This will launch the webgui service in the browser – from here logon to system again.
  10. Call the “Change Purchase Order” app; transaction: ME22N / ME29N
  11. Follow steps above for the PO.
  12. New tab opens in browser, URL called: http(s)://<host.domain>:<port>/sap/bc/bsp/sap/frontend_print/?sap-client=…….
  13. ‘Error’ popup: ‘File does not begin with ‘%PDF-‘

file_does_not_begin.png

Cause

Printer is not correctly configured.

In order to create a PDF, a PDF device type needs to be used.

Web-based documents are printed out via PDF.

The document must be printed out on a printer with device type PDF1.

Resolution

The document must be printed out on a printer with device type PDF1.

 

source : https://launchpad.support.sap.com/#/notes/0002801733

Activating the Emergency User in Java only system

Why SAP* user activation required
Sometime we end up in a situation when none of the user are able to log in into SAP or even Administrator user is locked or not working. In this scenario you have to activate the emergency user SAP* .
Please note : This method is only for Java Only system , for dual stack systems you can activate  SAP* or lock unlock user via SU01. (Will provide a link shortly to unlock SAP* in ABAP stack).
Once SAP* is activated all other users will be deactivated until SAP* is disabled again. 
 
How to activate SAP* 
1.Launch Configtool – Go to to /usr/sap/<SID>/JC*/j2ee/configtool/ and execute configtool.sh (On UNIX like environment , please setup DISPLAY as per X11 /Reflection application).

2.Go to  Global Server Config > Services > com.sap.security.core.ume.services node.

3. Change the following UME parameters.
 
4.Select the property and enter the Value as shown in step 3 and save it by pressing “Set” button.
5.SAP* will get activated after Java restart.
6.Now you can log in with SAP* and unlock Administrator or any other desired user.
7.After step 6 deactivate SAP*.