Hi all gurus,
In SRM 7 I'm working on an ABAP web dynpro (/SAPSRM/WDC_DODC_CT) which is intended to show a document's header custom table. In the unique view of this web dynpro, the user can see the table (made up by custom fields) and can add or remove a line.
I created dinamically a pair of OVS search help for some of the fields of the table, in this way (method WDDOMODIFYVIEW):
* insert: Object Value Selector for ZZ_PROLE_R3 and ZZ_LIFNR_R3
DATA: lo_tabnode TYPE REF TO IF_WD_CONTEXT_NODE.
DATA: lo_tabnode_info TYPE REF TO IF_WD_CONTEXT_NODE_INFO.
lo_tabnode = wd_context->GET_CHILD_NODE( name = 'THCUS' ). "the custom table node
lo_tabnode_info = lo_tabnode->get_node_info( ).
CALL METHOD lo_tabnode_info->set_attribute_value_help
EXPORTING
name = 'ZZ_PROLE_R3'
value_help_mode = 131 "ovs mode
value_help = 'OVS'
.
CALL METHOD lo_tabnode_info->set_attribute_value_help
EXPORTING
name = 'ZZ_LIFNR_R3'
value_help_mode = 131 "ovs mode
value_help = 'OVS'
.
and these Object-value selectors seem to work properly: the user can trigger them and the selection populates correctly the related field, in the selected row, of the table.
So we could say that apparently, everything seems ok. BUT...
...if I then SAVE the document, or simply change to another view and come back, the new entries added via search help disappear.
It's like there's something missing (a binding?) on the "lower" level...But I don't understand what's the point.
Otherwise, if a value is entered directly by hand by the user, the new row remains persistently (that is to say, direct fill by the user populated correctly the table view AND related fields in the buffer table). Is there something I'm missing?
This is the third - and last - phase in my OVS method (ON_OVS_R3_ROLE):
WHEN if_wd_ovs=>co_phase_3.
* apply result
IF ovs_callback_object->selection IS NOT BOUND.
******** TODO exception handling
ENDIF.
ASSIGN ovs_callback_object->selection->* TO <ls_selection>.
IF <ls_selection> IS ASSIGNED.
ovs_callback_object->context_element->set_attribute(
name = `ZZ_PROLE_R3`
value = <ls_selection>-zz_prole_r3 ).
ENDIF.
Help and suggestions are highly appreciated.
M.
Edited by: Matteo Montalto on Nov 12, 2010 4:14 PM