on 2014 Apr 07 9:05 PM
Hi Guys,
I am facing some issue, I have created one custom POWL, now from that i want to display the transaction number according to their Object type. E.g. If i will be clicking on INVOICE number, how i can open that invoice number in APPROVAL mode using LINK to action to Custom POWL.
Regards.
Nishant
Request clarification before answering.
Hi Nishant,
see realization of POWL for Workflow Inbox (class CL_IBO_INBOX_FEEDER_WI)
Coding you need is in method HANDLE_EXTERNAL_ACTION
Regards
Konstantin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Konstantin,
Thanks for your valuable anwser. But i wrote the code in the below order. Now my invoice and shopping cart opened in Approval and Display mode.
lv_bo_name = /sapsrm/if_cll_powl_c=>gc_obn_bo_sc.
CLEAR ls_namevalue.
ls_namevalue-key = 'SAPSRM_BOTYPE'.
ls_namevalue-value = /sapsrm/if_pdo_obj_types_c=>gc_pdo_shop.
APPEND ls_namevalue TO lt_namevalues.
CLEAR ls_namevalue.
* ls_namevalue-key = 'SAPSRM_BOID'.
* ls_namevalue-value = ls_result-GUID.
* APPEND ls_namevalue TO lt_namevalues.
CLEAR ls_namevalue.
ls_namevalue-key = 'SAPSRM_WIID'.
ls_namevalue-value = ls_result-wi_id.
APPEND ls_namevalue TO lt_namevalues.
CLEAR ls_namevalue.
ls_namevalue-key = 'sapsrm_mode'.
ls_namevalue-value = 'APPROVAL'.
APPEND ls_namevalue TO lt_namevalues.
CLEAR ls_namevalue.
ls_portal_actions-bo_op_name = /sapsrm/if_cll_powl_c=>GC_OBN_OP_DISPLAY_PROF.
WHEN /sapsrm/if_pdo_obj_types_c=>gc_pdo_invoice. "2205 Invoice
lv_bo_name = /sapsrm/if_cll_powl_c=>gc_obn_bo_inv.
CLEAR ls_namevalue.
* ls_namevalue-key = /sapsrm/if_cll_powl_c=>gc_obn_key_process_type.
* APPEND ls_namevalue TO lt_namevalues.
CLEAR ls_namevalue.
ls_namevalue-key = 'SAPSRM_BOTYPE'.
ls_namevalue-value = /sapsrm/if_pdo_obj_types_c=>gc_pdo_invoice.
APPEND ls_namevalue TO lt_namevalues.
CLEAR ls_namevalue.
* ls_namevalue-key = 'SAPSRM_BOID'.
* ls_namevalue-value = ls_result-GUID.
* APPEND ls_namevalue TO lt_namevalues.
* CLEAR ls_namevalue.
ls_namevalue-key = 'SAPSRM_WIID'.
ls_namevalue-value = ls_result-wi_id.
APPEND ls_namevalue TO lt_namevalues.
CLEAR ls_namevalue.
ls_portal_actions-bo_op_name = /sapsrm/if_cll_powl_c=>GC_OBN_OP_DISPLAY.
ls_namevalue-key = 'sapsrm_mode'.
ls_namevalue-value = 'APPROVAL'.
APPEND ls_namevalue TO lt_namevalues.
CLEAR ls_namevalue.
WHEN /sapsrm/if_pdo_obj_types_c=>gc_pdo_po. "2201 Purchase Order
WHEN OTHERS.
ENDCASE.
ENDIF.
ls_portal_actions-bo_system = /sapsrm/if_cll_powl_c=>gc_obn_bo_system."'SAP_SRM'.
* ls_portal_actions-bo_op_name = /sapsrm/if_cll_powl_c=>GC_OBN_OP_DISPLAY_PROF.
ls_portal_actions-bo_resolve_mode = /sapsrm/if_cll_powl_c=>gc_obn_bo_resolve_mode.
ls_portal_actions-bo_name = lv_bo_name.
CLEAR ls_namevalue.
ls_namevalue-key = /sapsrm/if_cll_powl_c=>gc_obn_key_process_type.
* ls_namevalue-value = 'ECPO'.
* ls_namevalue-value = /sapsrm/if_cll_powl_c=>gc_user_type_profi.
APPEND ls_namevalue TO lt_namevalues.
IF abap_true = /sapsrm/cl_sw_cont_impr_1=>document_browsing_is_active( ).
CREATE OBJECT lo_helper_po.
IF lo_helper_po->/sapsrm/if_pdo_static_helper~shall_use_document_browse_mode( iv_header_guid = ls_result-guid ) EQ abap_true.
ls_portal_actions-bo_op_name = /sapsrm/if_cll_powl_c=>gc_obn_op_browse.
ls_namevalue-key = /sapsrm/if_ch_wd_url_param_c=>gc_sapsrm_mode.
ls_namevalue-value = /sapsrm/if_cll_mapper_c=>gc_mode_browse.
APPEND ls_namevalue TO lt_namevalues.
ENDIF.
ENDIF.
ls_portal_actions-parameters = lt_namevalues.
e_portal_actions = ls_portal_actions.
ls_obn_components-object_type = e_portal_actions-bo_name.
ls_obn_components-operation = e_portal_actions-bo_op_name.
LOOP AT e_portal_actions-parameters INTO ls_portal_param.
ls_parameter-key = ls_portal_param-key.
ls_parameter-value = ls_portal_param-value.
INSERT ls_parameter INTO TABLE ls_obn_components-business_parameters.
ENDLOOP.
/sapsrm/cl_ch_wd_navi_serv=>/sapsrm/if_ch_wd_navi_serv~map_browse_mode_for_navigation(
CHANGING cs_obn_components = ls_obn_components ).
IF ls_obn_components-operation <> e_portal_actions-bo_op_name.
e_portal_actions-bo_op_name = ls_obn_components-operation.
REFRESH e_portal_actions-parameters.
LOOP AT ls_obn_components-business_parameters INTO ls_parameter.
ls_portal_param-key = ls_parameter-key.
ls_portal_param-value = ls_parameter-value.
APPEND ls_portal_param TO e_portal_actions-parameters.
ENDLOOP.
ENDIF.
* If necessary map the OBN Parameters to Launchpad Customizing
CALL METHOD /sapsrm/cl_cll_pwl_navhelp_fct=>get_instance
CHANGING
ro_navi_helper = lo_navi_helper.
*
CALL METHOD lo_navi_helper->resolve_and_navigate_lp
CHANGING
c_portal_actions = e_portal_actions.
CALL METHOD lo_navi_helper->resolve_and_navigate_absolute
CHANGING
c_portal_actions = e_portal_actions.
Regards
Nishant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.