<?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: class proxy-&amp;gt;save_document_to_url does not work in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/class-proxy-gt-save-document-to-url-does-not-work/qaa-p/13897734#M4888043</link>
    <description>What is the issue of downloading the PDF via CALL METHOD ... OF ... (OLE)?</description>
    <pubDate>Mon, 14 Oct 2024 07:49:52 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2024-10-14T07:49:52Z</dc:date>
    <item>
      <title>class proxy-&gt;save_document_to_url does not work</title>
      <link>https://community.sap.com/t5/technology-q-a/class-proxy-gt-save-document-to-url-does-not-work/qaq-p/13897569</link>
      <description>&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I only have 1 year of experience in ABAP.&amp;nbsp;&lt;/SPAN&gt;It's been 1 week I'm trying to figure out how to solved my problem, but still not found the right answer.&lt;BR /&gt;I created program to print Purchase Order document using BDS and not smartforms because I think it was more simple and everything runs smoothly.&amp;nbsp;Until my user asks for the document to be automatically made into an email attachment in .pdf format. Here's my logic :&lt;/P&gt;&lt;P&gt;1. User run the program (PO.JPG for output example).&lt;BR /&gt;2. Button to send email&amp;nbsp;&lt;BR /&gt;2.1. call method save_document_to_url -&amp;gt; save to ftp server with .pdf format (nothing error message but the file was not created)&lt;BR /&gt;2.2. call method send email with .pdf attachment&amp;nbsp;taken from the ftp server&lt;/P&gt;&lt;P&gt;My problem is point 2.1, I have no idea how to save the document with .pdf format. Can anyone help me solved my problem.&amp;nbsp;I would really appreciate any help.&lt;/P&gt;&lt;P&gt;here's my code :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="abap"&gt;FORM f_insert_contents .

  DATA: lt_forms       TYPE soi_form_list,
        error          TYPE REF TO i_oi_error,
        lv_tgl         TYPE c LENGTH 15.

  CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
    EXPORTING
      text = 'Loading data, please wait...'.

  CALL METHOD o_oi-&amp;gt;form_unprotect.
  CALL METHOD o_oi-&amp;gt;form_get_data
    CHANGING
      data = lt_forms[].

  IF NOT lt_forms[] IS INITIAL.

    LOOP AT lt_forms INTO DATA(wa_form).

      CASE wa_form-name.
        WHEN '[VENDOR]'.
          DATA(lv_name) = |{ t_header-name1  } { t_header-name2 }|.
          wa_form-value = lv_name.
        WHEN '[ALAMAT_VENDOR]'.
          wa_form-value = t_header-alamat.
        WHEN '[ALAMAT2]'.
          wa_form-value = t_header-str_suppl1.
        WHEN '[ALAMAT3]'.
          wa_form-value = t_header-str_suppl2.
        WHEN '[ALAMAT4]'.
          wa_form-value = t_header-mc_city1.
        WHEN '[ALAMAT5]'.
          wa_form-value = t_header-bezei.
        WHEN '[PO_NUMBER]'.
          wa_form-value = t_header-ebeln.
        WHEN '[REV]'.
          wa_form-value = t_header-revno.
        WHEN '[DATE]'.
          lv_tgl = |{ t_header-aedat+6(2) }.{ t_header-aedat+4(2) }.{ t_header-aedat(4) }|.
          wa_form-value = lv_tgl.
        WHEN '[PO_DESC]'.
          wa_form-value = t_header-podesc.
        WHEN '[ATTN]'.
          wa_form-value = t_header-verkf.
        WHEN '[FAX]'.
          wa_form-value = t_header-telfx.
        WHEN '[EMAIL]'.
          wa_form-value = t_header-smtp_addr.
        WHEN '[TOP]'.
          wa_form-value = lv_top.
        WHEN '[UOM]'.
          wa_form-value = t_header-waers.
        WHEN '[SUB_TOTAL]'.
          WRITE t_header-subtotal DECIMALS 2 TO lv_subtotal CURRENCY t_header-waers. "Rev 3
          wa_form-value = lv_subtotal.
        WHEN '[PPN]'.
*          IF lt_mwskz EQ 'V1'.
          IF lt_mwskz2[] IS NOT INITIAL.
            wa_form-value = |PPN|. "Rev 4
          ELSE.
            wa_form-value = ' '.
          ENDIF.
        WHEN '[TOTAL_PPN]'.
