cancel
Showing results for 
Search instead for 
Did you mean: 

POWL Expenses for Approval buttons not working

Former Member
0 Kudos

Dear Gurus,

We are on latest SPs (EA-HR 607 SP21, SAP_HR 604 SP70, EP 7.31 SP10).

I've configured POWL query Expense Reports for Approval (ID: FITV_POWL_TRIPSFORAPPROVAL_EXP)  on to the application MANAGER_MSS_INBOX_2. All the personalization related to Employee list for expenses are in place. The class behind the above query is CL_FITV_POWL_TRIPS_TOBEAPPROVE. Workitems are populating perfectly and the preview of the Expense claim also displays on the POWL.

But,

Issue: When a manager access the workitem under Expense Reports for Approval, buttons 'Display/Print', 'Maintain Employee List' and etc enabled. When a manager click on Display/Print or Maintain Employee List, nothing happens. Also the same when click on Attachments link.

Please see below screen shot.

I believe it is a bug introduced in the latest SPs. Could someone help in this as soon as possible, please?

Many thanks for your time and help in advance.

Regards

SP

Accepted Solutions (1)

Accepted Solutions (1)

siddharthrajora
Product and Topic Expert
Product and Topic Expert

When clicking on 'Display' on the POWL, an event is raised. See in the HANDLE_ACTION method of the feeder class CL_FITV_POWL_TRIPS_TOBEAPPROVE. So far so good. The event data is passed out to the POWL framework. The POWL framework raises this event. And now it comes: in the delivered standard application FITV_POWL_APPROVER, the view V_POWL of the WD component FITV_POWL_APPROVER contains an event handler method for the POWL follow up events. See method FOLLOW_UP_ACTION in this webdynpro view. This method will be triggered, which then calles it is used outside the dedicated WDA application FITV_POWL_APPROVER. Only in this context the raised event is processed. If you use this outside this framework, you must catch this your own. E.g. you could do a Z Feeder Class and handle the display action directely in there, instead of raising an event. Also in your case there is a generic WDA application behind. But this does not handle travel specific events. Test FITV_POWL_APPROVER and you will see, it works. In the end you must reach function PTRM_WEB_FORM_GET IF i_actionid = cl_fitv_powl_trips_tobeapprove=>con_action_display. DATA:    l_api_component    TYPE REF TO if_wd_component,    l_operation        TYPE string,    ls_bo_param        TYPE wdy_key_value,    lt_bo_params        TYPE wdy_key_value_table.  l_api_component = wd_this->wd_get_api( ).    LOOP AT c_selected INTO lv_selected.      READ TABLE c_result_tab INDEX lv_selected-tabix ASSIGNING . * prepare application parameters      ASSIGN COMPONENT 'EMPLOYEENUMBER' OF STRUCTURE <ls_result_tab> TO .  ls_bo_param-key  = cl_fitv_navigation=>gc_param_persno.  ls_bo_param-value = .  INSERT ls_bo_param INTO TABLE lt_bo_params.      ASSIGN COMPONENT 'TRIPNUMBER' OF STRUCTURE TO .  ls_bo_param-key  = cl_fitv_navigation=>gc_param_tripno.  ls_bo_param-value = .  INSERT ls_bo_param INTO TABLE lt_bo_params. * Operation= Call Display Form  l_operation = cl_fitv_navigation=>gc_op_displayform. * Call the specific application and creates a new window  cl_fitv_navigation=>navigate_to_object(    EXPORTING      component          = l_api_component      operation          = l_operation      business_parameters = lt_bo_params ). ENDLOOP.

Former Member
0 Kudos

Dear Siddharth,

Many thanks for your help in this regard. Yes, using FITV_POWL_APPROVER works on its own within its framework. I am little disappointed though, as we have MSS POWL framework and expected to handle events from other POWL queries which it receives. But in travel expenses case this behaviour is different and works a  wrapper in the application itself and handles only its own events.

In summary, MSS POWL design allows to plug in the travel POWL queries but doesn't cater the purpose using SAP standard configuration and customers should aware of this. The only mechanism to make this to work is through enhancing the feeder class and capture the relevant events.

Once again thanks a lot for your help in providing the exact location pointer where to capture the events.

Regards

SP

Former Member
0 Kudos

Siddarth, thank you for your input!

