<?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: SQ02 - Create InfoSet using 'Data retrieval by program' in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sq02-create-infoset-using-data-retrieval-by-program/m-p/8327048#M1637809</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The "Data retrieval program" would be coded like any normal report except for adding a few comment tags that will be used by SQ01 query generator as placeholders to insert its own code into your code to generate the query program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general this is how a data retrieval program is coded. SQ01 when it generates the query will insert its own code in place of *&amp;lt;Query_body&amp;gt; and *&amp;lt;Query_head&amp;gt; comment tags&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT ztest_sq01_driver_program.

TABLES: &amp;lt;name of dictionary structure of your infoset&amp;gt;.
* DATA declarations

START-OF-SELECTION.

*&amp;lt;Query_head&amp;gt;

* &amp;lt;Fetch your data here and store it in an internal table gt_report&amp;gt; that has all the fields that you need in your query

END-OF-SELECTION.

  LOOP AT gt_report INTO gs_report.

    MOVE-CORRESPONDING gs_report TO &amp;lt;name of dictionary structure of your infoset&amp;gt;

*&amp;lt;Query_body&amp;gt;

  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Nov 2011 01:56:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-11-08T01:56:41Z</dc:date>
    <item>
      <title>SQ02 - Create InfoSet using 'Data retrieval by program'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sq02-create-infoset-using-data-retrieval-by-program/m-p/8327047#M1637808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using SQ02, I would like to use the data returned by an ABAP program as the data source for an InfoSet.  When attempting to create an InfoSet, I noticed the 'Data retrieval by program' option.  I would like to discover how to use this option and how to pass parameters to the ABAP program I'd like to use.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2011 01:00:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sq02-create-infoset-using-data-retrieval-by-program/m-p/8327047#M1637808</guid>
      <dc:creator>scurry888</dc:creator>
      <dc:date>2011-11-08T01:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: SQ02 - Create InfoSet using 'Data retrieval by program'</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sq02-create-infoset-using-data-retrieval-by-program/m-p/8327048#M1637809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The "Data retrieval program" would be coded like any normal report except for adding a few comment tags that will be used by SQ01 query generator as placeholders to insert its own code into your code to generate the query program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general this is how a data retrieval program is coded. SQ01 when it generates the query will insert its own code in place of *&amp;lt;Query_body&amp;gt; and *&amp;lt;Query_head&amp;gt; comment tags&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT ztest_sq01_driver_program.

TABLES: &amp;lt;name of dictionary structure of your infoset&amp;gt;.
* DATA declarations

START-OF-SELECTION.

*&amp;lt;Query_head&amp;gt;

* &amp;lt;Fetch your data here and store it in an internal table gt_report&amp;gt; that has all the fields that you need in your query

END-OF-SELECTION.

  LOOP AT gt_report INTO gs_report.

    MOVE-CORRESPONDING gs_report TO &amp;lt;name of dictionary structure of your infoset&amp;gt;

*&amp;lt;Query_body&amp;gt;

  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Nov 2011 01:56:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sq02-create-infoset-using-data-retrieval-by-program/m-p/8327048#M1637809</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-11-08T01:56:41Z</dc:date>
    </item>
  </channel>
</rss>

