How to get editable pop up in Web UI?
Requirement : To design editable popup with pre-populated question, user will enter the answer to this question and it should be saved on opportunity header notes(one text type). Based on certain data validation of few fields on Opportunity header, the pop up should appear as Editable screen.
Approach:
(1) Created a component ZTEST_POP, Added context node as BTAdminH & BTTextH
(2) Created a pop view with context node (BTTextH)
(3) Included view created as part of step 2 into MainWindow
(4) Changed runtime repository & Added interface view for the custom component
(5) Enhance BT111H_OPPT component => Runtime Repository ->created component usage”Popup” for ZTEST_POP component
(7) Redefine the EH_ONSAVE method of BT111H_OPPT and called the popup using below code:
confirm_popup = comp_controller->window_manager->create_popup(
iv_title = ‘Enter Solution text Z0008’
iv_interface_view_name = ‘ZTEST_POPUP/MainWindow’
iv_usage_name = ‘Popup’ ).
(8). Component controller binding: There should be an identical context node created in both the components.(can be a modal or value node).
Redefine method ‘WD_USAGE_INITIALIZE’ in the source component ‘component controller’ and refer to the target component usage(Component usage of pop view)
Example:
IF iv_usage->usage_name = 'BP_BPBT'.
CALL METHOD iv_usage->bind_context_node
EXPORTING
iv_controller_type = cl_bsp_wd_controller=>co_type_component
iv_target_node_name = 'BUTTONSAVE' " Node of the MAIN component
iv_node_2_bind = 'BUTTONSAVE'. " Node of the embedded component
ENDIF.
Add the context node to the Interface controller in run time repository of target component.
Now if you set the data in source component context node, it will reflect at target.
Another simple way is to add the data required in target component to the outbound plug of source component and use the same at target component.
You can see how the query services of standard F4 helps are filled, this is the same way..
Refer: Wiki Article – Creating popup message in webclient UI
This document was generated from the following discussion: how to get editable pop up in Web UI?