Quantcast
Channel: SCN : Unanswered Discussions - SAP Fiori
Viewing all articles
Browse latest Browse all 1879

do we need to extend BUILD_SCENARIO_SERVICE_URL and when ?

$
0
0

Hello Folks,

 

I am doing a Proof Of Concept on extension of My Inbox for integrating all the applications in my organization under one approval app. To achieve this I extended the TaskProcessing service (version 2) into my own service and added all the required stuff following the cookbook.

 

One of the scenario is getting task from HP service manager, for which I implemented by own custom provider in Gateway server by extending the /IWPGW/CL_TGW_TASK_FACADE_ABS class and re-writing the methods as required. After that I completed the SPRO configuration for Task Gateway Providers and defined the software version, Provider, Task Facade Implementation Class, etc.

 

Next step - I maintained the SAP system alias and defined a new system alias with software version same as defined for my custom provider in the step above.

 

The issue - My Inbox application was not getting the tasks for default ECC system with scenario specific tiles.This only happens when I have defined a scenario and using that definition in Tile. It was always getting task from the custom provider system. If I say allItems=true it works perfectly.


On debugging I found that the BUILD_SCENARIO_SERVICE_URL always returns the service URL for one system alias.

 

I re-wrote the build scenario service URL to correct the issue and it is working. Now my question is - is this the correct approach ? Why is the default implementation not able to handle 2 system alias (one SAP and one Non SAP) ??

 

My re-definition of BUILD_SCENARIO_URL is given below -

DATA:

       lv_scn_count   TYPE i,

       ls_scn_task    TYPE  /iwpgw/c_tgw_tsk,

       lv_service_url TYPE string,

       lv_task_id type char40.

 

     CALL METHOD super->build_scenario_service_url

       EXPORTING

         iv_service_tech_name = iv_service_tech_name

         iv_version           = iv_version

         it_scenario_tasks    = it_scenario_tasks

         iv_entity_name       = iv_entity_name

         iv_prop_name         = iv_prop_name

       RECEIVING

         rv_service_url       = rv_service_url.

 

     IF it_scenario_tasks IS NOT INITIAL.

       DESCRIBE TABLE it_scenario_tasks LINES lv_scn_count.

       IF lv_scn_count EQ 1.

         READ TABLE it_scenario_tasks INDEX 1 INTO ls_scn_task.

         lv_service_url = '/sap/opu/odata/sap/Y_MY_INBOX_SRV;o='.

         CONCATENATE lv_service_url ls_scn_task-system_alias '/' iv_entity_name 'Collection?$filter=(' into lv_service_url.

         CONCATENATE '''' ls_scn_task-task_id '''' into lv_task_id.

         CONCATENATE lv_service_url iv_prop_name 'eq' lv_task_id into lv_service_url SEPARATED BY SPACE.

         CONCATENATE lv_service_url ')' into lv_service_url.

         rv_service_url = lv_service_url.

       ENDIF.

     ENDIF.


Viewing all articles
Browse latest Browse all 1879

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>