on 01-20-2012 10:51 AM
Hi,
Im struggeling with my OVS helps. I need to manage many of them in the same WD application.
Ive been following a standard guide and the first OVS i created worked perfectly.
I tried creating the second one in a different view, but I cant seem to get it to work. It dumps when performing a search with a "Type conflict with ASSIGN in program " error. When I look at the error-log I clearly see that it is trying to perform the search in my first OVS help.
So my first question: Can I use the same OVS component (WDR_OVS) for both views or do I need to set up multiple "Used components"?
Hoping for some tips and answers 😃
Hi Mathias,
We can trigger OVS for multiple fields by reusing WDR_OVS only once in our component. If you create two different usages for two fields, performance problem will occur. Check the below code co handle OVS for different fields using single usage.
method ovs_emp_id " OVS for emp Id
data : ls_parameter TYPE wdr_event_parameter_list,
ls_ovs TYPE wdr_event_parameter,
lv_value TYPE string .
ls_parameter = wdevent->parameters .
LOOP AT ls_parameter INTO ls_ovs WHERE name = 'OVS_CONTEXT_ATTRIBUTE'.
CALL METHOD wdevent->get_string
EXPORTING
name = 'OVS_CONTEXT_ATTRIBUTE'
RECEIVING
value = lv_value. " lv_value will return the attribute name of OVS Help field
IF lv_value = 'EMP_ID'.
lv_flag = 'X'.
ENDIF.
ENDLOOP.
IF lv_flag EQ 'X'.
" Perform your OVS coding for Employee ID here..
endif .
endmethod .
method ovs_emp_name " OVS for emp Name
data : ls_parameter TYPE wdr_event_parameter_list,
ls_ovs TYPE wdr_event_parameter,
lv_value TYPE string .
ls_parameter = wdevent->parameters .
LOOP AT ls_parameter INTO ls_ovs WHERE name = 'OVS_CONTEXT_ATTRIBUTE'.
CALL METHOD wdevent->get_string
EXPORTING
name = 'OVS_CONTEXT_ATTRIBUTE'
RECEIVING
value = lv_value. " lv_value will return the attribute name of OVS Help field
IF lv_value = 'EMP_Name'.
lv_flag = 'X'.
ENDIF.
ENDLOOP.
IF lv_flag EQ 'X'.
" Perform your OVS coding for Employee Name here..
endif .
endmethod .
Or instead of creating 2 separate methods , you can set flag X for employee ID, and flag Y for employee Name in single method itself and handle accordingly.
Hope this helps u.,
Revert back if you need some more clarifications.,
Thanks & regards,
Kiran.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to create multiple usage of component WDR_OVS and obviously with different use names for each F4 you want to implement using OVS.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.