on 06-20-2012 3:41 AM
Dear Experts .
I want know if my requirement is possible made :
In the service FITE_VC_GENERAL_DATA for the application FITE_REQUEST I need call a window of popup when the enduser press the button Review, before of show the following screen.
The screen of popup have a button OK, that allow pass the information entried to the field COMMENT (EDITOR) of the screen standard.
My first solution was create a button in the View standard using an Enhancement. and This fine. But the user want this when the user press the button Review.
I checked in the COMPONENTCONTROLLER, in the methods ON_NAVIGATE. and in the line 26 , the value for variable iv_type is FORWARD when i press the button review.
CASE iv_type.
I doing a debugging, the system entry in the following line:
IF wd_this->check_general_data( ) IS INITIAL. and in the method CHECK_GENERAL_DATA,
The system transfer the information entried in the iview standard in the structure ls_el_general_data, using.
MOVE-CORRESPONDING ls_el_general_data TO ls_el_general_data_import.
My question is:
How can I call this window of popup When I press the button Review,
Is this posible? What other option can I have for solve my requirement?
I attach my screen actual with the enhacement created.
Thanks a lot in advance-
Regards
Hi Carmen,
I presume the data you wish to capture is well defined and not date ranges, as depicted in the image. Also, that you have to simply concatenate the data so captured on the new window and populate in the comments field.
Now, you can create a view and a window as enhancement in the WD component FITE_VC_GENERAL_DATA, with the fields of your choice. In the view, make a context node and have the fields in it. Embed the new view in the new window.
Next, you need to program the overwrite exit of the method ON_NAVIGATE of component controller FITE_VC_GENERAL_DATA and write additional code for 'FORWARD' value if iv_type. It should make a call to the newly created window as amodal window with just an OK button.
lo_apicmp = wd_this->wd_get_api( ).
lo_winmgr = lo_apicmp->get_window_manager( ).
lo_window = lo_winmgr->create_window(
window_name = 'NEW_WINDOW'
title = 'Into the comments'
close_in_any_case = abap_true
message_display_mode = if_wd_window=>co_msg_display_mode_selected
close_button = abap_true
button_kind = if_wd_window=>co_buttons_ok
message_type = if_wd_window=>co_msg_type_none
default_button = if_wd_window=>co_button_ok ).
lo_window->set_window_size( width = '600px' height = '500px' ).
lo_window->set_is_resizable( is_resizable = abap_false ).
lo_window->open( ).
On the WDDOEXIT method of view, set the GENERAL_DATA-EDITOR of component controller with concatenation of data captured from new view.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear, Now when I press the button Review, the system show the window popup (Attach Image). But the system Not transfer the data in the field EDITOR:
I add this code in the iView GENERAL_DATA_VIEW , method WDDOEXIT, Overwrite Exit..
DATA lo_nd_general_data TYPE REF TO if_wd_context_node.
DATA lo_el_general_data TYPE REF TO if_wd_context_element.
DATA ls_general_data TYPE wd_this->element_general_data.
DATA lv_editor TYPE wd_this->element_general_data-editor.
* navigate from <CONTEXT> to <GENERAL_DATA> via lead selection
lo_nd_general_data = wd_context->get_child_node( name = wd_this->wdctx_general_data ).
* @TODO handle non existant child
* IF lo_nd_general_data IS INITIAL.
* ENDIF.
* get element via lead selection
lo_el_general_data = lo_nd_general_data->get_element( ).
* @TODO handle not set lead selection
IF lo_el_general_data IS INITIAL.
ENDIF.
* @TODO fill attribute
* lv_editor = 1.
* set single attribute
lo_el_general_data->set_attribute(
name = `EDITOR`
value = lv_editor ).
Regards
Dear Abhijeet
I share my code:
DATA lo_nd_zdatos_comunicacion TYPE REF TO if_wd_context_node.
DATA lo_el_zdatos_comunicacion TYPE REF TO if_wd_context_element.
DATA ls_zdatos_comunicacion TYPE wd_this->element_zdatos_comunicacion.
* navigate from <CONTEXT> to <ZDATOS_COMUNICACION> via lead selection
lo_nd_zdatos_comunicacion = wd_context->get_child_node( name = wd_this->wdctx_zdatos_comunicacion ).
DATA lo_nd_general_data TYPE REF TO if_wd_context_node.
DATA lo_el_general_data TYPE REF TO if_wd_context_element.
DATA ls_general_data TYPE wd_this->element_general_data.
DATA lv_editor TYPE wd_this->element_general_data-editor.
* navigate from <CONTEXT> to <GENERAL_DATA> via lead selection
lo_nd_general_data = wd_context->get_child_node( name = wd_this->wdctx_general_data ).
* @TODO handle non existant child
* IF lo_nd_general_data IS INITIAL.
* ENDIF.
* get element via lead selection
lo_el_general_data = lo_nd_general_data->get_element( ).
* @TODO handle not set lead selection
IF lo_el_general_data IS INITIAL.
ENDIF.
* get element via lead selection
lo_el_zdatos_comunicacion = lo_nd_zdatos_comunicacion->get_element( ).
* @TODO handle not set lead selection
IF lo_el_zdatos_comunicacion IS INITIAL.
ENDIF.
* get all declared attributes
lo_el_zdatos_comunicacion->get_static_attributes(
IMPORTING
static_attributes = ls_zdatos_comunicacion ).
* @TODO fill attribute
* lv_editor = 1.
CONCATENATE 'Teléfono/Celular:'
ls_zdatos_comunicacion-tel_cel_inp
CL_ABAP_CHAR_UTILITIES=>NEWLINE
'Correo Electrónico:'
ls_zdatos_comunicacion-correo_inp
CL_ABAP_CHAR_UTILITIES=>NEWLINE
CL_ABAP_CHAR_UTILITIES=>NEWLINE
INTO lv_Editor.
* set single attribute
lo_el_general_data->set_attribute(
name = `EDITOR`
value = lv_editor ).
Thanks in advance.
Dear Abhijeet
I share my code:
DATA lo_nd_zdatos_comunicacion TYPE REF TO if_wd_context_node.
DATA lo_el_zdatos_comunicacion TYPE REF TO if_wd_context_element.
DATA ls_zdatos_comunicacion TYPE wd_this->element_zdatos_comunicacion.
* navigate from <CONTEXT> to <ZDATOS_COMUNICACION> via lead selection
lo_nd_zdatos_comunicacion = wd_context->get_child_node( name = wd_this->wdctx_zdatos_comunicacion ).
DATA lo_nd_general_data TYPE REF TO if_wd_context_node.
DATA lo_el_general_data TYPE REF TO if_wd_context_element.
DATA ls_general_data TYPE wd_this->element_general_data.
DATA lv_editor TYPE wd_this->element_general_data-editor.
* navigate from <CONTEXT> to <GENERAL_DATA> via lead selection
lo_nd_general_data = wd_context->get_child_node( name = wd_this->wdctx_general_data ).
* @TODO handle non existant child
* IF lo_nd_general_data IS INITIAL.
* ENDIF.
* get element via lead selection
lo_el_general_data = lo_nd_general_data->get_element( ).
* @TODO handle not set lead selection
IF lo_el_general_data IS INITIAL.
ENDIF.
* get element via lead selection
lo_el_zdatos_comunicacion = lo_nd_zdatos_comunicacion->get_element( ).
* @TODO handle not set lead selection
IF lo_el_zdatos_comunicacion IS INITIAL.
ENDIF.
* get all declared attributes
lo_el_zdatos_comunicacion->get_static_attributes(
IMPORTING
static_attributes = ls_zdatos_comunicacion ).
* @TODO fill attribute
* lv_editor = 1.
CONCATENATE 'Teléfono/Celular:'
ls_zdatos_comunicacion-tel_cel_inp
CL_ABAP_CHAR_UTILITIES=>NEWLINE
'Correo Electrónico:'
ls_zdatos_comunicacion-correo_inp
CL_ABAP_CHAR_UTILITIES=>NEWLINE
CL_ABAP_CHAR_UTILITIES=>NEWLINE
INTO lv_Editor.
* set single attribute
lo_el_general_data->set_attribute(
name = `EDITOR`
value = lv_editor ).
Thanks in advance.
Hi Carmen,
The reason your concatenated data is not appearing is because you are setting it in the WDDOEXIT of view GENERAL_DATA_VIEW of component FITE_VC_GENERAL_DATA.
Refer to my first reply. I had asked to 'set the GENERAL_DATA-EDITOR of component controller with concatenation of data captured from new view'. You need to do put your aforementioned code in the WDDOEXIT method of the new view and not that of the custom controller.
Hi Carmen,
Try using the code wizard afresh for the section. You need to set the element of the context of component controller. If you find it too complex, simply make a copy of the context node GENERAL_DATA component controller into the new view and map the entire node. Next, when you will update the local copy in your view, it will update the component controller value automatically.
Dear.
This is my code created in the metho WDDOEXIT of my iview new(created in the enhacement).
method WDDOEXIT .
DATA lo_nd_zdatos_comunicacion TYPE REF TO if_wd_context_node.
DATA lo_el_zdatos_comunicacion TYPE REF TO if_wd_context_element.
DATA ls_zdatos_comunicacion TYPE wd_this->element_zdatos_comunicacion.
* navigate from <CONTEXT> to <ZDATOS_COMUNICACION> via lead selection
lo_nd_zdatos_comunicacion = wd_context->get_child_node( name = wd_this->wdctx_zdatos_comunicacion ).
DATA lo_nd_general_data TYPE REF TO if_wd_context_node.
DATA lo_el_general_data TYPE REF TO if_wd_context_element.
DATA ls_general_data TYPE wd_this->element_general_data.
DATA lv_editor TYPE wd_this->element_general_data-editor.
* navigate from <CONTEXT> to <GENERAL_DATA> via lead selection
lo_nd_general_data = wd_context->get_child_node( name = wd_this->wdctx_general_data ).
* @TODO handle non existant child
* IF lo_nd_general_data IS INITIAL.
* ENDIF.
* get element via lead selection
lo_el_general_data = lo_nd_general_data->get_element( ).
* @TODO handle not set lead selection
IF lo_el_general_data IS INITIAL.
ENDIF.
* get element via lead selection
lo_el_zdatos_comunicacion = lo_nd_zdatos_comunicacion->get_element( ).
* @TODO handle not set lead selection
IF lo_el_zdatos_comunicacion IS INITIAL.
ENDIF.
* get all declared attributes
lo_el_zdatos_comunicacion->get_static_attributes(
IMPORTING
static_attributes = ls_zdatos_comunicacion ).
* @TODO fill attribute
* lv_editor = 1.
CONCATENATE 'Teléfono/Celular:'
ls_zdatos_comunicacion-tel_cel_inp
CL_ABAP_CHAR_UTILITIES=>NEWLINE
'Correo Electrónico:'
ls_zdatos_comunicacion-correo_inp
CL_ABAP_CHAR_UTILITIES=>NEWLINE
CL_ABAP_CHAR_UTILITIES=>NEWLINE
INTO lv_Editor.
* set single attribute
lo_el_general_data->set_attribute(
name = `EDITOR`
value = lv_editor ).
But the datas not are being saved in the field EDITOR. I checked this using the t.code pr05.
Can help me with a new suggestion?
Regards
Hi Carmen,
Your efforts seem to be going in right direction. Just check through debugging if the value you update is being overwritten by some standard code. Though this is unlikely, your code seems to be just fine. And if it's not updating, that means either something is wrong in the mapping or the updated data is being overwritten.
Dear
In the Component Controlle COMPONENTCONTROLLER, I created a enhancement in the method ON_NAVIGATE(Overwrite Exit)
method _OVR_4Q7MYN6RTCRZAPABTJQ7B0HTG . "Exit of ON_NAVIGATE (in ZADD_PLANILLA_TRANSPORTE )
rv_response = wd_this->fpm_api->gc_response_ok. "Default.
DATA lo_node_general_data TYPE REF TO if_wd_context_node.
lo_node_general_data = wd_context->get_child_node( name = if_componentcontroller=>wdctx_general_data ).
* MAH EhP4 begin
DATA lo_nd_request_transp_cat TYPE REF TO if_wd_context_node.
lo_nd_request_transp_cat = wd_context->get_child_node( name = wd_this->wdctx_request_transp_cat ).
DATA lo_nd_request_accom_cat TYPE REF TO if_wd_context_node.
lo_nd_request_accom_cat = wd_context->get_child_node( name = wd_this->wdctx_request_accom_cat ).
* MAH EhP4 end
IF lo_node_general_data->is_changed_by_client( ) IS NOT INITIAL
OR lo_nd_request_transp_cat->is_changed_by_client( ) IS NOT INITIAL "MAH EhP4
OR lo_nd_request_accom_cat->is_changed_by_client( ) IS NOT INITIAL. "MAH EhP4
wd_this->is_modified = abap_true.
ENDIF.
IF wd_this->is_modified IS NOT INITIAL.
rv_response = wd_this->fpm_api->gc_response_dirty.
ENDIF.
CASE iv_type.
WHEN if_fitv_fpm_api=>gc_navigate_exit.
WHEN OTHERS.
* begin SEBK011863
IF me->check_general_data( ) IS INITIAL.
data : lo_apicmp type ref to if_wd_component,
lo_winmgr TYPE REF TO if_wd_window_manager,
lo_window type ref to if_wd_window.
lo_apicmp = wd_this->wd_get_api( ).
lo_winmgr = lo_apicmp->get_window_manager( ).
lo_window = lo_winmgr->create_window(
window_name = 'ZPLANILATRANSPVENT'
title = 'Into the comments'
close_in_any_case = abap_true
message_display_mode = if_wd_window=>co_msg_display_mode_selected
close_button = abap_true
button_kind = if_wd_window=>co_buttons_ok
message_type = if_wd_window=>co_msg_type_none
default_button = if_wd_window=>co_button_ok ).
lo_window->set_window_size( width = '600px' height = '500px' ).
lo_window->set_is_resizable( is_resizable = abap_false ).
lo_window->open( ).
IF wd_this->check_general_data( ) IS INITIAL.
* end SEBK011863
rv_response = wd_this->fpm_api->gc_response_cancel.
ENDIF.
ENDCASE.
endmethod.
I made a debugging and the system continue executing the next line of code after open the window. And is for this reason that the system no get this information
Thanks in advance,
Dear experts
I have the following question with my requeriment:
1. When I use a window popup is posible that not follow running the line following of code until that the code of the window popup is executed ? ie until the enduser press the button ok in the window popup.?
What other option of solution can have I with this requirement?
Is posible that in the following screen standard I can get the information entried by the enduser of the preview screen standard General Data and get also el value lv_editor for insert this value in this table internal?
I dont now if this solution can be right .
What is a best solution, or my requeriment not have solution for inform to enduser?
Regards
Carmen
Thanks in advance,
Regards
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.