on 09-08-2014 11:35 AM
Hi All,
I have a requirement where on enter of a material number , i need to display a popup having plants and user could select the plants out of it.
So the popup will be as follows :
1st Column 2nd Column
Check box Plants
All the plants selected i need to get those in my Z feeder class.
So how can we create popup's in OIF feeder classes ? Just to clarify, It's not a confirmation box, it's something where we need to first fetch the plants and then need to pass it to feeder class.
Please explain with steps.
Thanks,
Vimal
any suggestions?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Vimal,
You can achieve this by creating Dialog box for your popup.
1) on enter of material, call the dialog box
data: lo_fpm TYPE REF TO if_fpm,
lo_event_params TYPE REF TO if_fpm_parameter.
** lo_event_params is used to send any data to dialog box
CREATE OBJECT lo_event_params TYPE cl_fpm_parameter.
lo_fpm = cl_fpm_factory=>get_instance( ).
lo_event_params->set_value( EXPORTING iv_key = 'MATNR'
iv_value = lv_matnr ).
lo_fpm->open_dialog_box(
EXPORTING iv_dialog_box_id = 'DIALOG_BOX_1'
io_event_data = lo_event_params
is_dialog_box_properties = ls_dbprop ).
2) configure the dialog box, use List UIBB as per your requirement. it is recommended to use different feeder class for dialog box.
3) on get data_method of dialog box feeder class, on 'FPM_OPEN_DIALOG' event,
a) read the material clicked.
iv_eventid->mo_event_data->get_value( EXPORTING iv_key = 'MATNR'
IMPORTING ev_value = lv_matnr ).
b) get the list of all plants for the entered material and display plants with checkbox on dialog box list.
4) After selection of plant, on click on a button say 'ASSIGN' (to be configured on dialog box)
** this will close the dialog box and send the selected plants back to the main screen
data: lo_fpm TYPE REF TO if_fpm,
lo_event_params TYPE REF TO if_fpm_parameter,
lo_event TYPE REF TO cl_fpm_event.
** lo_event_params is used to send any data to dialog box
CREATE OBJECT lo_event_params TYPE cl_fpm_parameter.
lo_event_params->set_value( EXPORTING iv_key = 'WERKS_DATA'
iv_value = ct_data ).
CREATE OBJECT lo_event
EXPORTING
iv_event_id = cl_fpm_event=>gc_event_close_dialog_box.
* io_event_data = lo_event_params
io_event_data = lo_event_params.
lo_fpm = cl_fpm_factory=>get_instance( ).
lo_fpm->raise_event( lo_event ).
Hope you can manage now.
Thanks
Jitin Kharbanda
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.