2008 May 19 10:08 AM
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. R
2008 May 19 10:21 AM
Hi,
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.
2008 May 19 10:21 AM
Hi,
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.
2008 May 19 10:26 AM
Hi,
[http://help.sap.com/saphelp_webas620/helpdata/en/f5/edd938d8dbe93de10000000a11405a/frameset.htm]
[http://help.sap.com/saphelp_nw04/helpdata/en/b6/ab3a8103ac11d4a73f0000e83dd863/content.htm]
2008 May 19 10:30 AM
Hi,I forgot to send this link..
[http://www.adobe.com/products/server/outputpaksap/pdfs/95009390_outsap_ds_UE.pdf]