Skip to main content

PDF Output

Introduction

The SAP Sales Document PDF Lightning component (Introduced in v2.0) lets you generate PDF files from sales documents using the SAP Output spooler and the PDF Smart Form. Using alternate methods for generating PDF documents, such as Adobe Forms, is not supported out of the box, so you must configure SAP to function properly to support PDF output. The basic SAP configuration requirements are listed in the SAP Documentation Portal.

Usage

You access the PDF Lightning component through Surface’s Sales Document Details screen.

Open the Sales Document Details for a sales order and a Download PDF button should display in the Sales Doc List ACTION column.

Clicking on the Download PDF button will cause the component to generate a PDF output of the selected message type in SAP. The output document will be sent from the SAP system through Salesforce to the browser as a file download.

Salesforce Configuration

NOTE: Configure the component's Output Application to match the document type that will be displayed.

V1 - Sales Order, Contract, Quotation, Inquiry

V2 - Delivery Note, Packing List

V3 - Invoice Output

PDF Output File Limitations

File Limitations

When you use enosix Surface to generate a PDF file, the resulting PDF output file is downloaded to your computer. Surface transfers a PDF output file as a 64-bit document, so PDF files can be quite large. Salesforce limits its response size from SAP to 10MB, so a large PDF output file > ~7mb (many pages and multiple graphics) could surpass this Salesforce size limitation.

User Limitations

Communications users should not be used for this activity as it is not a dialogue user. A dialogue user must be used to request PDFs of SalesDocuments. The reason for this is that a background job is submitted to generate the PDF and the code executes a loop to check its status. A communication user is not able to submit a background job.