<?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: Submit statement with variant in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-with-variant/m-p/534109#M19555</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;There are many ways of going at it. &lt;/P&gt;
  &lt;P&gt;I'll illustrate just one (not sure it's the optimal one for you - not much information in your question):&lt;/P&gt;
  &lt;P&gt;You'll need to use the variant option in the &lt;A href="http://bit.ly/2z4TEFd"&gt;SUBMIT &lt;/A&gt;command. Then you'll need to have the &lt;A href="http://bit.ly/2BDAprD"&gt;list exported to memory&lt;/A&gt; (you can Google examples, like this &lt;A href="https://archive.sap.com/discussions/thread/39352"&gt;one&lt;/A&gt;). And, as suggested in the last link I provided, you can go over the list and export it to excel (many options, like &lt;A href="https://blogs.sap.com/2010/07/12/abap2xlsx-generate-your-professional-excel-spreadsheet-from-abap/"&gt;abap2xlsx&lt;/A&gt;).&lt;/P&gt;</description>
    <pubDate>Wed, 20 Dec 2017 16:45:53 GMT</pubDate>
    <dc:creator>iftah_peretz</dc:creator>
    <dc:date>2017-12-20T16:45:53Z</dc:date>
    <item>
      <title>Submit statement with variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-with-variant/m-p/534106#M19552</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
  &lt;P&gt;I am using program RSUSR002 - here i have 4 variants - i want to execute all the 4 variants one by one using SUBMIT statement.and i want to download the list into spreadsheet (using menu options -&amp;gt;list-&amp;gt;Export-&amp;gt;spreadsheet).&lt;/P&gt;
  &lt;P&gt;Is it possible to automate this program with 4 variant and to download all 4 output(spreadsheets) in desktop without manual intervention?&lt;/P&gt;
  &lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 14:01:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-with-variant/m-p/534106#M19552</guid>
      <dc:creator>former_member515329</dc:creator>
      <dc:date>2017-12-20T14:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Submit statement with variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-with-variant/m-p/534107#M19553</link>
      <description>&lt;P&gt;Depending on your version, set the hidden parameter &lt;EM&gt;listmark&lt;/EM&gt; in your submit statement, then import data from memory id '&lt;EM&gt;USERLIST&lt;/EM&gt;' or use class to get ALV data back in caller report.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 14:08:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-with-variant/m-p/534107#M19553</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2017-12-20T14:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: Submit statement with variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-with-variant/m-p/534108#M19554</link>
      <description>&lt;P&gt;Hello Raymond - can you please elaborate more on this.&lt;/P&gt;
  &lt;P&gt;my sap Version - SAP NETWEAVER 7.5&lt;/P&gt;
  &lt;P&gt;thanks in advance&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 14:17:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-with-variant/m-p/534108#M19554</guid>
      <dc:creator>former_member515329</dc:creator>
      <dc:date>2017-12-20T14:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: Submit statement with variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-with-variant/m-p/534109#M19555</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;There are many ways of going at it. &lt;/P&gt;
  &lt;P&gt;I'll illustrate just one (not sure it's the optimal one for you - not much information in your question):&lt;/P&gt;
  &lt;P&gt;You'll need to use the variant option in the &lt;A href="http://bit.ly/2z4TEFd"&gt;SUBMIT &lt;/A&gt;command. Then you'll need to have the &lt;A href="http://bit.ly/2BDAprD"&gt;list exported to memory&lt;/A&gt; (you can Google examples, like this &lt;A href="https://archive.sap.com/discussions/thread/39352"&gt;one&lt;/A&gt;). And, as suggested in the last link I provided, you can go over the list and export it to excel (many options, like &lt;A href="https://blogs.sap.com/2010/07/12/abap2xlsx-generate-your-professional-excel-spreadsheet-from-abap/"&gt;abap2xlsx&lt;/A&gt;).&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 16:45:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-with-variant/m-p/534109#M19555</guid>
      <dc:creator>iftah_peretz</dc:creator>
      <dc:date>2017-12-20T16:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: Submit statement with variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-with-variant/m-p/534110#M19556</link>
      <description>The general way to retrieve ALV data has been discussed 100 times in the forum: please search CL_SALV_BS_RUNTIME_INFO</description>
      <pubDate>Wed, 20 Dec 2017 17:54:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-with-variant/m-p/534110#M19556</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2017-12-20T17:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: Submit statement with variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-with-variant/m-p/534111#M19557</link>
      <description>&lt;P&gt;Thanks Iftah for the reply..In below code i am able to get the list in list_tab..but the format is somewhat different..so how can i download this list_tab to excel and store it in the desktop.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;SUBMIT RSUSR002 USING SELECTION-SET p_var1
                EXPORTING LIST TO MEMORY
                AND RETURN.
