<?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: GOS: How to create attachment from variable string ? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/gos-how-to-create-attachment-from-variable-string/m-p/534302#M19587</link>
    <description>&lt;P&gt;Hi Sumanth  &lt;SPAN class="mention-scrubbed"&gt;sumanth_pyaraka&lt;/SPAN&gt; ,&lt;/P&gt;&lt;P&gt;I am not sure of the issue w.r.t PDF object in ARL category type. As far as I remember, generally we can upload PDF types but category type I don't remember. For SAP notes you should search below as a quick search did not reveal me anything.&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.sap.com/en/my-support/knowledge-base.html"&gt;https://support.sap.com/en/my-support/knowledge-base.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Sun, 07 Jun 2020 14:32:41 GMT</pubDate>
    <dc:creator>Ankit_Maskara</dc:creator>
    <dc:date>2020-06-07T14:32:41Z</dc:date>
    <item>
      <title>GOS: How to create attachment from variable string ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gos-how-to-create-attachment-from-variable-string/m-p/534292#M19577</link>
      <description>&lt;P&gt;Hi folks.&lt;/P&gt;
  &lt;P&gt;I want to create a xml file from string variable, this string have xml content. I found this method to save any document in FB03 but selecting a local file:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;CALL METHOD obj_gos-&amp;gt;create_attachment
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;I want to create a xml file but with my variable content.&lt;/P&gt;
  &lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 19:13:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gos-how-to-create-attachment-from-variable-string/m-p/534292#M19577</guid>
      <dc:creator>Jimmy21</dc:creator>
      <dc:date>2017-09-25T19:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: GOS: How to create attachment from variable string ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gos-how-to-create-attachment-from-variable-string/m-p/534293#M19578</link>
      <description>&lt;P&gt;Simply open a file with OPEN DATASET in &lt;A href="https://help.sap.com/http.svc/rc/abapdocu_752_index_htm/7.52/en-US/index.htm?file=abapopen_dataset_mode.htm"&gt;BINARY MODE&lt;/A&gt; and TRANSFER your string?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 20:23:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gos-how-to-create-attachment-from-variable-string/m-p/534293#M19578</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-09-25T20:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: GOS: How to create attachment from variable string ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gos-how-to-create-attachment-from-variable-string/m-p/534294#M19579</link>
      <description>&lt;P&gt;This xml file should will save it in FB03 transaction.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 20:43:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gos-how-to-create-attachment-from-variable-string/m-p/534294#M19579</guid>
      <dc:creator>Jimmy21</dc:creator>
      <dc:date>2017-09-25T20:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: GOS: How to create attachment from variable string ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gos-how-to-create-attachment-from-variable-string/m-p/534295#M19580</link>
      <description>&lt;P&gt;Try creating document from your xml string with &lt;A href="https://launchpad.support.sap.com/#/solutions/scnwiki/?q=SO_DOCUMENT_INSERT"&gt;SO_DOCUMENT_INSERT&lt;/A&gt; and attach it to FI document with &lt;A href="https://launchpad.support.sap.com/#/solutions/scnwiki/?q=CL_BINARY_RELATION%25253D%25253ECREATE_LINK"&gt;CL_BINARY_RELATION=&amp;gt;CREATE_LINK&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2017 06:18:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gos-how-to-create-attachment-from-variable-string/m-p/534295#M19580</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2017-09-26T06:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: GOS: How to create attachment from variable string ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gos-how-to-create-attachment-from-variable-string/m-p/534296#M19581</link>
      <description>&lt;P&gt;Hi Raymond.&lt;/P&gt;
  &lt;P&gt;I found this &lt;A target="_blank" href="https://wiki.scn.sap.com/wiki/display/Snippets/GOS+URL+Addition+to+Business+Object"&gt;tutorial&lt;/A&gt; and entered this values in parameters:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;p_bo  : BKPF
p_key : [bukrs][doc number][year]
p_url : &lt;A href="https://community.sap.com/www.sdn.sap.com" target="test_blank"&gt;www.sdn.sap.com&lt;/A&gt;

