<?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: get datset in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-datset/m-p/2253033#M487362</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The system creates three field groups and fills them with several fields. It then fills the extract in the EXTRACT statements in the GET events. Note that there is no EXTRACT statement for GET SFLIGHT, since the required field SFLIGHT_FLDATE is part of the HEADER field group and thus automatically extracted for each subordinate event GET SBOOK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After retrieving the data, the system terminates the creation of the dataset when the SORT statement occurs, and sorts the dataset by the HEADER sort key. In the LOOP-ENDLOOP block, it writes the sorted extract dataset to the output list, using various AT ... ENDAT blocks and the fields CNT(...) and SUM(...).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT DEMO.

NODES: SPFLI, SFLIGHT, SBOOK.

FIELD-GROUPS: HEADER, FLIGHT_INFO, FLIGHT_BOOKING.

INSERT:
  SPFLI-CITYFROM SPFLI-CITYTO
  SPFLI-CONNID SFLIGHT-FLDATE
  SBOOK-CLASS SBOOK-SMOKER SBOOK-BOOKID INTO HEADER,
  SPFLI-CARRID                          INTO FLIGHT_INFO,
  SBOOK-LUGGWEIGHT SBOOK-WUNIT          INTO FLIGHT_BOOKING.

START-OF-SELECTION.

GET SPFLI.
  EXTRACT FLIGHT_INFO.

GET SFLIGHT.

GET SBOOK.
  EXTRACT FLIGHT_BOOKING.

END-OF-SELECTION.

  SORT.

  LOOP.
    AT FLIGHT_INFO.
      SKIP.
      WRITE: / SPFLI-CARRID,
               SPFLI-CONNID,
               'from', (15) SPFLI-CITYFROM,
               'to',   (15) SPFLI-CITYTO.
      ULINE.
    ENDAT.
    AT NEW SFLIGHT-FLDATE.
        SKIP.
        WRITE: / 'Date:', SFLIGHT-FLDATE.
        WRITE: 20 'Book-ID', 40 'Smoker', 50 'Class'.
        ULINE.
    ENDAT.
    AT FLIGHT_BOOKING.
        WRITE: / SBOOK-BOOKID UNDER 'Book-ID',
                 SBOOK-SMOKER UNDER 'Smoker',
                 SBOOK-CLASS  UNDER 'Class'.
    ENDAT.
    AT END OF SFLIGHT-FLDATE.
      ULINE.
      WRITE: 'Number of bookings:  ', (3) CNT(SBOOK-BOOKID),
           / 'Total luggage weight:',
              SUM(SBOOK-LUGGWEIGHT), SBOOK-WUNIT.
    ENDAT.
  ENDLOOP.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Deepu.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 May 2007 11:24:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-16T11:24:07Z</dc:date>
    <item>
      <title>get datset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-datset/m-p/2253032#M487361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can any one tell me about &amp;lt;b&amp;gt;get dataset&amp;lt;/b&amp;gt; and syntax of it.please explain&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        sameer k&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        sameer k&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2007 11:21:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-datset/m-p/2253032#M487361</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-16T11:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: get datset</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-datset/m-p/2253033#M487362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The system creates three field groups and fills them with several fields. It then fills the extract in the EXTRACT statements in the GET events. Note that there is no EXTRACT statement for GET SFLIGHT, since the required field SFLIGHT_FLDATE is part of the HEADER field group and thus automatically extracted for each subordinate event GET SBOOK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After retrieving the data, the system terminates the creation of the dataset when the SORT statement occurs, and sorts the dataset by the HEADER sort key. In the LOOP-ENDLOOP block, it writes the sorted extract dataset to the output list, using various AT ... ENDAT blocks and the fields CNT(...) and SUM(...).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT DEMO.

NODES: SPFLI, SFLIGHT, SBOOK.

FIELD-GROUPS: HEADER, FLIGHT_INFO, FLIGHT_BOOKING.

INSERT:
  SPFLI-CITYFROM SPFLI-CITYTO
  SPFLI-CONNID SFLIGHT-FLDATE
  SBOOK-CLASS SBOOK-SMOKER SBOOK-BOOKID INTO HEADER,
  SPFLI-CARRID                          INTO FLIGHT_INFO,
  SBOOK-LUGGWEIGHT SBOOK-WUNIT          INTO FLIGHT_BOOKING.

START-OF-SELECTION.

GET SPFLI.
  EXTRACT FLIGHT_INFO.

GET SFLIGHT.

GET SBOOK.
  EXTRACT FLIGHT_BOOKING.

END-OF-SELECTION.

  SORT.

  LOOP.
    AT FLIGHT_INFO.
      SKIP.
      WRITE: / SPFLI-CARRID,
               SPFLI-CONNID,
               'from', (15) SPFLI-CITYFROM,
               'to',   (15) SPFLI-CITYTO.
      ULINE.
    ENDAT.
    AT NEW SFLIGHT-FLDATE.
        SKIP.
        WRITE: / 'Date:', SFLIGHT-FLDATE.
        WRITE: 20 'Book-ID', 40 'Smoker', 50 'Class'.
        ULINE.
    ENDAT.
    AT FLIGHT_BOOKING.
        WRITE: / SBOOK-BOOKID UNDER 'Book-ID',
                 SBOOK-SMOKER UNDER 'Smoker',
                 SBOOK-CLASS  UNDER 'Class'.
    ENDAT.
    AT END OF SFLIGHT-FLDATE.
      ULINE.
      WRITE: 'Number of bookings:  ', (3) CNT(SBOOK-BOOKID),
           / 'Total luggage weight:',
              SUM(SBOOK-LUGGWEIGHT), SBOOK-WUNIT.
    ENDAT.
  ENDLOOP.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Deepu.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2007 11:24:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-datset/m-p/2253033#M487362</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-16T11:24:07Z</dc:date>
    </item>
  </channel>
</rss>

