on 11-19-2012 9:51 AM
Dear All ,
I have a POWL application. I need to choose between 2 detail components at runtime based on document type ( Outbound / Inbound Delivery ) in my alv. Can anyone suggest how can we achieve this in the feeder class. As of now i can see that we can only pass one detail component can be given in feeder class.
Regards
Vikas
Hi Vikas,
Hope the below logic will help you to solve your issue,
IF_POWL_FEEDER~HANDLE_ACTION --> Handle action of the feeder class
" Once the selected record is moved to work area using below code,
DATA: l_result_tab TYPE ptrm_powl_web_trips_ext.
FIELD-SYMBOLS: <l_data> TYPE ptrm_powl_tr_action_data_t,
<l_data_line> TYPE ptrm_powl_tr_action_data.
CREATE DATA e_portal_actions-add_wdevent_data TYPE ptrm_powl_tr_action_data_t.
ASSIGN e_portal_actions-add_wdevent_data->* TO <l_data>.
CREATE DATA l_data TYPE ptrm_powl_tr_action_data.
ASSIGN l_data->* TO <l_data_line>.
READ TABLE c_result_tab INDEX i_action_index INTO l_result_tab.
" Check the value of the 'Document Type' field and based on the same, pass unique indicator to navigate method of the 'Overivew' component like below,
if l_result_tab-doc_type eq '1'. " Outbound Delivery
<l_data_line>-name = 'DOCTYPE'.
<l_data_line>-value = '1'.
APPEND <l_data_line> TO <l_data>.
elseif l_result_tab-doc_type eq '2'. " Inbound Delivery
<l_data_line>-name = 'DOCTYPE'.
<l_data_line>-value = '2'.
APPEND <l_data_line> TO <l_data>.
endif.
e_portal_actions-fire_wdevent = abap_true.
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 'Navigate' method of overview component
method navigate .
* Field Symbol Definition
field-symbols: <fs_parameter> like line of wdevent->parameters,
<ft_httpparam> type powl_namevalue_tty,
<fs_httpparam> type powl_namevalue_sty.
data : lv_doctype type char1.
clear lv_doctype.
read table wdevent->parameters with key name = 'EVENT_PARAMETERS' assigning <fs_parameter>.
assign <fs_parameter>-value->* to <ft_httpparam>.
if <ft_httpparam> is assigned.
read table <ft_httpparam> with key key = 'DOCTYPE' assigning <fs_httpparam>.
if sy-subrc eq 0.
lv_doctype = <fs_httpparam>-value.
endif.
endif.
if lv_doctype eq '1'.
" Call application 1 (Component 1).
elseif lv_doctype eq '2'.
" Call application 2 (Component 2).
endif.
end method.
Thanks,
Harish Kumar N
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Vikas,
it needs to be done once only.
Best regards,
Rohit
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 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.