What are popups ?
Popups can be used for selection , additional data display and other simple user interactions.
They are displayed as new windows and can be moved or minimized to view data on the main window. However, as long as the popup is opened, it is not possible to work on the data of the main window; effectively setting the focus back to the popup.
The popup in effect behaves like the main controller and uses a sub-controller to render data and toolbar . Any controller that can be used in screen-position 3 and 4 (i.e. the ODC area) can be used within the popup as the sub-controller.
Four Simple Steps to Customizing using transaction CRMC_LAYOUT_C.
- Define the event for which the popup will occur.
In transaction crmc_blueprint_c->Application Element->Event , define the event .Set the usage to “Layout-Relevant”.
- Assign this event to the message as action_event.
In transaction crmc_blueprint_c->Navigation For log Message->Assign Message Log to Navigation , enter the following details .
- Application Set – The application set to which this application belongs .(You can see this in crmc_blueprint_c->Application/Layout)
- Message Id,Message Number – The message for which popup should appear.
- Action Event – The event created in step 1.
- Setup the toolbar for the popup.
In transaction crmc_blueprint_c->Application Element->Toolbar Group , create a toolbar group and assign events to it.
Note:The event CANCEL_POPUP is mandatory.
- Putting the popup into application layout.
In transaction crmc_blueprint_c->Application/Layout, select the application , then using the “Define Layout” option create an entry as follows .
- Event – The event defined in step 1.
- Position – Set this to “Popup”.
- Toolbar group – Toolbar group defined in step 3.
Remember to set the “Screen Element Type”,”Field Group” and “Structure Name” also.These basically decide the look and content of the popup. You should use only the following screen element types :
What Next ?
What we’ve done till now can work only when the appropriate message reaches the framework in response to an event. For this each model access class has a method called “Get_Messages” .In this method put the message (to which the popup is linked ) into the table RT_APPLOG.
A bit more about popups
- Popups are triggered by a message.
- Message is an anchor for –
- Header line (message text).
- Object key (object the message belongs to).
- Appearance of popup (subcontroller).
- A popup is closed if the message is deleted.
- A popup can be closed (obligatory Cancel-button) without deleting the message and reopened by clicking on the message.
- Closing the popup with X-button in the window titlebar has same affect as using Cancel button of popup toolbar.
- Popups have a fixed size.