<?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 BSEG in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-bseg/m-p/1010504#M78772</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GET will act as a loop.&lt;/P&gt;&lt;P&gt;First it will take first record and then for that particular record it will retrieve from BSEG. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will retrieve properly. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will give u some code sample.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Retrieve data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;GET bkpf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CHECK bkpf-bukrs IN sd_bukrs.(logical dbase selecion)&lt;/P&gt;&lt;P&gt;  CHECK bkpf-gjahr IN s_gjahr.(sel screen)&lt;/P&gt;&lt;P&gt;  CHECK bkpf-monat IN s_monat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GET bseg LATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CHECK bseg-hkont IN sd_saknr.&lt;/P&gt;&lt;P&gt;*Populating the output table&lt;/P&gt;&lt;P&gt;  PERFORM f1000_get_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM f1000_get_data.&lt;/P&gt;&lt;P&gt;  MOVE-CORRESPONDING bkpf TO w_output.&lt;/P&gt;&lt;P&gt;  MOVE-CORRESPONDING bseg TO w_output.&lt;/P&gt;&lt;P&gt; IF w_output-blart = 'WL'.&lt;/P&gt;&lt;P&gt;    CLEAR w_mara.&lt;/P&gt;&lt;P&gt;    SELECT SINGLE&lt;/P&gt;&lt;P&gt;           matnr&lt;/P&gt;&lt;P&gt;           prdha&lt;/P&gt;&lt;P&gt;           INTO w_mara&lt;/P&gt;&lt;P&gt;           FROM mara&lt;/P&gt;&lt;P&gt;           WHERE matnr = w_output-matnr.&lt;/P&gt;&lt;P&gt;    IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      w_output-prodh = w_mara-prdha.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  APPEND w_output TO i_output.&lt;/P&gt;&lt;P&gt;  CLEAR w_output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " f1000_get_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get back to me if u need any more help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Judith.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Judith Jessie Selvi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Jul 2005 05:41:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-07-18T05:41:20Z</dc:date>
    <item>
      <title>GET BSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-bseg/m-p/1010502#M78770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I am using the GET statements (using LDBs)&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Start code&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;GET BKPF.&lt;/P&gt;&lt;P&gt;check : select-options.&lt;/P&gt;&lt;P&gt;move-corresponding bkpf to i_bkpf.&lt;/P&gt;&lt;P&gt;append i_bkpf.&lt;/P&gt;&lt;P&gt;clear  i_bkpf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GET BSEG.&lt;/P&gt;&lt;P&gt;check : select-options.&lt;/P&gt;&lt;P&gt;move-corresponding bseg to i_bseg.&lt;/P&gt;&lt;P&gt;append i_bseg.&lt;/P&gt;&lt;P&gt;clear  i_bseg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GET BKPF late.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Code end&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the BKPF it retrieves 1 Header record.&lt;/P&gt;&lt;P&gt;At the BSEG it should retrieve 3 records but, it picks up only the 3 record (BUZEI =3)(the first two records are omitted).&lt;/P&gt;&lt;P&gt;Please point out the issue in the above code (seems to me Loop at BSEG is missing and when using GET statements LOOP does not exist, so how should i overcome that).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;- PSK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2005 04:45:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-bseg/m-p/1010502#M78770</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-18T04:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: GET BSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-bseg/m-p/1010503#M78771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Sravan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have not mentioned what are your selection options and the values you are checking under the get bseg. May be some conditions are not met for the first 2 records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2005 05:16:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-bseg/m-p/1010503#M78771</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-18T05:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: GET BSEG</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/get-bseg/m-p/1010504#M78772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GET will act as a loop.&lt;/P&gt;&lt;P&gt;First it will take first record and then for that particular record it will retrieve from BSEG. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will retrieve properly. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will give u some code sample.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Retrieve data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;GET bkpf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CHECK bkpf-bukrs IN sd_bukrs.(logical dbase selecion)&lt;/P&gt;&lt;P&gt;  CHECK bkpf-gjahr IN s_gjahr.(sel screen)&lt;/P&gt;&lt;P&gt;  CHECK bkpf-monat IN s_monat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GET bseg LATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CHECK bseg-hkont IN sd_saknr.&lt;/P&gt;&lt;P&gt;*Populating the output table&lt;/P&gt;&lt;P&gt;  PERFORM f1000_get_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM f1000_get_data.&lt;/P&gt;&lt;P&gt;  MOVE-CORRESPONDING bkpf TO w_output.&lt;/P&gt;&lt;P&gt;  MOVE-CORRESPONDING bseg TO w_output.&lt;/P&gt;&lt;P&gt; IF w_output-blart = 'WL'.&lt;/P&gt;&lt;P&gt;    CLEAR w_mara.&lt;/P&gt;&lt;P&gt;    SELECT SINGLE&lt;/P&gt;&lt;P&gt;           matnr&lt;/P&gt;&lt;P&gt;           prdha&lt;/P&gt;&lt;P&gt;           INTO w_mara&lt;/P&gt;&lt;P&gt;           FROM mara&lt;/P&gt;&lt;P&gt;           WHERE matnr = w_output-matnr.&lt;/P&gt;&lt;P&gt;    IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      w_output-prodh = w_mara-prdha.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  APPEND w_output TO i_output.&lt;/P&gt;&lt;P&gt;  CLEAR w_output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " f1000_get_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get back to me if u need any more help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Judith.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Judith Jessie Selvi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2005 05:41:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/get-bseg/m-p/1010504#M78772</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-07-18T05:41:20Z</dc:date>
    </item>
  </channel>
</rss>

