on 08-24-2016 2:11 PM
Hi,
We have to create a SFC Traveller(non interactive form) pdf using Adobe Document Services . Traveller will have following information:
So far I am able to generate static PDF assuming 10 Operations or Steps present in Route.
How can we generate dynamic table which will be dependent on the number of Steps in a Route? At the time of Data Binding it should decide the number of rows to be created in that table.
Is it possible to use JavaScript which at runtime will determine the count of Operations and subsequently create the table rows?
Thanks in Advance
Akhilesh Thakur
Akhilesh
What version of SAP ME are you using?
You should be using the newer classes in Document Maintenance, for example the formatting class should be com.sap.me.document$PrintingFormatAdsService. This creates a structured list that ADS can use to display dynamic tables of 0..n records without the need for programming.
Stuart
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Stuart,
I am using com.sap.me.document.impl.ADSFormat as most of the fields in traveller are ME standard objects.
I am not sure whether we can create a structured list as output of PrintingFormatAdsService is always in XML format unless we are creating extensions for Transporter.
Is it possible to generate list as output from PrintingFormatAdsService?
ME version: 6.1.4.47
Regards
Akhilesh
Akhilesh
If you are using that version of ME, you should be using the new class files for all your printing. It supports simple and structured fields.
Check the How to Guide on printing.
Stuart
Hi Stuart,
I am able to generate XML for Data Binding as shown below. As shown below I have to create table in PDF based on number of steps in Routing.
Currently I have hardcoded 6 rows in template that's why able to print 4 operations present in that Routing. My understanding is that ME will generate "mePrintContent" xml and this XML will act as datasource or databinding for the template. To use any values in PDF we have to use same data object in template.
When you are saying that ME will generate structured fields , Does that mean we can define table or other format if yes how it will be represented in XML?
Akhilesh
This data is correctly formatted for the creation of dynamic tables with 0..n records. So, now you create a table and bind the row object, making sure you've checked the box "Repeat Row for each data item" and make the cells in the table text fields, binding them to the fields in the file you want. This would be a question for another forum if you can't manage it however.
Stuart
Thanks Stuart,
I am able to generate dynamic Table based on data from database.
I am facing issue with the Operation Name:OperationBO:4020,PRINTOPR,# , I have to display only operation name without "BO" and site. Unfortunately we don't have any element in mePrintContent xml for Operation Name.
I have selected Routing Data in Document maintenance and fetching Operation name by using path $.routerComponentContext.routerOperation.operationRef.
I tried substr function of XPath but it didn't work. Please suggest how to display just Operation Name.
User | Count |
---|---|
91 | |
7 | |
7 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.