<?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: PDF file getting corrupted while creating document in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-getting-corrupted-while-creating-document/m-p/7827764#M1589662</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am uploading file to application server without converting it into PDF , then using bapi BAPI_DOCUMENT_CREATE2 to create document into DMS , and its working fine in development and qaulity system , but not in production&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Apr 2011 05:38:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-04-25T05:38:22Z</dc:date>
    <item>
      <title>PDF file getting corrupted while creating document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-getting-corrupted-while-creating-document/m-p/7827760#M1589658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear experts , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                           we are creating DMS document using  BAPI_DOCUMENT_CREATE2 , its all working fine in DEV and Quality system but in production system in case of PDF file bapi is returning success message , but user is not able to display or see the document , getting an error saying 'There was an error opening this document. The file is damagedand could not be repaired'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; my fuction module getting call from java webdynpro application , I have doubt on the OPEN DATASET statments &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I am using below code to transfer data to application server ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF iv_file_path IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    SPLIT iv_file_path AT '.' INTO lv_filename lv_ext.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'CV120_DOC_GET_APPL'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        pf_file   = iv_file_path&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        pfx_dappl = lv_file_type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    TRANSLATE lv_file_type TO UPPER CASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    OPEN DATASET log FOR OUTPUT IN BINARY MODE &lt;/P&gt;&lt;P&gt;    TRANSFER lv_ext TO log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ls_documentfiles-wsapplication = lv_file_type.&lt;/P&gt;&lt;P&gt;    TRANSLATE ls_documentfiles-wsapplication TO UPPER CASE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CONCATENATE&lt;/P&gt;&lt;P&gt;                       lv_filename&lt;/P&gt;&lt;P&gt;                        '.'&lt;/P&gt;&lt;P&gt;                        lv_ext&lt;/P&gt;&lt;P&gt;                        INTO lv_file_name.&lt;/P&gt;&lt;P&gt;    CONDENSE lv_file_name  NO-GAPS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    TRANSFER lv_file_name TO log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    OPEN DATASET lv_file_name FOR OUTPUT IN BINARY MODE MESSAGE lv_msg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**Transfer Attachment Content to Application Server&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    TRANSFER iv_file_data TO lv_file_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CLOSE DATASET lv_file_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Apr 2011 07:23:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-getting-corrupted-while-creating-document/m-p/7827760#M1589658</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-19T07:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: PDF file getting corrupted while creating document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-getting-corrupted-while-creating-document/m-p/7827761#M1589659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After convert PDF file  you have to use following FM the u send file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: pdf TYPE REF TO cl_hrasr00_pdf_generation.
  DATA : lt_data            TYPE solix_tab.

  OPEN DATASET filename FOR INPUT IN BINARY MODE.
  IF sy-subrc EQ 0.
    READ DATASET filename INTO filex.

  ENDIF.

  IF filex IS NOT INITIAL.
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
      EXPORTING
        buffer        = filex
      IMPORTING
        output_length = file_length
      TABLES
        binary_tab    = gt_objbin.
  ENDIF.
  CLOSE DATASET filename.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2011 08:20:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-getting-corrupted-while-creating-document/m-p/7827761#M1589659</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-21T08:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: PDF file getting corrupted while creating document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-getting-corrupted-while-creating-document/m-p/7827762#M1589660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kripaji , thnaks for reply , &lt;/P&gt;&lt;P&gt;why you are usin 'SCMS_XSTRING_TO_BINARY function module in your code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my case I am creating document using all type of file and not the only PDF , and getting document corruption error in standard transaction CV04n&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2011 10:11:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-getting-corrupted-while-creating-document/m-p/7827762#M1589660</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-21T10:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: PDF file getting corrupted while creating document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-getting-corrupted-while-creating-document/m-p/7827763#M1589661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tell Which FM you use to convert into PDF?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2011 11:19:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-getting-corrupted-while-creating-document/m-p/7827763#M1589661</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-21T11:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: PDF file getting corrupted while creating document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-getting-corrupted-while-creating-document/m-p/7827764#M1589662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am uploading file to application server without converting it into PDF , then using bapi BAPI_DOCUMENT_CREATE2 to create document into DMS , and its working fine in development and qaulity system , but not in production&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Apr 2011 05:38:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-getting-corrupted-while-creating-document/m-p/7827764#M1589662</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-25T05:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: PDF file getting corrupted while creating document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-getting-corrupted-while-creating-document/m-p/7827765#M1589663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi  All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any body has any that whene we write OPEN DATASET lv_file_name FOR OUTPUT IN BINARY MODE MESSAGE lv_msg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then in case of PDF file do we need to write somthing extra in open dataset command like ENCODING , CODE PAGE  etc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2011 07:40:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/pdf-file-getting-corrupted-while-creating-document/m-p/7827765#M1589663</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-04-28T07:40:44Z</dc:date>
    </item>
  </channel>
</rss>