But in FB03 don't created my attachment.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Sep 2017 16:29:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gos-how-to-create-attachment-from-variable-string/m-p/534296#M19581</guid>
      <dc:creator>Jimmy21</dc:creator>
      <dc:date>2017-09-26T16:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: GOS: How to create attachment from variable string ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gos-how-to-create-attachment-from-variable-string/m-p/534297#M19582</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;
  &lt;P&gt;What I understand is you have a variable which has XML data and you need to create an attachment from it. &lt;/P&gt;
  &lt;P&gt;Can you try using CL_GOS_API-&amp;gt;INSERT_AL_ITEM.&lt;/P&gt;
  &lt;P&gt;Pass the Object details (InstanceId, CategoryId and TypeId) in IS_OBJECT and contents(Filename, AttachmentCategory, Filesize, Content_X, etc.) in IS_ATTCONT and check.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2017 04:05:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gos-how-to-create-attachment-from-variable-string/m-p/534297#M19582</guid>
      <dc:creator>Ankit_Maskara</dc:creator>
      <dc:date>2017-09-27T04:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: GOS: How to create attachment from variable string ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gos-how-to-create-attachment-from-variable-string/m-p/534298#M19583</link>
      <description>&lt;P&gt;Insure you pass correct internal values (some space, or leading zeroes) Also debug your code as the provided sample just catch the errors but don't return any message/clue on errors (from authorization failures to wrong parameter data or type)&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2017 06:04:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gos-how-to-create-attachment-from-variable-string/m-p/534298#M19583</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2017-09-27T06:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: GOS: How to create attachment from variable string ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gos-how-to-create-attachment-from-variable-string/m-p/534299#M19584</link>
      <description>&lt;P&gt;Instead of BKPF, try passing FIPP and see&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 15:31:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gos-how-to-create-attachment-from-variable-string/m-p/534299#M19584</guid>
      <dc:creator>Ankit_Maskara</dc:creator>
      <dc:date>2017-10-02T15:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: GOS: How to create attachment from variable string ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gos-how-to-create-attachment-from-variable-string/m-p/534300#M19585</link>
      <description>&lt;P&gt;I'm guessing your goal is not to create a "file" but to create a GOS attachment. Those are different things, technically.&lt;/P&gt;
  &lt;P&gt;FWIW I've dissected the whole GOS process in &lt;A href="http://friendlyabaper.blogspot.com/2008/07/oh-my-gos.html"&gt;this blog&lt;/A&gt; a while ago. I wouldn't just copy-paste the code since the blog is just very old but the concept explanation is still valid, I believe.&lt;/P&gt;
  &lt;P&gt;I've used very similar code (again, years ago) to create a program that reads a file into XSTRING variable and then creates a GOS attachment with that data. It works for PDF and XML, code is exactly the same (only the extension is different) since we're dealing with binary data. &lt;/P&gt;
  &lt;P&gt;1. cl_document_bcs=&amp;gt;xstring_to_solix to convert XSTRING to SOLIX type internal table&lt;/P&gt;
  &lt;P&gt;2. FM SO_FOLDER_ROOT_ID_GET&lt;/P&gt;
  &lt;P&gt;3. SO_DOCUMENT_INSERT_API1 (contents_hex = SOLIX type table from step 1; folder_id from step 2)&lt;/P&gt;
  &lt;P&gt;4. FM BINARY_RELATION_CREATE_COMMIT&lt;/P&gt;
  &lt;P&gt;Again - I'm not saying you must use these exact FMs (check the class Raymond mentioned instead). This is just an example of what works in our rather old system to outline the steps needed.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2017 17:03:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gos-how-to-create-attachment-from-variable-string/m-p/534300#M19585</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2017-10-05T17:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: GOS: How to create attachment from variable string ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gos-how-to-create-attachment-from-variable-string/m-p/534301#M19586</link>
      <description>&lt;P&gt;Hi Ankit,&lt;/P&gt;&lt;P&gt;While trying to attach a .pdf using CL_GOS_API class my attachment category is of ARL(Archive link) type and the insert is not supported for this category yet {SGOS_MSG(E401)}. I would like to know if any OSS notes or alternatives are available to use this API class? My requirement is to create a PDF attachment using GOS and have the document stored at the content server.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jun 2020 12:25:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gos-how-to-create-attachment-from-variable-string/m-p/534301#M19586</guid>
      <dc:creator>SumanthPyaraka</dc:creator>
      <dc:date>2020-06-06T12:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: GOS: How to create attachment from variable string ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gos-how-to-create-attachment-from-variable-string/m-p/534302#M19587</link>
      <description>&lt;P&gt;Hi Sumanth  &lt;SPAN class="mention-scrubbed"&gt;sumanth_pyaraka&lt;/SPAN&gt; ,&lt;/P&gt;&lt;P&gt;I am not sure of the issue w.r.t PDF object in ARL category type. As far as I remember, generally we can upload PDF types but category type I don't remember. For SAP notes you should search below as a quick search did not reveal me anything.&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.sap.com/en/my-support/knowledge-base.html"&gt;https://support.sap.com/en/my-support/knowledge-base.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jun 2020 14:32:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gos-how-to-create-attachment-from-variable-string/m-p/534302#M19587</guid>
      <dc:creator>Ankit_Maskara</dc:creator>
      <dc:date>2020-06-07T14:32:41Z</dc:date>
    </item>
  </channel>
</rss>

