on 2016 Jun 15 10:03 AM
Dear Experts, There are three functions in Library OutputManagementUtilities. 1. CreatePrintQueueItem ; 2. CreatePrintQueueItemWithFormTemplate ; 3. GetPDF
First question: There is not explanation for function 1 and 2 in help document, could you help please?
Second question is: Function GetPDF returns nothing when the FormTemplateCode is a standard form template code, while it returns the Binary Data while a Custom Form Template which is created basing on a Custom Business Object is imported. Is this function designed only using for Custom Form Template? Or I missed something while calling this function? >>For example, refer the following codes, templatecode1 is from a Custom Form Template, while templatecode2 is from a standard one(Production Order). Here I am sure the import parameters are correct, for PDF1, I can get the return Binary data as I expected, however, for PDF2,the return is null. I tried several standard form template codes here, the return is always null. >>>>sample codes: FormTemplateCode1.content = "Y8C18KNX_PQB87"; FormTemplateCode2.content = "MM_02"; //Reuse service Call PDF1 = OutputManagementUtilities.GetPDF(this, FormTemplateCode1, FormTemplateLanguage); PDF2 = OutputManagementUtilities.GetPDF(prodOrder, FormTemplateCode2, FormTemplateLanguage); <<<<
Third question is : Function CreatePrintQueueItemWithFormTemplate returns an error message” Mandatory parameter binary data is missing”, there are 12 import parameters of this function, I tried to fill value for all the import parameters as following codes, however the return cannot be get and the error was popped out. Could you help to explain how to use this function please? >>>>sample codes: userAccountID.content="K8U08M26CI1";// documentName="Picking list "+this.MergedPickingListNo; queueId="DEFAULT"; numberOfCopies=1; formTemplateCode="Y8C18KNX_PQB87"; language="1"; countryCode="CN"; companyId="SR10"; OrgUnit="SR11"; channelType="1"; docCreationTimestamp=Context.GetCurrentSystemDateTime().content.ToString(); formXMLData.content=PDF1.content; formXMLData.mimeCode="application/pdf"; formXMLData.fileName="领料单_"+this.MergedPickingListNo+ " .pdf"; formXMLData.uri="/BOAttachments/"+this.MergedPickingListNo+"/"+formXMLData.fileName; formXMLData.characterSetCode="utf-8"; formXMLData.format="pdf"; test=OutputManagementUtilities.CreatePrintQueueItemWithFormTemplate(userAccountID,documentName,queueId,numberOfCopies,formXMLData,formTemplateCode,language,countryCode,companyId,OrgUnit,channelType,docCreationTimestamp);<<<
Thanks for your help. Br Misher
Request clarification before answering.
Hell All, Update my findings: The function GetPDF only works for custom Form template "OutputManagementUtilities.GetPDF(this, FormTemplateCode1, FormTemplateLanguage)" For function CreatePrintQueueItem, I can create the print queue item successfully using following sample codes. However for function CreatePrintQueueItemWithFormTemplate , the error “ Mandatory parameter binary data is missing” was popped out. Why same Binary Data behave different in these two functions? What else should be paid attention when calling function-CreatePrintQueueItemWithFormTemplate . Sample codes: userAccountID.content="K8U08M26CI1";// documentName="Picking list "+this.MergedPickingListNo; queueId="DEFAULT"; numberOfCopies=1; formTemplateCode="Y8C18KNX_PQB87"; language="1"; countryCode="CN"; companyId="SR10"; OrgUnit="SR11"; channelType="1"; docCreationTimestamp=Context.GetCurrentSystemDateTime().content.ToString(); formXMLData.content=PDF1.content; formXMLData.mimeCode="application/pdf"; formXMLData.fileName="领料单_"+this.MergedPickingListNo+ " .pdf"; formXMLData.uri="/BOAttachments/"+this.MergedPickingListNo+"/"+formXMLData.fileName; formXMLData.characterSetCode="utf-8"; formXMLData.format="pdf"; //failed created test=OutputManagementUtilities.CreatePrintQueueItemWithFormTemplate(userAccountID,documentName,queueId,numberOfCopies,formXMLData,formTemplateCode,language,countryCode,companyId,OrgUnit,channelType,docCreationTimestamp); //Sucessfully created test1=OutputManagementUtilities.CreatePrintQueueItem(userAccountID,documentName,numberOfCopies,formXMLData,queueId); Do you have any idea? thanks br Misher
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Misher,
I forwarded your question to the resp. colleagues.
Stay tuned for an answer,
Horst
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Misher,
This is the information reg. the other 2 functions:
PrintUUID = OutputManagementUtilities.CreatePrintQueueItem(<userAccountID>,<DocumentName>,<No. Of Copies>,<PDF binary Content>,<Print Queue ID>);
PrintUUID = OutputManagementUtilities.CreatePrintQueueItemWithFormTemplate(<userAccountID>,<DocumentName>,>,<Print Queue ID>,<No. Of Copies>,<XML data binary content>,<formTemplateCode>,<lang>,<country>,<companyID>,<orgUnit>,<channelType>);
HTH,
Horst
Dear Horst Schaude,
We have created the Form template and Preview button is configured in the QA screen,
Currently our customer requirement is to generate the automatic printing from other business object. i.e from other business object we need to perform the preview action.
we found out one library function but unable to process it. help me to solve this
PrintUUID = OutputManagementUtilities.CreatePrintQueueItemWithFormTemplate(<userAccountID>,<DocumentName>,>,<Print Queue ID>,<No. Of Copies>,<XML data binary content>,<formTemplateCode>,<lang>,<country>,<companyID>,<orgUnit>,<channelType>);
Help me how to use this function.
Hello Rudhra,
To make the discussion not more compley than it is already , I suggest to follow-up in Fred's document.
Bye,
Horst
Hi Horst,
I am in big trouble.
1) Single-select printing is working fine. But multi-select printing is giving UI dump.
2) When I select C1 and click Print twice, it is giving UI dump also.
I used this - OutputManagementUtilities.CreatePrintQueueItem(userAccountID,PDF2.fileName,1,PDF2,"MCS_Default");
Best Regards,
Fred
Hi Horst,
The BO Action is added to OWL as usual (bound with data list).
A normal BO Action works fine for multiple selection for we added a lot in the past.
I might probably wait for 1 or 2 seconds before clicking twice.
I am going to have a net meeting with SAP for the issue today.
Hope this can be solved.
Best Regards,
Fred
Hi Misher,
As I wrote here , we can send the PDF of the single-selected row the print queue.
Multi-selected rows should also work fine. But unfortunately, there are some issues with the reuse function. We had a net meeting with SAP yesterday. They seem to have figured out the cause but it will take a while to fix it.
Best Regards,
Fred
User | Count |
---|---|
73 | |
21 | |
9 | |
8 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.