CALL FUNCTION 'LIST_FROM_MEMORY'
  TABLES
    listobject = list_tab
  EXCEPTIONS
    not_found  = 1
    OTHERS     = 2.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Dec 2017 09:23:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-with-variant/m-p/534111#M19557</guid>
      <dc:creator>former_member515329</dc:creator>
      <dc:date>2017-12-21T09:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Submit statement with variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-with-variant/m-p/534112#M19558</link>
      <description>&lt;P&gt;You loop over the result and adapt it to your needs, have it in any format that you want.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 11:30:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-with-variant/m-p/534112#M19558</guid>
      <dc:creator>iftah_peretz</dc:creator>
      <dc:date>2017-12-21T11:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: Submit statement with variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-with-variant/m-p/534113#M19559</link>
      <description>&lt;P&gt;Using &lt;A href="https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-US/abapsplit.htm"&gt; SPLIT&lt;/A&gt; command will do the job.&lt;/P&gt;
  &lt;P&gt;Here is a draft of the code (I assume your it_list_asci table has a column named data and that the excel has 3 columns) - I am not in front of an SAP system, so I can't check it and I couldn't see in the documentation if it clears the values or not (in case of no match), if it doesn't use option 1 otherwise option 2.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;"Option 1
DATA: column1 TYPE string,
      column2 TYPE string,
      column3 TYPE string.
LOOP AT it_list_asci INTO DATA(excel_row).
  CLEAR: column1,column2,column3. 
  SPLIT excel_row-data AT '|' INTO column1 column2 column3. 
"coulumn1-3 contains what you need
"... Your logic... 
ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;PRE&gt;&lt;CODE&gt;"Option 2
LOOP AT it_list_asci INTO DATA(excel_row).
  SPLIT excel_row-data AT '|' INTO: DATA(column1) DATA(column2) 
  DATA(column3). 
"coulumn1-3 contains what you need
"... Your logic...
ENDLOOP.

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Dec 2017 19:16:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-with-variant/m-p/534113#M19559</guid>
      <dc:creator>iftah_peretz</dc:creator>
      <dc:date>2017-12-27T19:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: Submit statement with variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-with-variant/m-p/534114#M19560</link>
      <description>&lt;P&gt;I have declared a new internal table with 11 fields(11 columns) - but still data is not coming in column wise separator in excel, it is coming as combined data in only 1 column.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;LOOP AT it_list_asci INTO wa_list_asci."DATA(excel_row).
   CLEAR : wa_excel_format.
   shift wa_list_asci-line.
  SPLIT wa_list_asci-line AT '|' INTO wa_excel_format-line1
                                      wa_excel_format-line2
                                      wa_excel_format-line3
                                      wa_excel_format-line4
                                      wa_excel_format-line5
                                      wa_excel_format-line6
                                      wa_excel_format-line7
                                      wa_excel_format-line8
                                      wa_excel_format-line9
                                      wa_excel_format-line10
                                      wa_excel_format-line11.
  APPEND wa_excel_format TO it_excel_format.
  CLEAR : wa_list_asci.
ENDLOOP.

  CALL FUNCTION 'GUI_DOWNLOAD'
     EXPORTING
       filename             = gv_fullpath
       filetype             = 'ASC'
     TABLES
       data_tab              = it_excel_format[]   "it_list_asci[]        
       fieldnames            = git_fieldnames[]  
     EXCEPTIONS
       file_open_error       = 1                         "#EC ARGCHECKED
       file_write_error      = 2
       OTHERS                = 3.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Dec 2017 10:31:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-with-variant/m-p/534114#M19560</guid>
      <dc:creator>former_member515329</dc:creator>
      <dc:date>2017-12-28T10:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: Submit statement with variant</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-with-variant/m-p/534115#M19561</link>
      <description>&lt;P&gt;I misunderstood you. You are in the phase were you want to take the output of the alv and export it to an excel and have it in a certain way, you are not using what I recommended, please search how to create excel from internal table, there's a lot of data there - I have already supplied you with links for that.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2017 11:10:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-with-variant/m-p/534115#M19561</guid>
      <dc:creator>iftah_peretz</dc:creator>
      <dc:date>2017-12-28T11:10:41Z</dc:date>
    </item>
  </channel>
</rss>

