<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: CLM - Open Webpage via script in Spend Management Q&amp;A</title>
    <link>https://community.sap.com/t5/spend-management-q-a/clm-open-webpage-via-script/qaa-p/10991569#M165909</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;SPAN style="color: #333333; font-size: 12px;"&gt;Özlem,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem is that the requirement itself is not valid from the perspective of Java architecture. The Desktop class is designed to be a link between native and java apps on a host system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your code will work in eclipse because both host and client are the same machine; and will not work in a java web app running on a central server. The actual code will **&lt;EM&gt;try**&lt;/EM&gt; to open a browser on the SAP Sourcing server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Given the fact that all of the SAP Sourcing scripts are executed server-side, I believe that there is no possibility of opening a new browser or tab on the client from a script context.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One alternative solution would be to create an URL extension field and generate/save the link there, instructing the users to click on the link after generation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bogdan Toma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 May 2015 16:59:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2015-05-04T16:59:06Z</dc:date>
    <item>
      <title>CLM - Open Webpage via script</title>
      <link>https://community.sap.com/t5/spend-management-q-a/clm-open-webpage-via-script/qaq-p/10991568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for a customer request we have to write a toolbar script which opens a specific web page.&lt;/P&gt;&lt;P&gt;Usual java libraries seem not to work in SAP Sourcing.&lt;/P&gt;&lt;P&gt;This is the script which works fine in eclipse &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #060200; font-family: Arial, Helvetica, sans-serif; font-size: 11px; background-color: #eaf1f6;"&gt;URI uriToken;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #060200; font-family: Arial, Helvetica, sans-serif; font-size: 11px; background-color: #eaf1f6;"&gt;try {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #060200; font-family: Arial, Helvetica, sans-serif; font-size: 11px; background-color: #eaf1f6;"&gt;uriToken = new URI(urlToken);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #060200; font-family: Arial, Helvetica, sans-serif; font-size: 11px; background-color: #eaf1f6;"&gt;Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #060200; font-family: Arial, Helvetica, sans-serif; font-size: 11px; background-color: #eaf1f6;"&gt;if (desktop != null &amp;amp;&amp;amp; desktop.isSupported(Desktop.Action.BROWSE)) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #060200; font-family: Arial, Helvetica, sans-serif; font-size: 11px; background-color: #eaf1f6;"&gt;desktop.browse(uriToken);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #060200; font-family: Arial, Helvetica, sans-serif; font-size: 11px; background-color: #eaf1f6;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #060200; font-family: Arial, Helvetica, sans-serif; font-size: 11px; background-color: #eaf1f6;"&gt;} catch (Exception e1) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #060200; font-family: Arial, Helvetica, sans-serif; font-size: 11px; background-color: #eaf1f6;"&gt;throw doc.createApplicationException("", e.toString());&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #060200; font-family: Arial, Helvetica, sans-serif; font-size: 11px; background-color: #eaf1f6;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the page is not opened when calling the script in sourcing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have experiences with this topic?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance and regards,&lt;/P&gt;&lt;P&gt;Özlem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2015 16:31:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/spend-management-q-a/clm-open-webpage-via-script/qaq-p/10991568</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-05-04T16:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: CLM - Open Webpage via script</title>
      <link>https://community.sap.com/t5/spend-management-q-a/clm-open-webpage-via-script/qaa-p/10991569#M165909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;SPAN style="color: #333333; font-size: 12px;"&gt;Özlem,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem is that the requirement itself is not valid from the perspective of Java architecture. The Desktop class is designed to be a link between native and java apps on a host system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your code will work in eclipse because both host and client are the same machine; and will not work in a java web app running on a central server. The actual code will **&lt;EM&gt;try**&lt;/EM&gt; to open a browser on the SAP Sourcing server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Given the fact that all of the SAP Sourcing scripts are executed server-side, I believe that there is no possibility of opening a new browser or tab on the client from a script context.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One alternative solution would be to create an URL extension field and generate/save the link there, instructing the users to click on the link after generation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bogdan Toma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2015 16:59:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/spend-management-q-a/clm-open-webpage-via-script/qaa-p/10991569#M165909</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-05-04T16:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: CLM - Open Webpage via script</title>
      <link>https://community.sap.com/t5/spend-management-q-a/clm-open-webpage-via-script/qaa-p/10991570#M165910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Bogdan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your reply.&lt;/P&gt;&lt;P&gt;Ok I got it. It sounds really like there is no solution. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks also for the alternative solution. If there is no other possibility we are going to do it that way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Özlem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2015 23:57:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/spend-management-q-a/clm-open-webpage-via-script/qaa-p/10991570#M165910</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-05-04T23:57:54Z</dc:date>
    </item>
  </channel>
</rss>

