<?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 Google Storage for Developers API (GET / PUT files using ABAP) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/google-storage-for-developers-api-get-put-files-using-abap/m-p/6944602#M1487804</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does anyone have any experience using Google's Storage API from SAP/ABAP ? &lt;/P&gt;&lt;P&gt;We have a requirement to put files (txt, xls, etc.) out to Google Storage. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a link with an overview of Google Storage:&lt;/P&gt;&lt;P&gt;&lt;A href="http://code.google.com/apis/storage/docs/overview.html" target="test_blank"&gt;http://code.google.com/apis/storage/docs/overview.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a link explaining the HTTP methods used: &lt;/P&gt;&lt;P&gt;&lt;A href="http://code.google.com/apis/storage/docs/reference-methods.html#putobject" target="test_blank"&gt;http://code.google.com/apis/storage/docs/reference-methods.html#putobject&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately we do not have much in-house Java/Web development experience. We do have some experience with the "http_client" methods in SAP, but not the GET/PUT concept to push/receive files.&lt;/P&gt;&lt;P&gt;Does anyone have experience using SAP/ABAP to accomplish this requirement? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Anyone have any sample ABAP code which would illustrate how to put a simple TXT file out to Google Storage?&lt;/U&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks very kindly, &lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Jun 2010 15:24:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-06-16T15:24:21Z</dc:date>
    <item>
      <title>Google Storage for Developers API (GET / PUT files using ABAP)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/google-storage-for-developers-api-get-put-files-using-abap/m-p/6944602#M1487804</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does anyone have any experience using Google's Storage API from SAP/ABAP ? &lt;/P&gt;&lt;P&gt;We have a requirement to put files (txt, xls, etc.) out to Google Storage. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a link with an overview of Google Storage:&lt;/P&gt;&lt;P&gt;&lt;A href="http://code.google.com/apis/storage/docs/overview.html" target="test_blank"&gt;http://code.google.com/apis/storage/docs/overview.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a link explaining the HTTP methods used: &lt;/P&gt;&lt;P&gt;&lt;A href="http://code.google.com/apis/storage/docs/reference-methods.html#putobject" target="test_blank"&gt;http://code.google.com/apis/storage/docs/reference-methods.html#putobject&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately we do not have much in-house Java/Web development experience. We do have some experience with the "http_client" methods in SAP, but not the GET/PUT concept to push/receive files.&lt;/P&gt;&lt;P&gt;Does anyone have experience using SAP/ABAP to accomplish this requirement? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Anyone have any sample ABAP code which would illustrate how to put a simple TXT file out to Google Storage?&lt;/U&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks very kindly, &lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jun 2010 15:24:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/google-storage-for-developers-api-get-put-files-using-abap/m-p/6944602#M1487804</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-16T15:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: Google Storage for Developers API (GET / PUT files using ABAP)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/google-storage-for-developers-api-get-put-files-using-abap/m-p/6944603#M1487805</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 haven't worked with Google Storage but I wrote a really simple class for working with CouchDB. Both products use REST based API so there should not be a big difference between them. Don't expect too much cause I spent just 1 hour on it but it might help you. The class cl_http_client is pretty straighforward so you shouldn't have any problems to add additional things required by Google.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically, I have one main method called SEND with three parameters METHOD, URL and DATA (all parameters have type string). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  DATA: full_url TYPE string,
        client TYPE REF TO if_http_client.

* Create HTTP Client
  CONCATENATE 'http://' me-&amp;gt;host ':' me-&amp;gt;port url
    INTO full_url.
  CALL METHOD cl_http_client=&amp;gt;create_by_url
    EXPORTING
      url                = full_url
    IMPORTING
      client             = client
    EXCEPTIONS
      argument_not_found = 1
      plugin_not_active  = 2
      internal_error     = 3
      OTHERS             = 4.

  IF sy-subrc &amp;lt;&amp;gt; 0.
* XXX
  ENDIF.

  IF NOT data IS INITIAL.
    client-&amp;gt;request-&amp;gt;append_cdata( data ).
  ENDIF.
  client-&amp;gt;request-&amp;gt;set_method( method ).
  client-&amp;gt;send( ).
  client-&amp;gt;receive( ).
  result = client-&amp;gt;response.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Prety simple, you just need to enter method (GET,PUT,POST,DELETE) and URL. The parameter DATA is optional. Here is an example how I use my class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* Get connection
  couch =  zcl_couchdb=&amp;gt;getcouchdb( ).
  result = couch-&amp;gt;send( method = 'GET' url = '/' ).
  txt = result-&amp;gt;get_cdata( ).
  WRITE: / txt.
  result = couch-&amp;gt;send( method = 'GET' url = '/_all_dbs' ).
  txt = result-&amp;gt;get_cdata( ).
  WRITE: / txt.

* Create DB
  result = couch-&amp;gt;send( method = 'PUT' url = '/test' ).
  txt = result-&amp;gt;get_cdata( ).
  WRITE: / txt.
  result = couch-&amp;gt;send( method = 'GET' url = '/_all_dbs' ).
  txt = result-&amp;gt;get_cdata( ).
  WRITE: / txt.

* Create a new document
  result = couch-&amp;gt;send( method = 'PUT' url = '/test/123' data = '{"_id":"123","data":"Foo"}' ).
  txt = result-&amp;gt;get_cdata( ).
  WRITE: / txt.

* Get back document 123
  result = couch-&amp;gt;send( method = 'GET' url = '/test/123').
  txt = result-&amp;gt;get_cdata( ).
  WRITE: / txt.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jun 2010 01:12:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/google-storage-for-developers-api-get-put-files-using-abap/m-p/6944603#M1487805</guid>
      <dc:creator>mvoros</dc:creator>
      <dc:date>2010-06-17T01:12:20Z</dc:date>
    </item>
  </channel>
</rss>

