cancel
Showing results for 
Search instead for 
Did you mean: 

Workitem Shortcut via Email fails to open due to missing router string

Former Member
0 Kudos

Hello,

I was searching the internet since this morning, but did not find a similar problem being discussed anywhere in SCN..

To give you a background, I am working on a custom version of PO Release workflow, where one of the requirements is to send out email notifications (external emails) to PO approvers of different release levels, reminding them to approve a new PO, or when there is a change in any PO. This email has a shortcut attachment that opens the workitem that opens the relevant PO in ME29N in edit mode and goes directly to the 'Release Strategy' tab.

I'm using the Function module SWN_CREATE_SHORTCUT to create the shortcut, which returns an internal table, and then I embed this into the email content.. Currently I pass the parameters 'transaction code', 'system id', 'language', then a command parameter that executes the workitem, and it all works fine.

The problem arises when a user from another country opens this attachment.. Usually these users use a router string whenever they logon to SAP. All of them have this router string in their SAP logon pads.. So the current shortcut we have, does not work for them, obviously because we are not embedding the router string here..

My question is - How do I embed a router string to the shortcut, using the above function module? I do not find a detailed documentation to this FM anywhere.. Can this be done with this FM? Or is there a better API to do so? I have the router string they use, and I am ok with hardcoding this..

Please share your experience.

Thank you in advance,

Arun

Accepted Solutions (1)

Accepted Solutions (1)

former_member186746
Active Contributor
0 Kudos

Hi,

What happens when you set up a basic extended notifications with attachments (or urls) for workitems and then let the users from another country execute it?

I have never manually created SAP logons in workflow I usually just use the latest SAP standard functionality for transforming workitems to emails.

Kind regards, Rob Dielemans

Former Member
0 Kudos

Hi Rob,

Thanks for the idea.

I've never used this, so forgive me if I'm getting this all wrong..

I think your suggestion might not be an option for me, because here we want an email with lot of standard texts, and their translations, and PO item details everything in one email which also has the shortcut to the workitem. I think that's why we decided to deviate from Standard and build a custom email. I'm not sure if all this is possible with the method you had suggested above. If so, kindly elaborate a little more.

I must also add that we are in short of budget here, and huge changes to the design is not acceptable at this point.. Also, the current shortcut works fine, so we prefer to keep it as it is, and additionally have another shortcut attachment in the same email, which has a router string embedded and thus would work from another network.. Am I dreaming?

Regards,

Arun

former_member186746
Active Contributor
0 Kudos

Hey Arun,

I've worked with PO releases before. You can place all of the logic needed for approval in a user decision and then follow that one up with a task which executes bapi_po_release (or whatever the bapi is called) .

But you mentioned budget constraints. So for now just do the practical thing.

Cheers, Rob.

Answers (4)

Answers (4)

Former Member
0 Kudos

Hey everyone,

This issue is resolved..

The shortcut created by SWN_CREATE_SHORTCUT automatically uses the router string maintained in the SAP GUI if that is the first entry in the logon pad for that system.. But we had this issue for some of our users because they had two entries in their SAP Logon for the same system, one with a router string, and another without.

So now, I can forget about embedding a router string into a shortcut.. I think it can never be done, because the shortcut seems to always pick the router string from SAPGUI (the first entry for that system it comes across)..

Thank you all for your helpful answers and inputs..

Best Regards,

Arun

former_member215344
Contributor
0 Kudos

Great job Arun !!!

And thanks for sharing the info 🙂

Regards,

Ajay Bose

Former Member
0 Kudos

Hi Arun,

      You can use the 'Extended Notification' concept. By this technique the emails can be sent when new workflow items are generated. It also enables the inclusion of a link to the workflow inbox in the generated email.

 

The link of the related content to configure the 'Extended Notification' is given below.

http://saptechnical.com/Tutorials/Workflow/Notification/Index.htm

Regards,

Debsubhra Das.

Former Member
0 Kudos

Hello Debsubhra,

Thank you for the response..

I've never tried extended notifs. We have constraints now, so I don't think whether we could change the existing design at this point.. Besides, the current logic works and we don't know whether the extended notifs also would have the same problem at the stage when it reaches the users outside the network.

I might have to consider other options.

Regards,

Arun

Former Member
0 Kudos

Anyone else?

In SAPGUI scripting, I read something about executing sapgui.exe from the command line and passing parameters such as userid, pwd, routerstring, server address etc.. Is there any way we could invoke this from an abap program?

To add to the clarity of my question, here is the code I use currently to create a shortcut.

       CONCATENATE '[Workflow]' cl_abap_char_utilities=>cr_lf

                   INTO l_sc_custom. " #EC NOTEXT

       IF ls_wi-wi_id IS NOT INITIAL.

         CONCATENATE 'p_action=EXECUTE'

                     '; p_wi_id='(004) ls_wi-wi_id

                     INTO l_sc_param.

         l_tcode = '*SWNWIEX'.

       ELSE.

* Shortcut to SAP office inbox

         l_tcode = 'S001'.

       ENDIF.

       CALL FUNCTION 'SWN_CREATE_SHORTCUT'

         EXPORTING

           i_transaction           = l_tcode

           i_parameter             = l_sc_param

           i_sysid                 = sy-sysid

           i_user                  = space

           i_language              = l_spras

           i_windowsize            = 'Maximum window'(001)

           i_custom                = l_sc_custom

         IMPORTING

           shortcut_table          = lt_shortcut

         EXCEPTIONS

           inconsistent_parameters = 1

           OTHERS                  = 2.

This works fine when we are in a network where a router string is not required (in SAP Gui) to connect to the server.

I'm looking for ways to additionally pass a router string (hard-coding is ok) as an extra parameter or something, into this FM (or any other API). Or any other way to achieve this?

Please share your thoughts.

Thank you,

Arun

former_member215344
Contributor
0 Kudos

Hi Arun,

As far as I know, in order to acces the system through a shortcut you have to be in the same network as that of your server. Please read the below document:

http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a06be632-fd61-2b10-c0ac-992c8b154...

Thanks,

Ajay Bose

Former Member
0 Kudos

Hi Ajay,

Thank you for the response..

I read your link.. So is there no way to bypass this?

Regards,

Arun

former_member215344
Contributor
0 Kudos

Hi Arun,

I don't think there is a direct way to connect through router string in your case. You should either be in same network or should be connected to VPN.

I had faced similar problem while accessing webdynpro applications through router string.

As a last resort you can explore advanced options in SAPGUI scripting. Hope it helps.

Thanks,

Ajay Bose