cancel
Showing results for 
Search instead for 
Did you mean: 

Read Work item id in SRM standard WDA

former_member211296
Participant
0 Kudos

Dear Experts

We are working on SRM 7.0 with SAP Portal 7.3.

In that we have a requirement to put some condition based on the selected task id of the work item from the Portal before displaying WDA content in window. We are trying to achieve the same in the pre exit of the corresponding WDA modify view method of SRM (Component name: /SAPSRM/WDC_UI_SC_DOTC_BD)

We understand that by using the following table: SWWORGTASK we can retrieve the task id against the work item id.  In SDN I could see the following article by Abhimanyu to read the work item id inside WDA.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0731bbc-810b-2a10-7fb8-900f16fd3...

It seems I cannot add any parameters to the HANDLEDEFAULT Event handler by using the enhancement framework.

Kindly let us know is there any way to read the corresponding Work item id in standard WDA application.

Thanks and Regards,

Hariprasath

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Is the work item id a part of the URL?

Former Member
0 Kudos

If so you can use method GET_URL_PARAMETER of class CL_WD_RUNTIME_SERVICES.

former_member211296
Participant
0 Kudos

Hi

Thanks for your reply. Yes the work item id available in the URL. 

http://xxxxxxx:50000/irj/portal?

NavigationTarget=OBNsapsrm_mode%3DAPPROVAL%26sapsrm_wiid%3D000000011574%26BOTechnicalName%3Dsc%26sapsrm_botype%3DBUS2121%26a%3Db%26sapsrm_pcdlocation%3D%sapsrm_boid%3D5084CFA3CCA31EB0E10080000A19031E&PrevNavTarget=navurl%3A%2F%2F016f2c40a03a60c174023874d5ad205e&sap-obn-url=OBN%3A%2F%2FBOTechnicalName%3Dsc%2FOperation%3Ddetailprof&NavMode=3&CurrentWindowId=WID1351491892617

In the above URL : sapsrm_wiid is the parameter that I need to read at runtime.

could you let me know , how can I read with the above methods which is mentioned by you.

do I need any parameters in window for this.

Thanks and regards,

Hariprasath

Former Member
0 Kudos

Hi,

No. No parameters are required.

You can put the below code wherever you seem it to be appropriate. For e.g. You have talked about HANDLEDEFAULT event handller, you can put the code there too.

CL_WD__RUNTIME_SERVICES=>GET_URL_PARAMETER

EXPORTING

     name = 'SAPSRM_WIID'

IMPORTING

     value = <your_variable>.

Now you can just store this value in your context and use it any place in your code.

Answers (0)