<?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>topic Re: Web service in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/web-service/m-p/6874656#M1477694</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
 CALL FUNCTION 'CONVERT_OTF_2_PDF'
      IMPORTING
        bin_filesize           = w_bin_filesize
      TABLES
        otf                    = t_otfdata-otfdata
        doctab_archive         = it_docs
        lines                  = it_lines
      EXCEPTIONS
        err_conv_not_possible  = 1
        err_otf_mc_noendmarker = 2
        OTHERS                 = 3.

      OPEN DATASET 'C:\TEST.PDF' FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

*     here wf_filename has to be a unique path in app server.

      LOOP AT it_lines into wa_line.
        TRANSFER wa_line-tdformat TO 'C:\TEST.PDF'.
        TRANSFER wa_line-tdline TO 'C:\TEST.PDF'.
      ENDLOOP.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so after this i have to call command open dataset ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 May 2010 12:54:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-05-06T12:54:26Z</dc:date>
    <item>
      <title>Web service</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/web-service/m-p/6874652#M1477690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;I have created a web service in abap based on a FM that creates a smartform and saves the form in pdf format on my pc.&lt;/P&gt;&lt;P&gt;If i execute the FM everything goes fine and the pdf is created and saved but when i call the WS through soapUI i the file is not created but everything is executed fine.&lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;P&gt;Jon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 10:13:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/web-service/m-p/6874652#M1477690</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-06T10:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: Web service</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/web-service/m-p/6874653#M1477691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm guessing you are using cl_gui_frontend_services or GUI_DOWNLOAD to download the file? This will work in when running the FM in SAP GUI but the web service will call the FM via RFC and this will fail&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 10:20:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/web-service/m-p/6874653#M1477691</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-06T10:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: Web service</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/web-service/m-p/6874654#M1477692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes you are right, i'm using gui_download.&lt;/P&gt;&lt;P&gt;Do you you how can i download a file into the application server?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 10:22:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/web-service/m-p/6874654#M1477692</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-06T10:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: Web service</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/web-service/m-p/6874655#M1477693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jon,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the OPEN DATASET command to write the file to the application server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check out this page for code samples: [https://wiki.sdn.sap.com/wiki/display/ABAP/Working&lt;EM&gt;with&lt;/EM&gt;files|https://wiki.sdn.sap.com/wiki/display/ABAP/Working&lt;EM&gt;with&lt;/EM&gt;files]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 11:48:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/web-service/m-p/6874655#M1477693</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-06T11:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: Web service</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/web-service/m-p/6874656#M1477694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
 CALL FUNCTION 'CONVERT_OTF_2_PDF'
      IMPORTING
        bin_filesize           = w_bin_filesize
      TABLES
        otf                    = t_otfdata-otfdata
        doctab_archive         = it_docs
        lines                  = it_lines
      EXCEPTIONS
        err_conv_not_possible  = 1
        err_otf_mc_noendmarker = 2
        OTHERS                 = 3.

      OPEN DATASET 'C:\TEST.PDF' FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

*     here wf_filename has to be a unique path in app server.

      LOOP AT it_lines into wa_line.
        TRANSFER wa_line-tdformat TO 'C:\TEST.PDF'.
        TRANSFER wa_line-tdline TO 'C:\TEST.PDF'.
      ENDLOOP.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so after this i have to call command open dataset ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 12:54:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/web-service/m-p/6874656#M1477694</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-06T12:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: Web service</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/web-service/m-p/6874657#M1477695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jon, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As this is a PDF I would use binary mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'CONVERT_OTF_2_PDF'
      IMPORTING
        bin_filesize           = w_bin_filesize
      TABLES
        otf                    = t_otfdata-otfdata
        doctab_archive         = it_docs
        lines                  = it_lines
      EXCEPTIONS
        err_conv_not_possible  = 1
        err_otf_mc_noendmarker = 2
        OTHERS                 = 3.
 
      OPEN DATASET 'FILE' FOR OUTPUT IN BINARY MODE.
 
      LOOP AT it_lines into wa_line.
        TRANSFER wa_line-tdline TO 'C:\TEST.PDF'.
      ENDLOOP.
      
      CLOSE DATASET 'FILE'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 13:27:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/web-service/m-p/6874657#M1477695</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-06T13:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: Web service</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/web-service/m-p/6874658#M1477696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gregor,&lt;/P&gt;&lt;P&gt;I have debugged it and it trhows an exception on transfer.&lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 13:33:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/web-service/m-p/6874658#M1477696</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-06T13:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: Web service</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/web-service/m-p/6874659#M1477697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can catch the exception to determine what's being thrown, but it's highly unlikely that you have access to the directory root of the application server file system.  Check AL11 for a suitable location.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 13:49:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/web-service/m-p/6874659#M1477697</guid>
      <dc:creator>brad_bohn</dc:creator>
      <dc:date>2010-05-06T13:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: Web service</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/web-service/m-p/6874660#M1477698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ya, this sounds like a permissions issue. BASIS might be able to create a directory specifically for your process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A trick I have used is to create a share on your PC with full permissions and then create the file on &lt;BR /&gt;IP_ADDRESS\MYSHARE where IP_ADDRESS is your IP and MYSHARE is the name of the share you created. You'll need to have windows file sharing enabled but can save time if you don't have file access on the app server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gregor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 May 2010 14:52:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/web-service/m-p/6874660#M1477698</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-06T14:52:17Z</dc:date>
    </item>
  </channel>
</rss>