Lets be more specific (of course still in MSS POWL context). Below there is an example code that can be placed in post-exit of - for example - view method: V_DETAILS_EXPENSES->ONACTIONDISPLAY (FITV_POWL_TRIP_APPR_DTL)

  DATA lr_node_details_expenses TYPE REF TO if_wd_context_node.
  DATA ls_details_expenses      TYPE wd_comp_controller->element_details_expenses.
  DATA lr_node_details_plan    TYPE REF TO if_wd_context_node.
  DATA ls_details_plan          TYPE wd_comp_controller->element_details_plan.
  DATA lr_node_details_request  TYPE REF TO if_wd_context_node.
  DATA ls_details_request      TYPE wd_comp_controller->element_details_request.
  DATA lv_event_data            TYPE REF TO data.
  DATA lt_event_parameters      TYPE powl_namevalue_tty.

  DATA: l_api_component  TYPE REF TO if_wd_component,
        l_operation      TYPE string,
        ls_bo_param      TYPE wdy_key_value,
        lt_bo_params    TYPE wdy_key_value_table.

  FIELD-SYMBOLS <fs_event_data>  TYPE ptrm_powl_wdevent_data_appr.
  FIELD-SYMBOLS <fs_trips_table> TYPE STANDARD TABLE.

  l_api_component = wd_comp_controller->wd_get_api( ).

  CREATE DATA lv_event_data TYPE ptrm_powl_wdevent_data_appr.
  ASSIGN lv_event_data->* TO <fs_event_data>.
  <fs_event_data>-actionid = cl_fitv_powl_trips_tobeapprove=>con_action_attachments.
  <fs_event_data>-powltype = wd_comp_controller->md_powl_type.

  CHECK wd_comp_controller->md_powl_type EQ cl_fitv_powl_trips_tobeapprove=>con_tripsforapproval_exp.

  lr_node_details_expenses = wd_comp_controller->wd_get_api( )->get_context( )->root_node->get_child_node( name = wd_comp_controller->wdctx_details_expenses ).
  lr_node_details_expenses->get_static_attributes(
    IMPORTING
      static_attributes = ls_details_expenses ).

* prepare application parameters
  ls_bo_param-key  = cl_fitv_navigation=>gc_param_persno.
  ls_bo_param-value = ls_details_expenses-employeenumber.
  INSERT ls_bo_param INTO TABLE lt_bo_params.

  ls_bo_param-key  = cl_fitv_navigation=>gc_param_tripno.
  ls_bo_param-value = ls_details_expenses-tripnumber.
  INSERT ls_bo_param INTO TABLE lt_bo_params.

* Operation= Call Display Form
  l_operation = cl_fitv_navigation=>gc_op_displayform .

* Call the specific application and creates a new window
  cl_fitv_navigation=>navigate_to_object(
    EXPORTING
      component          = l_api_component
      operation          = l_operation
      business_parameters = lt_bo_params ).

This will navigate to cl_fitv_navigation=>gc_op_displayform. Navigation to all gc_op_* objects is solved.

But how to navigate to attachement view?

Still not getting why belows code works when fitv_powl_approver app is called, but does not work out of MSS POWL ...

METHOD onactiondisplay_attachments .
  wd_comp_controller->m_action = cl_fitv_powl_trips_tobeapprove=>con_action_attachments.
  wd_comp_controller->trigger_event( cl_fitv_powl_trips_tobeapprove=>con_action_attachments ).
ENDMETHOD.

siddharthrajora
Product and Topic Expert
Product and Topic Expert
0 Kudos

I overlooked this, is it still an issue with opening of attachments? check in tables IBO_C_WF_ACS for actions IBO_C_WF_APS for action properties IBO_C_WF_TAS for tasks and their default actions IBO_C_WF_CAS for assignment of custom attributes to tasks IBO_C_WF_TTAS for assignment of actions to tasks are you using POWL in NWBC then use transaction SWFVMD1 Note 1149144 - SWF_WORKPLACE:Composite SAP Note Business Workflow

Former Member
0 Kudos

Siddarth,


I found the solution.


I am new to POWL, so I was assuming thats customizng is wrong... And this was wrong approach


After debugging it came out that the follow up event  - which is triggered on the detail view (FITV_POWL_TRIP_APPR_DTL) - is not handled anywhere...


Funny thing is that handler for this event - in this context - is placed in FITV_POWL_APPROVER->V_POWL->FOLLOW_UP_ACTION - which is - of course - executed when  FITV_POWL_APPROVER is run, but is not used within IBO_WDC_INBOX  ( FITV_POWL_TRIP_APPR_DTL is hardcoded in CL_FITV_POWL_TRIPS_TOBEAPPROVE, feeder class of FITV_POWL_TRIPSFORAPPROVAL_EXP, so it is used "directly", without the "upper" component)


I had to enhance IBO_WDC_INBOX to be able to handle follow up event, and of course process it (I copied few methods from FITV_POWL_APPROVER, added event handler for POWL_UI_COMP-> POWL_FOLLOW_UP in the component controller, of course all necessary usages, and it now works fine. All the events triggered by detail view are now handled.


I just lost so much time on googling, going many times through customizng, debugging, on assumption that functionality is there, but is just not  triggered/customized right...

Repating, I am new to POWL, but seems like this cannot work out of the box in MSS POWL.

siddharthrajora
Product and Topic Expert
Product and Topic Expert
0 Kudos

i m glad you are able to resolve this, and you are right, we always ask to copy FITV approver application in POWL INBOX Travel is not integrated yet with POWL and hence you don't see it there and needs to be implemented

Answers (1)

Answers (1)

Former Member
0 Kudos

Dear Surya,,

You said "I've configured POWL query Expense Reports for Approval (ID: FITV_POWL_TRIPSFORAPPROVAL_EXP)  on to the application MANAGER_MSS_INBOX_2. All the personalization related to Employee list for expenses are in place. The class behind the above query is CL_FITV_POWL_TRIPS_TOBEAPPROVE. Workitems are populating perfectly and the preview of the Expense claim also displays on the POWL."

For me the work item is not populating into the Travel Approver Work Center. What Configuration you have do for that. Kindly help me on this.

Regards,

Namsheed.