<?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: Error in BAPI_DOCUMENT_CREATE2 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-document-create2/m-p/2629516#M604435</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  I solved it by myself.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;  The problem may be because of the following reason.&lt;/P&gt;&lt;P&gt;    1.) File name is not present in the folder.&lt;/P&gt;&lt;P&gt;    2.) File donot have necessary authorization.&lt;/P&gt;&lt;P&gt;    3.) WSapplication field may be wrong or empty.&lt;/P&gt;&lt;P&gt;    4.) Storage category is missing&lt;/P&gt;&lt;P&gt;    5.) KPro server connection problem.&lt;/P&gt;&lt;P&gt;    6.) HTTP or FTP destination missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my case,I miss the 6th point. After adding the HTTP export parameter as shown below,my Bapi creates the document with the attachment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          documentdata      = wa_docdata&lt;/P&gt;&lt;P&gt;          pf_http_dest         = 'SAPHTTPA'&lt;/P&gt;&lt;P&gt;          pf_ftp_dest           = 'SAPFTPA'&lt;/P&gt;&lt;P&gt;       ...........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Senthil Kumar Anantham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Jul 2008 09:22:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-09T09:22:21Z</dc:date>
    <item>
      <title>Error in BAPI_DOCUMENT_CREATE2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-document-create2/m-p/2629514#M604433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My objective is to transfer a file from Application layer to DMS. So i used the function module called 'BAPI_DOCUMENT_CREATE2'. But i get the error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Error while checking and storing : /sapia/iface/in/comm/sapmas/WFDOC.PDF"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2007 09:26:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-document-create2/m-p/2629514#M604433</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-31T09:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: Error in BAPI_DOCUMENT_CREATE2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-document-create2/m-p/2629515#M604434</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;were you able to solve this problem ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Apr 2008 03:34:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-document-create2/m-p/2629515#M604434</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-19T03:34:50Z</dc:date>
    </item>
    <item>
      <title>Re: Error in BAPI_DOCUMENT_CREATE2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-document-create2/m-p/2629516#M604435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;  I solved it by myself.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;  The problem may be because of the following reason.&lt;/P&gt;&lt;P&gt;    1.) File name is not present in the folder.&lt;/P&gt;&lt;P&gt;    2.) File donot have necessary authorization.&lt;/P&gt;&lt;P&gt;    3.) WSapplication field may be wrong or empty.&lt;/P&gt;&lt;P&gt;    4.) Storage category is missing&lt;/P&gt;&lt;P&gt;    5.) KPro server connection problem.&lt;/P&gt;&lt;P&gt;    6.) HTTP or FTP destination missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my case,I miss the 6th point. After adding the HTTP export parameter as shown below,my Bapi creates the document with the attachment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          documentdata      = wa_docdata&lt;/P&gt;&lt;P&gt;          pf_http_dest         = 'SAPHTTPA'&lt;/P&gt;&lt;P&gt;          pf_ftp_dest           = 'SAPFTPA'&lt;/P&gt;&lt;P&gt;       ...........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards&lt;/P&gt;&lt;P&gt;Senthil Kumar Anantham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jul 2008 09:22:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-document-create2/m-p/2629516#M604435</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-09T09:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Error in BAPI_DOCUMENT_CREATE2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-document-create2/m-p/2629517#M604436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am getting an error &lt;STRONG&gt;&lt;U&gt;"An error occured while creating the original attribute for PDF"&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried with out file attachment, it works as you know it is simple....&lt;/P&gt;&lt;P&gt;I tried with various types of attachments like .TXT and .WRD (changed both wsapplication and docfile parameters), however i get the same error. I tried both from presentation and application server (by providing   pf_ftp_dest                = 'SAPFTPA'    pf_http_dest               = 'SAPHTTPA' )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea on how to solve this?&lt;/P&gt;&lt;P&gt;All i need is create a DMS document with a PDF attachment from application server. Are there any other ways to solve this issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ws_docdata-documenttype = 'ARE'.&lt;/P&gt;&lt;P&gt;ws_docdata-description = 'BAPI DMS'.&lt;/P&gt;&lt;P&gt;ws_docdata-statusextern = 'CR'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ws_file-storagecategory = 'DMS_C1_ST'.&lt;/P&gt;&lt;P&gt;ws_file-wsapplication   = 'PDF'.&lt;/P&gt;&lt;P&gt;ws_file-description = 'Job output'.&lt;/P&gt;&lt;P&gt;ws_file-docfile = 'C:\CAD Integ BAPIS_46.pdf'.&lt;/P&gt;&lt;P&gt;append ws_file to it_files.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;     documentdata               = ws_docdata&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;     return                     = v_ret&lt;/P&gt;&lt;P&gt; TABLES&lt;/P&gt;&lt;P&gt;     documentfiles              = it_files   .&lt;/P&gt;&lt;P&gt;BREAK-POINT.&lt;/P&gt;&lt;P&gt;IF v_ret-type CA 'EA'.&lt;/P&gt;&lt;P&gt;  ROLLBACK WORK.&lt;/P&gt;&lt;P&gt;  WRITE : v_Ret-message.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      wait = '5'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2009 14:39:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-document-create2/m-p/2629517#M604436</guid>
      <dc:creator>pavan_rachamalla</dc:creator>
      <dc:date>2009-12-08T14:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Error in BAPI_DOCUMENT_CREATE2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-document-create2/m-p/2629518#M604437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am getting an error &lt;STRONG&gt;&lt;U&gt;"An error occured while creating the original attribute for PDF"&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried with out file attachment, it works as you know it is simple....&lt;/P&gt;&lt;P&gt;I tried with various types of attachments like .TXT and .WRD (changed both wsapplication and docfile parameters), however i get the same error. I tried both from presentation and application server (by providing   pf_ftp_dest                = 'SAPFTPA'    pf_http_dest               = 'SAPHTTPA' )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea on how to solve this?&lt;/P&gt;&lt;P&gt;All i need is create a DMS document with a PDF attachment from application server. Are there any other ways to solve this issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ws_docdata-documenttype = 'ARE'.&lt;/P&gt;&lt;P&gt;ws_docdata-description = 'BAPI DMS'.&lt;/P&gt;&lt;P&gt;ws_docdata-statusextern = 'CR'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ws_file-storagecategory = 'DMS_C1_ST'.&lt;/P&gt;&lt;P&gt;ws_file-wsapplication   = 'PDF'.&lt;/P&gt;&lt;P&gt;ws_file-description = 'Job output'.&lt;/P&gt;&lt;P&gt;ws_file-docfile = 'C:\CAD Integ BAPIS_46.pdf'.&lt;/P&gt;&lt;P&gt;append ws_file to it_files.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;     documentdata               = ws_docdata&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;     return                     = v_ret&lt;/P&gt;&lt;P&gt; TABLES&lt;/P&gt;&lt;P&gt;     documentfiles              = it_files   .&lt;/P&gt;&lt;P&gt;BREAK-POINT.&lt;/P&gt;&lt;P&gt;IF v_ret-type CA 'EA'.&lt;/P&gt;&lt;P&gt;  ROLLBACK WORK.&lt;/P&gt;&lt;P&gt;  WRITE : v_Ret-message.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      wait = '5'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2009 14:39:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-document-create2/m-p/2629518#M604437</guid>
      <dc:creator>pavan_rachamalla</dc:creator>
      <dc:date>2009-12-08T14:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: Error in BAPI_DOCUMENT_CREATE2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-document-create2/m-p/2629519#M604438</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 trying to achieve the same as the original poster but I'm having trouble with it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the error "Original has already been checked in and stored".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you kindly post your code, please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Bruno&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Nov 2013 15:53:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-document-create2/m-p/2629519#M604438</guid>
      <dc:creator>bruno_esperanca</dc:creator>
      <dc:date>2013-11-22T15:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Error in BAPI_DOCUMENT_CREATE2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-document-create2/m-p/2629520#M604439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2015 06:50:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-in-bapi-document-create2/m-p/2629520#M604439</guid>
      <dc:creator>former_member714918</dc:creator>
      <dc:date>2015-07-16T06:50:05Z</dc:date>
    </item>
  </channel>
</rss>