*          IF lt_mwskz EQ 'V1'.
          IF lt_mwskz2[] IS NOT INITIAL.
            t_header-total_ppn = t_header-total_ppn / 10.
            WRITE t_header-total_ppn DECIMALS 2 TO lv_ppn CURRENCY t_header-waers. "Rev 3
            wa_form-value = lv_ppn.
          ELSE.
            wa_form-value = ' '.
          ENDIF.
        WHEN '[TOTAL]'.
          t_header-total = ( t_header-total_ppn * 10 ) + t_header-subtotal.
          WRITE t_header-total DECIMALS 2 TO lv_total CURRENCY t_header-waers. "Rev 3
          wa_form-value = lv_total.
        WHEN '[KETERANGAN]'.
          wa_form-value = t_header-keterangan.
        WHEN '[REMARKS]'.
          wa_form-value = t_header-remarks.
      ENDCASE.

      MODIFY lt_forms FROM wa_form.
    ENDLOOP.

    CALL METHOD o_oi-&amp;gt;form_set_data
      EXPORTING
        data = lt_forms[].
**
**    CALL METHOD o_oi-&amp;gt;export_document
**      EXPORTING
**        file_name   = 'C:\Users\XXXXXXXXX\Downloads\PDFPO.pdf'
**        prompt_user = abap_true.

  ENDIF.

  CALL METHOD o_oi-&amp;gt;word_insert_table
    EXPORTING
      data_table      = t_result[]
      doctable_number = 1.

  DATA: numbytes TYPE i,
        url      TYPE bapiuri-uri.

*  user_info-user = 'sap.XXX'.
*  user_info-password = 'XXXXX'.
  user_info-proxy = '10.xx.xx.xx:21'.
  user_info-proxyuser = 'sap.XXX'.
  user_info-proxypassword = 'XXXXXX'.
*  user_info-scrambled = 'X'.

  url = 'ftp://10.xx.xx.xx/t.pdf'.

  CALL METHOD o_oi-&amp;gt;save_document_to_url
    EXPORTING
      url           = url
      user_info     = user_info
    CHANGING
      document_size = numbytes.

