Dynamic document content
Is it possible to create a pdf, that will, based on the viewer, show certain sections of a document and to other viewers, hide that section of the document?
Thanks
Dave
It depends how you define "based on the viewer".
Document-level scripts can't see the user account details, but if you're reacting to something the user does, like clicking a button, then you can either create page templates (in LiveCycle forms, page templates can be shown and hidden) or layers (OCGs, which can show and hide objects ON a page, but cannot hide the page itself). In a "normal" PDF file - i.e. not an XFA-based dynamic form - you cannot use templates.
Bear in mind that both methods are insecure - the user can easily see the hidden information, and non-Adobe viewers are unlikely to display the PDF properly.
Similar Messages
-
Hi guyzzzzzz,
i want the document for the following........
· Dynamic Documents Display
· Structure of Program that Use Dynamic Documents
· Classes for Dynamic Documents
· Important Methods of DD Classes
Demo/Exercise
Its very urgent, plz help me in this
Thanks in advance,
Vishnu. RHi,
Dynamic documents in ABAP Objects are HTML documents that are generated during runtime using ABAP code.
Dynamic documents enable developers to give totally a new look and feel to ABAP screens and report outputs (provided screens are used in the report output). Many features that are not possible in the traditional ABAP programming are available in dynamic documents. Why we are saying a new look and feel is it uses SAP HTML Viewer internally to bring HTML web page kind of look and feel to screens.
Dynamic documents may contain Forms and Tables, which intern can contain elements like input fields, push buttons, dropdown lists, texts, icons and pictures in different sizes. Of course some of these features are also available in ALV reports with limited usage, but not like in dynamic documents.
Features
The below mentioned are some of the features of dynamic documents.
Large font sizes and more colour options than traditional ABAP/4 (There are some limitations also)
ICONS and pictures in different sizes
Texts
Links
Pushbuttons
Input fields
Dropdown list boxes
Tables with row span and with column span
Tables with frames and without frames
Tables with buttons, icons, pictures, input elements and texts in it
Steps for using dynamic documents in ABAP program:
For using dynamic documents, all that we need is a screen and a custom control in that.
The following steps need to be done in the program in order to display a dynamic document in a screen.
Create a screen and a custom control in that using Screen Painter (This step is not required if we already have a screen and custom control in the program)
Define an object reference to the class CL_DD_DOCUMENT and instantiate it.
For example:
DATA: OBJ_DD TYPE REF TO CL_DD_DOCUMENT.
CREATE OBJECT OBJ_DD.
Dynamic document is ready now for including elements in that. The below are few methods, which we can use for adding elements to the dynamic document. Method Description
NEW_LINE To generate a line break
UNDERLINE To draw a horizontal line across the full width of the document
ADD_GAP To place a gap in a line
ADD_TEXT To add a text
ADD_PICTURE To add a picture
ADD_ICON To add a SAP icon
ADD_TABLE To add a table
ADD_FORM To add a form area
For example:
DATA: OBJ_TABLE TYPE REF TO CL_DD_TABLE_ELEMENT.
CALL METHOD OBJ_DD->ADD_TABLE
EXPORTING
NO_OF_COLUMNS = 2
WIDTH = u2018100%u2019
IMPORTING
TABLE = OBJ_TABLE.
Once all the elements are included, all these elements need to be merged into a single dynamic document. This can be done using method MERGE_DOCUMENT.
For example: CALL METHOD OBJ_DD->MERGE_DOCUMENT.
Dynamic document is now ready for display/print/export.
Method DISPLAY_DOCUMENT can be used to display document in the screen. Here it is possible to display dynamic document in an existing container or in the existing document also.
Method PRINT_DOCUMENT can be used to print the dynamic document. Here system enables local printing.
Method EXPORT_DOCUMENT can be used to export the document as a HTML file into PC.
In case of the dynamic document need to be refreshed based on the user action, one should first call the method INITIALIZE_DOCUMENT to clear the dynamic document contents. This method does not clear the dynamic document object reference. So it is possible to include another set of elements in the same dynamic document.
After displaying the document, any user action can be handled in the event RESOURCES_CHANGED of the class CL_GUI_RESOURCES. For example refreshing the document contents, displaying new contents on the same document etcu2026
Event RESOURCES_CHANGED can be triggered explicitly using the method ON_RESOURCES_CHANGED of the class CL_GUI_RESOURCES.
For showing a dynamic document in a report, a screen with custom control in it must be called from the program.
Example programs:
SAP provided a complete set of example programs (Package: SDYNAMICDOCUMENTS), which explain all the features mentioned in this weblog.
Program Description
DD_ADD_FORM_BUTTON Buttons on Forms
DD_ADD_FORM_INPPUT Interactive Elements: Forms with buttons
DD_ADD_LINK Interactive Elements: Links
DD_ADD_PICTURE SAP icons and pictures stored in BDS(transaction OAOR)
ADD_PICTURE To add a picture
DD_ADD_TABLE Tables
DD_ADD_TEXT Text input
DD_SPLIT_DOCUMENT Distribution of areas on dynamic documents
DD_STYLE_TABLE Style types & list colours
Also refer to this links:
/people/venkata.ramisetti/blog/2005/12/20/dynamic-documents-in-abap-objects
http://www.sapdevelopment.co.uk/reporting/ddhome.htm
www.saptips.com/WorkshopDescriptionsABAP.asp
Reward Points if found helpfull..
Cheers,
Chandra Sekhar. -
Refresh data in a Dynamic Document
Hello,
I'm using a Dynamic Document inside a dynpro but the data (add_text - display_document methods) are not refreshed even if I use the CL_GUI_TIMER to auto-refresh the contents of the dynpro.
Any idea?
AngeloHi Angelo.
Did you get any idea how to solve the problem? I face the same problem and found out, that if you use the print method (print_document) you get the refreshed document. But if you display the document you´ll get the old one.
Thanks for your or any othe´s reply.
Michael -
Create Dynamic Document Library Templates
I have the following scenario within our IT Org
1. PMO office maintains a "Standards" library, to which they publish all standard templates that need to be used for Project Management.
2. Each Project Manager would like to create a document library within their "project site" based on all the documents within "Standards" library.
My question is, would it be possible to create a document library template whose contents are dynamically pulled from another library?
Thanks.Hi ,
Based on your description, my understanding is that each Project Manager
creates document library with the same template, but what they need is that their document libraries have different content type with others.
There isn’t an out of the box method to create document library templates dynamically.
For your issue, I suggest each Project Manager create one document content type with the document template which they need, and add the content type into their document libraries.
Here is a similar case, you can use as a reference:
http://social.technet.microsoft.com/Forums/en-US/7d238bb5-8af7-4027-97cf-b41f84bcdb5d/dynamically-create-document-templates-for-new-menu?forum=sharepointdevelopmentlegacy
Best Regards,
Lisa Chen -
How to add the library document version to the parent Document content type?
Hi All,
I have a PWA instance with a project site for each project.
Each project site has its own document library.
Now I want to create several Templates to be available within each document library.
I have created the new content Site Content Types (Site Settings > Site Content Types) to fit my needs; each content type has the "document" content type as parent type.
Now I want include the "version" property (the dynamic value from the versioning) to each new document type, so I have tried to enable the "Information management policy settings" to the parent "document" type or the new ones,
including the label "{Version}", but I receive this error:The label reference, Version, could not be found.
So the only way to do this, is to open each site document library and make this change within it.
Why I can't enable the Lable at the Site level?
ThanksHi,
I can reproduce the issue by adding {version} or {_UIVersionString} in site content types > Document > Information Management policy settings > enable label.
As workaround, please create a document library, then add label in document library settings > Information Management Policy settings. Now save this document library as template and create new document library based on this template, the policy settings
will be saved for new document libraries.
Regards,
Rebecca Tu
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
How to add Dynamic .php content to a Dreamweaver Template
OS: Windows 7
DW Version: CS5
PHP: XAMP Local Server
I hope someone can help. I have created a Dreamweaver Template for .php and created 5 child pages of this template. Everything is in working order as far as that is concerned. Here is my problem:
I want to add some dynamic data (some categories) from a MySQL database to a nonEditable section of the main template so that it will flow to the 5 child pages. I can create a connection to the database with no problem, but when I go to insert a recordset into the template, it asks me to set up the "site", "document type" and "testing server" which I have already done. I am pretty sure that this is because it is looking at the .dwt file type and saying that it needs to be a dynamic document like .php. I have tried going through those steps, but then it just ends up renaming my .dwt file to .php and then it is no longer a template. I do not know why I cannot add dynamic data to a dreamweaver template. It seems like it should be a no-brainer, but it just isn't working out for me. In my research, I did locate the following
http://help.adobe.com/en_US/Dreamweaver/10.0_Extending/WS5b3ccc516d4fbf351e63e3d117f53d610 8-7fdb.html
but wasn't completely sure how to apply it or if it only pertained to CS4 since I am using CS5. To be honest, it confused me more than it helped.
I really hope there is a logical and simple solution to this issue as I have spent a lot of time researching/testing this.
Any help/direction is greatly appreciated. I am not looking for someone to just solve my problem and am willing to dig deep to learn, I am just do not know where to go from here.
Thanks again in advance for your assistance.Brad,
Thanks that worked! Although I will have to re-create my child pages and re-link my style sheets and scripts. But that will not be too difficult as I have not yet added any content to them and is a very small price to pay for the answer to my bigger problem. What is a bit quirky is that I did try to create a test .php template but when I saved it, DW did not automatically add the .php to the end after .dwt. but rather just named it test.php. I didn't think to just rename it since I had read that it would add it automatically so I thought I was doing something wrong.
Maybe there are settings in the preferences that will fix this. None-the-less, I can now move forward with my development thanks to your timely response. I really appreciate it. -
Dynamic documents in ABAP Objects (weblog)
Hi SDNers,
Do you want to implement the following features in ABAP Screens?
1. Large font sizes and more colour options than traditional ABAP/4 (There are some limitations also)
2. ICONS and pictures in different sizes
3. Texts
4. Links
5. Pushbuttons
6. Input fields
7. Dropdown list boxes
8. Tables with row span and with column span
9. Tables with frames and without frames
10. Tables with buttons, icons, pictures, input elements and texts in it.
Then please read the below weblog to incorporate these features...
<a href="/people/venkata.ramisetti/blog/2005/12/20/dynamic-documents-in-abap-objects">Dynamic Documents in ABAP Objects</a>
Thanks,
Ramakrishnaone limitation which comes to my mind immediately is that you cannot create spool output of the dynamic document.
Regards
Raja -
Clicking on link in dynamic document does nothing
Hello my friends,
I Add link to my dynamic document but when I press on the link it does
nothing. I create event handle class and connected it to the link and
it still did not work.
Please help me if you can, its urgent.
Regards,
Eitan Iluzz.Try this: http://helpx.adobe.com/creative-cloud/help/launch-creative-cloud-apps.html
-
To get Document content via RFC
Hi forum,
I have a small bsp-application to show documents for a material-number stored in the SAP-tresor (via ftp).
The SAP-tresor is installed in the core-system, the WEB-AS is another server.
I developed a remote-enabled function module called get_doc_content_rfc. This function module reads some customizing to get all values for calling the function module CV120_DOC_CHECKOUT_TO_TABLE.
Now, when I call my get_doc_content_rfc in the core-system, I get the document content via the function module CV120_DOC_CHECKOUT_TO_TABLE. When I call my function module get_doc_content_rfc form the developer-system via RFC in the core-system, the function module CV120_DOC_CHECKOUT_TO_TABLE dosn't deliver the document content.
In the debugger, I can see, the function module CV120_DOC_CHECKOUT_TO_TABLE opens a ftp-connection to the server with the tresor and then reads the document content. Do I use my function module get_doc_content_rfc in the core-sysem, the ftp-connect can be established. Do I use my function module get_doc_content_rfc via RFC to the core-system, the ftp-connection opend by the function module CV120_DOC_CHECKOUT_TO_TABLE gets a time out.
Now, my question. what can I do, to get the document content via RFC from the core-system.
Thank you for help
MeinolfHi,
Did you check RFC Adresses in SM59 both of two systems.
May be different.
ibrahim -
hi,
i am having a requirement to create/use "add link to a document" content type for a item in the document library.
so i got the code from below site :
http://howtosharepoint.blogspot.in/2010/05/programmatically-add-link-to-document.html
my issue is, if teh document library names are single words - like MOM, model, procedures etc this functionality is working fine and i am able to view the link to a document as an item.
but when the doc lib name contains special characters like , or / , this link to a document content type functionality is NOT working.
can anyone pls point me whether this is the actual issue ? ie, if the doc lib name contains special chars like , or / my
add link to a document wont work? is there any restrictions/limitations for doc lib names in SharePoint ?
for eg: my doc lib names are :
1) Report and analysis, Data
2) form / template
3) map/ plot
help is highly appreciated!hi,
its talking abt the subsite names and folders and NOT the document librraies.
is there any link which gives the naming convention / restricted names for document libs or splists , from msdn / blogs.technet.
thnx -
Dynamically Updating Content Server Portlets
[urlHi, I am currently having difficulty dynamically updating content server portlets. I have a portlet of the following form:[/url]
ArticleName Author Title Date mystory author1 title1 04/05/01
story2 author2 title2 06/07/04
story author3 title3 01/02/03
So I have this table where each one of the line items is an article in the content server. So, for example the first line item is an article "mystory" by "author1", with title "title1" and date "04/05/01" additionally there is an article text field, but this isn't displayed unless I click on the article name.
I can set up the basics of this portlet, but when I try to add any real functionality I run into one of two problems.
First Problem: Passing Information
I cannot find a way to pass information between content portlets. For instance, if the user would like to "re-sort" this table based on "date", I would like to have the user click on the "date" column heading and then reload the page. To do so, I would have to pass the section name back to the page so that it could resort based on this data. I have not found anyway to effectively pass information to a content server portlet. I am building these pages through use of the presentation template framework (so I can have access to the content items) but that seems to change the way portlets are handled.
I got around this limitation with a regular portlet by creating an intermediary page which captures passed information and stores it to the session state. Once the information was in the session state, it is accessible to the portlet on the first page. However, this only works because remote portlets do not change their session id once loaded. Content Server portlets, on the other hand, change their session id after every reload of the browser or page change. I can send information from a content server portlet to an intermediary page, but I cannot send it back to the portlet because the session id has changed so I have no idea of knowing where to send the information. I can write it to a session state, but by the time I return to the portal page, the content server has changed its session id so it does not know where to look any longer.
I suppose it would be possible to create an application state variable and append it with some static token (if there is some static variable per portal session) but I would rather not have to deal with application variables if at all possible.
Second Problem: Dynamically Updating PCS Tags
Even if I were able to the pass information back to my content server portlet, I run into another issue. The easiest way to sort content server items is using the filter command in the pcs:foreach tag. So, if I wanted to sort by author name, I could do something like the following <pcs:foreach var="item" expr="filter(folderByName('content'), filtered.name == '"name")" or something like that (the syntax may be incorrect, I just wrote this off the top of my head). However, it appears that the way the presentation templates are compiled goes in the order of PCS tags THEN JSP. So I would have no way of dynamically changing the variable on which I sort. For example, if I clicked on "Date" above in my table, I would like to be able to dynamically change my code so that I sort on date, and not name. I cannot find a solution to this problem.
My workaround is to use the pcs tags to write out all the possible sortings to java array objects. This gives me access to the data on a JSP level and based on whatever the user will chose, I could then display that array. While this works, it is extremely ghetto and inefficient. Any help or suggestions would be fantastic.
Thanks a lot,
Jason GrauelYou can use just about any javascript you want in any Content Server presentation template including ones that are used for portlets.
However, you should be careful to name javascript functions and global variables uniquely so that they do not conflict with any other javascript on the page. To do this, you can append the item id to function and variable names, for example,
function doSomething<pcs:value expr="pcs_id"></pcs:value>() {
return true;
Randy -
What are the advantages to using SAP Dynamic Documents?
Sorry, didn't realize I had this post in the Objects forum. Posting this in ABAP General.
Posted: Dec 6, 2010 11:58 PM
Hello,
Are there any advantages like portability and others to using dynamic documents rather than list programming.
The SAP provided classes have not been much used by any other SAP delivered programs, and there is less than 10 subclasses. A method CL_DD_DOCUMENT->ADD_STYLE, apparently to add style sheets, has related code commented out. The class CL_DD_STYLE_CLASS, has no methods. And we are with NetWeaver 7.0.
Is dynamic documents something that got left hanging midway, and probably not going to have further developments?
Would you suggest proceeding with dynamic documents for reports, would appreciate your input.
Thank you.
Posted: Dec 8, 2010 7:45 PM
Just in case, if some of you haven't read this thread, would appreciate your replies and suggestions.I had moved it to the objects forum because it seemed more object oriented.
However, if you want it here, I will leave it. I have also removed the other thread.
Rob -
Hi,
I have a doult about Dynamic Documents.
It seems very good and better than normal reports, and it's not very hard to implement.
My doult is, whether it's so good, why it's not very very used? does it have some big problem ou limitations?
Thanks,
Alexandre Nogueira.one limitation which comes to my mind immediately is that you cannot create spool output of the dynamic document.
Regards
Raja -
Link to Document Content Type issue - links not relative
I'm using the Link to Document content type in a library in order to link to documents in other libraries. We just migrated to 2010 from WSS 3.0 (2007) and are having an issue. We view our site internally thorough the internal machine address/name
and also have users connecting remotely from an external url. In 2007, it didn't matter whether we were internal or external, all links were apparently stored as relative because the "link to document" items worked fine either way. This
was despite entering the url fully and not relative. When viewing/editing the properties of that item, it shows you the full url applicable to where you are viewing it...internal if internal, external if external.
However, after the migration to 2010, all links that existed previously are fine, but any new items created using link to document apparently no longer store them as relative so either the internal or external users get the wrong link. For example,
if I put in the link as http://servername/library/doc the external users get that same link and it doesn't work, since it should be like https://myurl/library/doc. Viewing/editing the properties of the item shows an absolute url of whatever location
the item was added. For instance if I'm connected externally and add an item, even if i only enter it as relative, it creates the link as https://myurl/library/doc and then the internal users end up having to connect via that url and that is just a pain
due to AD and certificate issues. The internally created links are obviously not accessible at all from the outside.
I've also tried storing the link as relative when creating the item but it seems to overwrite it with the absolute link.
This is causing quite an issue with us. Does anyone have any insight as to what is going on and how to fix it?
thanks!Hmm...I thought I had the thread set to email me if there were replies and I never received an email so I thought there were no replies. I came back to this since another issue cropped up that is related and there were replies!
I cannot recall how things were set up exactly in 2007 and there's no way to look back now. I'm a novice when it comes to AAM/DNS/IIS really. Maybe you can suggest what it should look like?
We have our site which is accessed internally by http://machinename . Externally, we use https://sharepoint.mydomain.com .
In AAM we have http://machinename listed in the default zone with the same url for internal and public. We also have https://sharepoint.mydomain.com listed, in the internet zone and it also has the same url for both internal and public.
In IIS, the sharepoint site has bindings for port 80 and 443, but nothing specific to https://sharepoint.mydomain.com
DNS....I'm not sure what should be here, if anything.
We can access the site just fine externally, there are just a few instances where some links do not work correctly and point to the internal url instead of external when you are external. The original post is one time and the other, found the other
day, is a search box webpart that points to a relative url for the results page but externally it ends up going to the internal url.
I'd appreciate any guidance. Thanks! -
Getting the document content in a variable??
Hi,
How can I get the entire contents of a document into a string variable? I donot
want to print the contents inline but rather have to get them in a variable. Using
printDoc or printProperty tag?? I guess I will have to use printDoc but then how
can I stop the contents from being displayed in the jsp and how can I put them
in a variable??
Please help me...
Thanx.
PriruaYou should always double-check code put on the newsgroups, even if it's
put there by me :)
It probably should be at the beginning:
<es:forEachInArray array="<%=docs%>" id="adoc"
type="com.bea.p13n.content.document.Document">
<%
byte[] bytes = adoc.getContentBlock(0L, -1L);
Notice 'byte[]' instead of 'bytes[]', the type specified as Document
(Content doesn't have the getContentBlock() method, the sub-interface
Document does), and the 'L's on the numbers to specify that they are
longs to help the compiler find the correct method.
Greg
Prirua wrote:
Hi,
Thanx for your propmt reply. My code looks somethinglike this
<es:forEachInArray array="<%=docs%>" id="adoc" type="com.bea.p13n.content.Content"
<%
bytes[] bytes = adoc.getContentBlock(0, -1); // retrieve all the content
String enc = adoc.getPropertyAsString(null, "encoding");
String str = null;
if (enc != null)
str = new String(bytes, 0, bytes.length, enc);
else // use VM default encoding
str = new String(bytes);
%>
<li>The document title is: <cm:printProperty id="adoc" name="Title" encode="html"
/>
</es:forEachInArray>
But it is giving me these two errors...
C:\bea\wlportal4.0\applications\portal\MyPortal\WEB-INF\_tmp_war_portalDomain_po
rtalServer_MyPortal\jsp_servlet\_portlets\__contentq.java:152: cannot resolve
sy
mbol
symbol : class bytes
location: class jsp_servlet._portlets.__contentq
bytes[] bytes = adoc.getContentBlock(0, -1); // retrieve
all the content //[ /portlets/contentQ.jsp; Line: 19]
^
C:\bea\wlportal4.0\applications\portal\MyPortal\WEB-INF\_tmp_war_portalDomain_po
rtalServer_MyPortal\jsp_servlet\_portlets\__contentq.java:152: cannot resolve
sy
mbol
symbol : method getContentBlock (int,int)
location: interface com.bea.p13n.content.Content
bytes[] bytes = adoc.getContentBlock(0, -1); // retrieve
all the content //[ /portlets/contentQ.jsp; Line: 19]
^
2 errors
Could you plz specify if I have to include some file or something ?
Thanx.
Gregory Smith <[email protected]> wrote:
You will need to call the getContentBlock() method on the Document
object to retrieve the bytes of the document's content. Then, you do
whatever you need to with the bytes. When converting it to a String,
you
should be aware of double-byte-character encodings, and should check
the
Document's encoding metadata attribute, e.g.:
<%
bytes[] bytes = doc.getContentBlock(0, -1); // retrieve all the content
String enc = doc.getPropertyAsString(null, "encoding");
String str = null;
if (enc != null)
str = new String(bytes, 0, bytes.length, enc);
else // use VM default encoding
str = new String(bytes);
%>
In 8.1, the new <cm:getProperty> is able to retrieve the BinaryValue
of
a binary property of a Node.
Greg
Prirua wrote:
Hi,
How can I get the entire contents of a document into a string variable?I donot
want to print the contents inline but rather have to get them in a variable.Using
printDoc or printProperty tag?? I guess I will have to use printDocbut then how
can I stop the contents from being displayed in the jsp and how canI put them
in a variable??
Please help me...
Thanx.
Prirua
Maybe you are looking for
-
hi, I have few Custom Clearing charges i.e. once shipment reaches the port, there will be few custom clearing charges like: Shifting charges,Demurrage charges... My question is these custom clearing charges will be copied from which condition types??
-
Match in ranges created through 'address' and 'concatenate'
My goal is to search in an address range for a specific match (=match(2, b2:b5). I created the address range through a concatenate function of two cells (=concatenate("b2",":","b5")). The outcome is displayed correctly (B2:B5), but I can't use match
-
BAPI to Update Country of Origin for Delivery Item
Hello All, I have a requirement as follows. For an Outbound delivery item (VL02N), I need to update the 'Country of Origin' (EIPO-HERKL). This will come in 'Origin/Destination/Business' tab under 'Foreign Trade /Customs' tab for the delivery item. Co
-
Accessing entity class field values in a visual JSF page
There is a convenient way to access a session values into a JSF visual page using the following: String mySessionValue = (String) getValue("#{sessionScope.name}");Like the same, are there any ways to access entity class field values into a visual JSF
-
How to create contract in SAP-SRM via a bespoke?
Hi All, I got one requirement to create contract in SAP-SRM via a bespoke interface from the sourcing workbench. How to create contract in SRM via a bespoke? Even I don't know what is a bespoke. I belong to SAP bw platform kindly give me the solution