This document discusses controlling windows and canvases programmatically in ABAP. It describes using triggers and system variables to interact with windows, manipulating multiple windows and views, and navigating tab style canvases. It provides examples of window and canvas built-ins for tasks like finding, getting and setting properties of windows and canvases, hiding, showing, moving and resizing windows, and working with tab pages.
2. Objectives
• Display a form document in multiple windows
• Write code to interact with windows
• Manipulate windows programmatically
• Window and Canvas Built-ins
• Manipulate canvas views programmatically
• Display large data blocks in a window
7. Working with Tab Style Canvas
Page 1 Page 3Page 2click
• Uses either function key
• Next tab Page
• Previous Tab page
The When-Tab-Page-Changed trigger
fires when a user:
• Clicks a tab
Previous
Tab Page
Next
Tab Page
8. Working with Tab Style Canvas
Tab canvas system variables:
• :SYSTEM.TAB_NEW_PAGE
• :SYSTEM.TAB_PREVIOUS_PAGE
9. Built-ins for Manipulating Tab Canvas
• FIND_TAB_PAGE: Returns the tab page ID
• GET_TAB_PAGE_PROPERTY: Returns
the tab page label or the tab page canvas
• SET_TAB_PAGE_PROPERTY: Enables changing of the tab page
label
10. Example
• Identify the topmost tab page
• Bring a tab page to the top programmatically
IF GET_CANVAS_PROPERTY(‘Dept_cv',
TOPMOST_TAB_PAGE)= ‘Emp_page' THEN
SET_CANVAS_PROPERTY(‘Dept_cv',
TOPMOST_TAB_PAGE,
‘Dept_page');
END IF;
12. Manipulating Windows Programmatically
• Maximizing MDI Window
SET_WINDOW_PROPERTY (forms_mdi_window,
window_state, maximize);
• Setting Title for the Window
SET_WINDOW_PROPERTY (‘DEPT_WIN’, Title,
‘Department Application’);
• Location the Cursor window
GET_VIEW_PROPERTY (GET_ITEM_PROPERTY(NAME_IN
(‘system.cursor_item’), item_canvas),
window_name);
13. Summary
• Controlling windows with system variable
SYSTEM.EVENT_WINDOW
• Window Interaction triggers
• Working with Tab Style Canvas
– SYSTEM.TAB_NEW_PAGE
– SYSTEM.TAB_PREVIOUS_PAGE
• Different Window and Canvas Built-ins
Editor's Notes
Technical Note
In Microsoft Windows, you can reference the multiple document interface
(MDI) Application window with the FORMS_MDI-WINDOW constant.
FORMS_MDI_WINDOW is used with certain built-in functions and procedures
That relate to windows.
In web-deployed forms, you can obtain similar functionality by setting the
Forms Applet WIDTH and HEIGHT parameters in the base HTML page.
Technical Note
REPLACE_CONTENT_VIEW does not hide the stacked canvas already displayed
In the window. In contrast SHOW_VIEW and SET_VIEW_PROPERTY will display
The given canvas in front of any stacked canvas, if the canvas Visible property is set to
True.
Technical Note
In general, put blocks in separate windows. If blocks are closely related
(through a foreign-key relationship) put them in the same window.
During commit processing, Forms processes all base table blocks in
Sequential order. Therefore, transaction management is block-based rather than
Window-based. However, the user expects to interact with a form in a Window-based
Manner.
Technical Note
You can also maximize the client server MDI window application with the
WINDOW_STATE command line parameter:
ifrun60.exe module=emp.fmx userid=scott/tiger@trn9 window_state=maximize
You can switch from the MDI to the SDI window application by using the USESDI command
Line parameter:
ifrun60.exe module=emp.fmx userid=scott/tiger@trn9 usesdi=yes
With SDI window applications, you must size form module window to allow for the menu
Menu toolbar and console bar display.