The existing scenario is, each document should print separately. But this article helps to save your time and print multiple documents at the same time.
I would like to document it here and let you know the same so that it will stay as a reference for everyone.
Tenant
: SAP Business ByDesign.
Scenario
: Implement Mass Print for Customer Invoice consequently.
Process Flow
-
Prerequisites
-
Create Standard Business Object, Screen & Script file
-
Configure SAP Business ByDesign
-
Scripting
-
Add standard button on the customer invoice screen
-
Configure SAP Print Manager
-
Testing
Prerequisites
You have to download software from SAP Store and install it your local system.
-
SAP Business ByDesign – User License
-
SAP Cloud Application Studio
-
SAP Print Manager Software
Create a Standard Business Object, Screen & Script
-
Create a Customer Invoice standard business object and an OWL Screen.
-
Create
Action Validation: Release
script file.
-
Save and Activate.
Finally, your solution looks like in the below screenshot.,
Configure SAP Business ByDesign
-
Login into SAP Business ByDesign as a Business User.
-
Navigate to the Application and User Management -> Print Queues -> New
New Queue window will open. Here,
-
Enter Queue ID as
Customer_invoing
-
Assigned User: Click New button and create a new user.
-
Click
Save and Close
.
Script
-
Double click Release Action file which we generated in step 2.
-
Copy & Paste below code.
-
Save & Activate
Script file.
var Useraccountid : UserAccountID;
var PDF : basisGlobal:BinaryObject;
var title = “CustomerInvoiceDoc”;
// Retrieve the attachment document’s content and assign to the PDF variable
//Assign the content
PDF.content = Document_content;
// PD002 is an assigned user which we created in the previous step.
Useraccountid.content = “PD002”;
/*
Useraccountid : This is assigned user id
Title : Title of the document
Numberic value(1) : No of copies
PDF : Content of file
“Customer_Invoice” : Print queue ID which we created in previous step
*/
var PrintDocument = OutputManagementUtilities.CreatePrintQueueItem(Useraccountid, title, 1, PDF, “Customer_Invoice”);
return ture;
Pedro Pascal
Se unió el 07/03/2018