ENDFORM.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please correct me if I made a mistake.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Dio&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2024 01:03:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/class-proxy-gt-save-document-to-url-does-not-work/qaq-p/13897569</guid>
      <dc:creator>Dio</dc:creator>
      <dc:date>2024-10-15T01:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: class proxy-&gt;save_document_to_url does not work</title>
      <link>https://community.sap.com/t5/technology-q-a/class-proxy-gt-save-document-to-url-does-not-work/qaa-p/13897595#M4888036</link>
      <description>&lt;P&gt;Alas, it's not a question about SAP Websites...&lt;/P&gt;&lt;P&gt;Do you know that you can display the image instead of an hyperlink?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Sandra_Rossi_0-1728884108423.png" style="width: 400px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/178742i2CC72739B5C6B893/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Sandra_Rossi_0-1728884108423.png" alt="Sandra_Rossi_0-1728884108423.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2024 05:35:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/class-proxy-gt-save-document-to-url-does-not-work/qaa-p/13897595#M4888036</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2024-10-14T05:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: class proxy-&gt;save_document_to_url does not work</title>
      <link>https://community.sap.com/t5/technology-q-a/class-proxy-gt-save-document-to-url-does-not-work/qaa-p/13897596#M4888037</link>
      <description>&lt;P&gt;So, you're talking about I_OI_FORM (the Form Interface), but I don't recognize the methods&amp;nbsp;form_unprotect, form_get_data,&amp;nbsp;form_set_data,&amp;nbsp;export_document,&amp;nbsp;&lt;SPAN&gt;word_insert_table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What are these methods?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2024 05:38:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/class-proxy-gt-save-document-to-url-does-not-work/qaa-p/13897596#M4888037</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2024-10-14T05:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: class proxy-&gt;save_document_to_url does not work</title>
      <link>https://community.sap.com/t5/technology-q-a/class-proxy-gt-save-document-to-url-does-not-work/qaa-p/13897638#M4888038</link>
      <description>&lt;P&gt;Hi Sandra,&lt;/P&gt;&lt;P&gt;Sorry for the wrong question and thank you for your response, basically I using class I_OI_FORM you can check in SE24.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cl_office_integration.JPG" style="width: 450px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/178752i994278421A4CD33C/image-size/large?v=v2&amp;amp;px=999" role="button" title="cl_office_integration.JPG" alt="cl_office_integration.JPG" /&gt;&lt;/span&gt;&lt;BR /&gt;inside the cl_office_integration is :&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 480px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/178756iB720678074365504/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;1. form_protect means you can't edit the document when it show up and&amp;nbsp;&lt;BR /&gt;2. form_unprotect is the opposite.&lt;BR /&gt;3. form_get_data means get data from the application.&lt;BR /&gt;4. form_set_data means you put the data to the template that you upload in OAOR.&lt;BR /&gt;5. word_insert_table means put the data into table in template (word document).&lt;BR /&gt;6. export_document =&amp;nbsp;I_OI_DOCUMENT_PROXY-&amp;gt;save_as (&amp;nbsp;you do it manually because a pop up appears and you have to determine the name and save it in what folder, my need is to save it automatically in .pdf format without the pop up appearing )&lt;BR /&gt;&lt;BR /&gt;For me, it's quite simple than smartforms.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2024 06:35:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/class-proxy-gt-save-document-to-url-does-not-work/qaa-p/13897638#M4888038</guid>
      <dc:creator>Dio</dc:creator>
      <dc:date>2024-10-14T06:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: class proxy-&gt;save_document_to_url does not work</title>
      <link>https://community.sap.com/t5/technology-q-a/class-proxy-gt-save-document-to-url-does-not-work/qaa-p/13897661#M4888039</link>
      <description>&lt;P&gt;Word permits the export to PDF by either file &amp;gt; print &amp;gt; PDF printer (but make sure that all users have a PDF printer) or via file &amp;gt; export &amp;gt; create PDF/XPS document (all users should have Word 365).&lt;/P&gt;&lt;P&gt;You may run these commands via direct OLE commands (&lt;A href="https://community.sap.com/t5/application-development-discussions/how-to-use-doi-retain-excel-formula/m-p/12044504#M1968164" target="_blank"&gt;https://community.sap.com/t5/application-development-discussions/how-to-use-doi-retain-excel-formula/m-p/12044504#M1968164&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;No doubt that Word is more easy to develop than Smart Forms, but for the users it comes with many very big flaws (slow, doesn't work at all for users with the wrong Word configuration, nor in background).&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2024 06:56:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/class-proxy-gt-save-document-to-url-does-not-work/qaa-p/13897661#M4888039</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2024-10-14T06:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: class proxy-&gt;save_document_to_url does not work</title>
      <link>https://community.sap.com/t5/technology-q-a/class-proxy-gt-save-document-to-url-does-not-work/qaa-p/13897662#M4888040</link>
      <description>Thank you. Be careful to not use Answer if it's not a solution. Instead, use Replies &amp;gt; Comment.</description>
      <pubDate>Mon, 14 Oct 2024 06:56:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/class-proxy-gt-save-document-to-url-does-not-work/qaa-p/13897662#M4888040</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2024-10-14T06:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: class proxy-&gt;save_document_to_url does not work</title>
      <link>https://community.sap.com/t5/technology-q-a/class-proxy-gt-save-document-to-url-does-not-work/qaa-p/13897685#M4888041</link>
      <description>yes but is it all done manually? Is there no way to save the output in .pdf format to a local or FTP server automatically? like using GUI_DOWNLOAD or FTP_R3_TO_SERVER ?</description>
      <pubDate>Mon, 14 Oct 2024 07:24:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/class-proxy-gt-save-document-to-url-does-not-work/qaa-p/13897685#M4888041</guid>
      <dc:creator>Dio</dc:creator>
      <dc:date>2024-10-14T07:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: class proxy-&gt;save_document_to_url does not work</title>
      <link>https://community.sap.com/t5/technology-q-a/class-proxy-gt-save-document-to-url-does-not-work/qaa-p/13897734#M4888043</link>
      <description>What is the issue of downloading the PDF via CALL METHOD ... OF ... (OLE)?</description>
      <pubDate>Mon, 14 Oct 2024 07:49:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/class-proxy-gt-save-document-to-url-does-not-work/qaa-p/13897734#M4888043</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2024-10-14T07:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: class proxy-&gt;save_document_to_url does not work</title>
      <link>https://community.sap.com/t5/technology-q-a/class-proxy-gt-save-document-to-url-does-not-work/qaa-p/13897737#M4888044</link>
      <description>Note that you may also run these commands via VBS stored via I_OI_SCRIPT_COLLECTION (not much different from direct OLE).</description>
      <pubDate>Mon, 14 Oct 2024 07:51:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/class-proxy-gt-save-document-to-url-does-not-work/qaa-p/13897737#M4888044</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2024-10-14T07:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: class proxy-&gt;save_document_to_url does not work</title>
      <link>https://community.sap.com/t5/technology-q-a/class-proxy-gt-save-document-to-url-does-not-work/qaa-p/13897802#M4888048</link>
      <description>I'm using method o_oi-&amp;gt;save_document_to_url as you can see in my program. It's not error but the file not created in my FTP Server</description>
      <pubDate>Mon, 14 Oct 2024 08:42:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/class-proxy-gt-save-document-to-url-does-not-work/qaa-p/13897802#M4888048</guid>
      <dc:creator>Dio</dc:creator>
      <dc:date>2024-10-14T08:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: class proxy-&gt;save_document_to_url does not work</title>
      <link>https://community.sap.com/t5/technology-q-a/class-proxy-gt-save-document-to-url-does-not-work/qaa-p/13897876#M4888056</link>
      <description>Create the file in the SAP GUI temporary folder of the user (CL_GUI_FRONTEND_SERVICES=&amp;gt;GET_TEMP_DIRECTORY) and then upload it.</description>
      <pubDate>Mon, 14 Oct 2024 09:25:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/class-proxy-gt-save-document-to-url-does-not-work/qaa-p/13897876#M4888056</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2024-10-14T09:25:54Z</dc:date>
    </item>
  </channel>
</rss>

