<?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: Problems while retrieving from content repository in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-while-retrieving-from-content-repository/m-p/8578595#M1660587</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 checked the code one again - SCMS_URL_GENERATE is used to send url to the user (to open file in web browser).&lt;/P&gt;&lt;P&gt;SCMS_HTTP_GET code looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

CONCATENATE &amp;lt;ls&amp;gt;-vbeln space &amp;lt;ls&amp;gt;-optarcnr 
  INTO lv_vbeln_obj 
  RESPECTING BLANKS.

SELECT SINGLE * 
  FROM toa01
  WHERE sap_object EQ 'VBRK'
    AND archiv_id EQ co_arch
    AND ar_object EQ 'SDOINVOICE'
    AND object_id EQ lv_vbeln_obj.

CALL FUNCTION 'SCMS_HTTP_GET'
  EXPORTING
    crep_id   = co_arch
    doc_id    = toa01-arc_doc_id
    comp_id   = 'data'
    length    = 0
    no_cache  = no_cache
  IMPORTING
    length    = comp-size
    mimetype  = comp-type
  TABLES
    data      = comp-bin
  EXCEPTIONS
    not_found = 1
    OTHERS    = 2.
  IF sy-subrc IS NOT INITIAL.
    PERFORM log_create USING &amp;lt;ls&amp;gt;-vbeln.
  ENDIF.
  
IF comp-bin IS NOT INITIAL.
  CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
      bin_filesize = comp-size
      filename     = dstpc
      filetype     = 'BIN'
    TABLES
      data_tab     = comp-bin
    EXCEPTIONS
      OTHERS       = 1.
  IF sy-subrc IS NOT INITIAL.
    PERFORM log_create USING &amp;lt;ls&amp;gt;-vbeln.
  ELSE.
    MESSAGE s000(38) WITH 'Success'.
  ENDIF.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;Przemysław&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Feb 2012 12:39:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-02-07T12:39:14Z</dc:date>
    <item>
      <title>Problems while retrieving from content repository</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-while-retrieving-from-content-repository/m-p/8578592#M1660584</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 facing problems while retrieving documents stored the content repository. I have some pdf files as well as text documents stored in the content repository. I need to get retrieve the contents of the text files. My problem lies with how to retrieve the data from the files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used SCMS_URL_GENERATE, followed by the FM ''HTTP_GET''.  Though I  do get the File id , my problem is how to proceed from this point. Should i wriite an RFC ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Anie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2012 11:54:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-while-retrieving-from-content-repository/m-p/8578592#M1660584</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-06T11:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problems while retrieving from content repository</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-while-retrieving-from-content-repository/m-p/8578593#M1660585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use SCMS_URL_GENERATE and then SCMS_HTTP_GET.&lt;/P&gt;&lt;P&gt;Result is in &lt;STRONG&gt;data&lt;/STRONG&gt; parameter (TABLES section).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;Przemysław&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2012 17:57:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-while-retrieving-from-content-repository/m-p/8578593#M1660585</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-06T17:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problems while retrieving from content repository</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-while-retrieving-from-content-repository/m-p/8578594#M1660586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Przemysław ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. However, i still face some issues regarding data retrieval. I have used 'SCMS_HTTP_GET', but sy-subrc value is 3, despite the fact that the file is present in the content repository. Any reason why? Could you give me the snippet of the code you used?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Anie&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: anierenie on Feb 7, 2012 5:23 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2012 04:16:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-while-retrieving-from-content-repository/m-p/8578594#M1660586</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-07T04:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problems while retrieving from content repository</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-while-retrieving-from-content-repository/m-p/8578595#M1660587</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 checked the code one again - SCMS_URL_GENERATE is used to send url to the user (to open file in web browser).&lt;/P&gt;&lt;P&gt;SCMS_HTTP_GET code looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

CONCATENATE &amp;lt;ls&amp;gt;-vbeln space &amp;lt;ls&amp;gt;-optarcnr 
  INTO lv_vbeln_obj 
  RESPECTING BLANKS.

SELECT SINGLE * 
  FROM toa01
  WHERE sap_object EQ 'VBRK'
    AND archiv_id EQ co_arch
    AND ar_object EQ 'SDOINVOICE'
    AND object_id EQ lv_vbeln_obj.

CALL FUNCTION 'SCMS_HTTP_GET'
  EXPORTING
    crep_id   = co_arch
    doc_id    = toa01-arc_doc_id
    comp_id   = 'data'
    length    = 0
    no_cache  = no_cache
  IMPORTING
    length    = comp-size
    mimetype  = comp-type
  TABLES
    data      = comp-bin
  EXCEPTIONS
    not_found = 1
    OTHERS    = 2.
  IF sy-subrc IS NOT INITIAL.
    PERFORM log_create USING &amp;lt;ls&amp;gt;-vbeln.
  ENDIF.
  
IF comp-bin IS NOT INITIAL.
  CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
      bin_filesize = comp-size
      filename     = dstpc
      filetype     = 'BIN'
    TABLES
      data_tab     = comp-bin
    EXCEPTIONS
      OTHERS       = 1.
  IF sy-subrc IS NOT INITIAL.
    PERFORM log_create USING &amp;lt;ls&amp;gt;-vbeln.
  ELSE.
    MESSAGE s000(38) WITH 'Success'.
  ENDIF.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;Przemysław&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Feb 2012 12:39:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-while-retrieving-from-content-repository/m-p/8578595#M1660587</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-07T12:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: Problems while retrieving from content repository</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problems-while-retrieving-from-content-repository/m-p/8578596#M1660588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Przemysław,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the answer. I resolved the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Anie&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Feb 2012 09:19:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problems-while-retrieving-from-content-repository/m-p/8578596#M1660588</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-12T09:19:40Z</dc:date>
    </item>
  </channel>
</rss>

