<?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: BAPI_DOCUMENT_CREATE2 do not checkin original in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-document-create2-do-not-checkin-original/m-p/1348857#M175305</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 am not sure what is the problem you are facing. You need to pass the details of the file to the parameter DOCUMENTFILES STRUCTURE  BAPI_DOC_FILES2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remember this is TABLES parameter, so you need to declare a internal table of type BAPI_DOC_FILES2, and pass that to the function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you explain the problem, if it something else?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note - Please mark the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Apr 2006 17:05:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-04-28T17:05:02Z</dc:date>
    <item>
      <title>BAPI_DOCUMENT_CREATE2 do not checkin original</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-document-create2-do-not-checkin-original/m-p/1348856#M175304</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 use the BAPI_DOCUMENT_CREATE2 within a FM for creating "DocumentInfoRecords" including original-document.&lt;/P&gt;&lt;P&gt;creating the "DocumentInfoRecords" works fine, but i have a problem with the DOCUMENTFILES for linking the origin document. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got the hint to do it via UNIX-file, but it doesnot work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please have a look at this and give me any idea.&lt;/P&gt;&lt;P&gt;thx in advance, Silvio ; -)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;==========&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;create UNIX-File and tranfer Original into UNIX&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      OPEN DATASET file_name FOR OUTPUT&lt;/P&gt;&lt;P&gt;                             IN BINARY MODE&lt;/P&gt;&lt;P&gt;                             MESSAGE msg.&lt;/P&gt;&lt;P&gt;      IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;        MESSAGE a899(zz) WITH file_name.....&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;      TRANSFER doc_content TO file_name.&lt;/P&gt;&lt;P&gt;      CLOSE DATASET file_name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  move: art         to lt_files-documenttype,&lt;/P&gt;&lt;P&gt;        number      to lt_files-documentnumber,&lt;/P&gt;&lt;P&gt;        '000'       to lt_files-documentpart,&lt;/P&gt;&lt;P&gt;        '00'        to lt_files-documentversion,&lt;/P&gt;&lt;P&gt;        '1'         to lt_files-originaltype,&lt;/P&gt;&lt;P&gt;        'DMS_C1_ST' to lt_files-storagecategory,&lt;/P&gt;&lt;P&gt;          file_name to lt_files-docfile,&lt;/P&gt;&lt;P&gt;        ' '         to lt_files-checkedin.&lt;/P&gt;&lt;P&gt;  translate lt_files-wsapplication to upper case.&lt;/P&gt;&lt;P&gt;  append lt_files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  move: art         to documentdata-documenttype,&lt;/P&gt;&lt;P&gt;        number      to documentdata-documentnumber,&lt;/P&gt;&lt;P&gt;        '000'       to documentdata-documentpart,&lt;/P&gt;&lt;P&gt;        '00'        to documentdata-documentversion,&lt;/P&gt;&lt;P&gt;        STATE       TO documentdata-STATUSINTERN,&lt;/P&gt;&lt;P&gt;        TITLE_SHORT TO documentdata-DESCRIPTION.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;      CLEAR ls_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call BAPI for Create&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'&lt;/P&gt;&lt;P&gt;           EXPORTING&lt;/P&gt;&lt;P&gt;                documentdata    = documentdata&lt;/P&gt;&lt;P&gt;                pf_http_dest    = 'SAPHTTPA'&lt;/P&gt;&lt;P&gt;           IMPORTING&lt;/P&gt;&lt;P&gt;                documentnumber  = lt_files-documentnumber&lt;/P&gt;&lt;P&gt;                documenttype    = lt_files-documenttype&lt;/P&gt;&lt;P&gt;                documentversion = lt_files-documentversion&lt;/P&gt;&lt;P&gt;                documentpart    = lt_files-documentpart&lt;/P&gt;&lt;P&gt;                return          = return&lt;/P&gt;&lt;P&gt;           TABLES&lt;/P&gt;&lt;P&gt;                documentfiles   = lt_files&lt;/P&gt;&lt;P&gt;           EXCEPTIONS&lt;/P&gt;&lt;P&gt;                OTHERS          = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;commit work.&lt;/P&gt;&lt;P&gt;========&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Apr 2006 16:42:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-document-create2-do-not-checkin-original/m-p/1348856#M175304</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-28T16:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_DOCUMENT_CREATE2 do not checkin original</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-document-create2-do-not-checkin-original/m-p/1348857#M175305</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 am not sure what is the problem you are facing. You need to pass the details of the file to the parameter DOCUMENTFILES STRUCTURE  BAPI_DOC_FILES2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remember this is TABLES parameter, so you need to declare a internal table of type BAPI_DOC_FILES2, and pass that to the function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you explain the problem, if it something else?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note - Please mark the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Apr 2006 17:05:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-document-create2-do-not-checkin-original/m-p/1348857#M175305</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-28T17:05:02Z</dc:date>
    </item>
  </channel>
</rss>

