<?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 file attachment for multiple lines selected in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/gos-file-attachment-for-multiple-lines-selected/m-p/8908707#M1690476</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kesavadas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This looks to be in the wrong order: &lt;/P&gt;&lt;P&gt;document-foltp = folder_id-foltp.&amp;nbsp; &lt;/P&gt;&lt;P&gt;document-folyr = folder_id-folyr.&amp;nbsp; &lt;/P&gt;&lt;P&gt;document-folno = folder_id-folno.&amp;nbsp; &lt;/P&gt;&lt;P&gt;append document to documents.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;clear documents[].&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You clear the itab after you have added the folder informations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Hendrik Maas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Aug 2012 06:55:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-08-08T06:55:41Z</dc:date>
    <item>
      <title>GOS file attachment for multiple lines selected</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gos-file-attachment-for-multiple-lines-selected/m-p/8908706#M1690475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is as follows: Multiple lines in an ALV will be selected and in the popup one file will be selected, then the file&lt;/P&gt;&lt;P&gt;must be attached to the key rows. The steps of Business object creation and assigning key fields are over, file gets attached successfully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot use the below code because the file open dialog opens up for every record selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt; loop at rows into wa_row.&lt;/P&gt;&lt;P&gt;&amp;nbsp; read table it into wa index wa_row-index.&lt;/P&gt;&lt;P&gt;&amp;nbsp; check sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp; obj_bori-objkey = wa-inumber.&lt;/P&gt;&lt;P&gt;&amp;nbsp; obj_bori-objtype = 'ZGOS'.&lt;/P&gt;&lt;P&gt;&amp;nbsp; call method manager-&amp;gt;start_service_direct&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; exporting&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ip_service = 'PCATTA_CREA'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; is_object&amp;nbsp; = obj_bori.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I debugged the method start_service_direct and found out a class CL_GOS_SRV_ATTACHMENT_CREATE which gets called internally and took the code as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;call function 'SO_FOLDER_ROOT_ID_GET'&lt;/P&gt;&lt;P&gt;&amp;nbsp; exporting&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; region&amp;nbsp;&amp;nbsp;&amp;nbsp; = 'B'&lt;/P&gt;&lt;P&gt;&amp;nbsp; importing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; folder_id = folder_id&lt;/P&gt;&lt;P&gt;&amp;nbsp; exceptions&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; others&amp;nbsp;&amp;nbsp;&amp;nbsp; = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; document-foltp = folder_id-foltp.&lt;/P&gt;&lt;P&gt;document-folyr = folder_id-folyr.&lt;/P&gt;&lt;P&gt;document-folno = folder_id-folno.&lt;/P&gt;&lt;P&gt;append document to documents.&lt;/P&gt;&lt;P&gt;clear documents[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; call function 'SO_DOCUMENTS_MANAGER'&lt;/P&gt;&lt;P&gt;&amp;nbsp; exporting&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; activity&amp;nbsp; = 'IMPO'&lt;/P&gt;&lt;P&gt;&amp;nbsp; tables&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; documents = documents.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; read table documents index 1 into document.&lt;/P&gt;&lt;P&gt;check sy-subrc = 0.&lt;/P&gt;&lt;P&gt;loop at rows into wa_row.&lt;/P&gt;&lt;P&gt;&amp;nbsp; read table it into wa index wa_row-index.&lt;/P&gt;&lt;P&gt;&amp;nbsp; check sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp; obj_bori-objkey = wa-inumber.&lt;/P&gt;&lt;P&gt;&amp;nbsp; obj_bori-objtype = 'ZGOS'.&lt;/P&gt;&lt;P&gt;&amp;nbsp; if document-okcode = 'CREA'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; attachment-objtype = 'MESSAGE'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; attachment-objkey&amp;nbsp; = document(34).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; call function 'BINARY_RELATION_CREATE'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exporting&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; obj_rolea&amp;nbsp;&amp;nbsp;&amp;nbsp; = obj_bori&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; obj_roleb&amp;nbsp;&amp;nbsp;&amp;nbsp; = attachment&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; relationtype = 'ATTA'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exceptions&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; others&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; commit work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; endif.&lt;/P&gt;&lt;P&gt;&amp;nbsp; endif.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second part is working very fine, but the problem I am facing is suppose I selected a line in ALV and clicked&lt;/P&gt;&lt;P&gt;attach button,choosed a file,done-its working. Now staying in the same ALV screen and again if I select the same line and choose another file&lt;/P&gt;&lt;P&gt;then it displays a windows popup "saying file XXX exits..do you want to replace it " which is wrong( It must attach actually ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Anybody have any better idea to attach file for multiple items with just one "choose file dialog" popup ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kesavadas T&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2012 06:20:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gos-file-attachment-for-multiple-lines-selected/m-p/8908706#M1690475</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2012-08-08T06:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: GOS file attachment for multiple lines selected</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gos-file-attachment-for-multiple-lines-selected/m-p/8908707#M1690476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kesavadas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This looks to be in the wrong order: &lt;/P&gt;&lt;P&gt;document-foltp = folder_id-foltp.&amp;nbsp; &lt;/P&gt;&lt;P&gt;document-folyr = folder_id-folyr.&amp;nbsp; &lt;/P&gt;&lt;P&gt;document-folno = folder_id-folno.&amp;nbsp; &lt;/P&gt;&lt;P&gt;append document to documents.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;clear documents[].&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You clear the itab after you have added the folder informations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Hendrik Maas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2012 06:55:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gos-file-attachment-for-multiple-lines-selected/m-p/8908707#M1690476</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-08-08T06:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: GOS file attachment for multiple lines selected</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/gos-file-attachment-for-multiple-lines-selected/m-p/8908708#M1690477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I feel silly about myself &lt;SPAN __jive_emoticon_name="laugh" __jive_macro_name="emoticon" class="jive_macro jive_macro_emoticon jive_emote" src="https://community.sap.com/910/images/emoticons/laugh.gif"&gt;&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was debugging the SO_DOCUMENT_VIEW_MANAGER and line 463 where the ok_code gets changed to EXPO, so the message appears and I was trying to know why it was happening. &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_macro_emoticon jive_emote" src="https://community.sap.com/910/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2012 07:01:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/gos-file-attachment-for-multiple-lines-selected/m-p/8908708#M1690477</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2012-08-08T07:01:40Z</dc:date>
    </item>
  </channel>
</rss>

