<?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 select options problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/3974399#M949273</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;I have one sap-script having selection screen as below,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen :  begin of block b1 with frame title text-001.&lt;/P&gt;&lt;P&gt;parameter: p_bukrs for bkpf-bukrs.&lt;/P&gt;&lt;P&gt;select-options : p_belnr for bkpf-belnr.&lt;/P&gt;&lt;P&gt;parameter: p_gjahr for bkpf-gjahr.&lt;/P&gt;&lt;P&gt;selection-screen :  end of block b1 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my requirement is to display each company code, document Number and fiscal year in one page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;iam able to display single document on one page. but not able to display when p_belnr is in ranges in different page and how to fatch the data from select-options and how to put loop on it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any idea, Pl let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vamsykrishna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Jun 2008 08:37:09 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-17T08:37:09Z</dc:date>
    <item>
      <title>select options problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/3974399#M949273</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;I have one sap-script having selection screen as below,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen :  begin of block b1 with frame title text-001.&lt;/P&gt;&lt;P&gt;parameter: p_bukrs for bkpf-bukrs.&lt;/P&gt;&lt;P&gt;select-options : p_belnr for bkpf-belnr.&lt;/P&gt;&lt;P&gt;parameter: p_gjahr for bkpf-gjahr.&lt;/P&gt;&lt;P&gt;selection-screen :  end of block b1 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my requirement is to display each company code, document Number and fiscal year in one page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;iam able to display single document on one page. but not able to display when p_belnr is in ranges in different page and how to fatch the data from select-options and how to put loop on it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any idea, Pl let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vamsykrishna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 08:37:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/3974399#M949273</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-17T08:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: select options problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/3974400#M949274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;loop at s_matnr .&lt;/P&gt;&lt;P&gt;r_ranges-low = s_matnr-low.&lt;/P&gt;&lt;P&gt;r_ranges-sign = 'I'.&lt;/P&gt;&lt;P&gt;r_ranges-option = 'EQ'.&lt;/P&gt;&lt;P&gt;r_ranges-high = s_matnr-high.&lt;/P&gt;&lt;P&gt;append r_ranges.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at r_ranges.&lt;/P&gt;&lt;P&gt;write:/ r_ranges-low.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 08:41:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/3974400#M949274</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-17T08:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: select options problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/3974401#M949275</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;  Check the below code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select BELNR from BSEG into table i_bseg where belnr in p_belnr and bukrs = p_bukrs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If sy-subrc = 0.&lt;/P&gt;&lt;P&gt;Loop at i_bseg.&lt;/P&gt;&lt;P&gt;&amp;lt;Implement your logic&amp;gt;.&lt;/P&gt;&lt;P&gt;Endloop.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Bujji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 08:44:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/3974401#M949275</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-17T08:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: select options problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/3974402#M949276</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;Before printing the data u should store the document to be printed in an internal table sorted by company code fyscal year and doc. number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this way y can know when a new page has to printed: as soon as change company code or fyscal year or doc. number:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;selection-screen : begin of block b1 with frame title text-001.
   parameter: p_bukrs type bkpf-bukrs.
  select-options : p_belnr for bkpf-belnr.
  parameter: p_gjahr type bkpf-gjahr.
selection-screen : end of block b1 .

data t_bkpf type standard table of bkpf.

start-of-selection.

select * from bkpf into table t_bkpf where bukrs = p_bukrs
                                                            and belnr in p_belnr
                                                            and gjahr = p_gjahr.
sort t_bkpf by bukrs gjahr belnr.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 08:45:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/3974402#M949276</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-17T08:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: select options problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/3974403#M949277</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;try to populate all BELNR available in BKPF by passing only BELNR into internal table. this will give the range of values for the p_belnr that u gave in sel-screen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;madhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 08:47:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/3974403#M949277</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-17T08:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: select options problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/3974404#M949278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes and you can loop through the internal table and at every new document number start a new page.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 08:51:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/3974404#M949278</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-17T08:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: select options problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/3974405#M949279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When selecting data from database say from BKPF use IN operator with the select-option in the where cluse like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select   bukrs&lt;/P&gt;&lt;P&gt;            belnr&lt;/P&gt;&lt;P&gt;            gjahr&lt;/P&gt;&lt;P&gt;            ......&lt;/P&gt;&lt;P&gt;from BKPF into table i_bkpf &lt;STRONG&gt;&amp;lt;&amp;lt; it contains all the document nos&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;where bukrs = p_bukrs&lt;/P&gt;&lt;P&gt;and    belnr in p_belnr &lt;/P&gt;&lt;P&gt;and    gjahr  = p_gjahr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sy-subrc = 0.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;loop at i_bkpf. &lt;STRONG&gt;&amp;lt;&amp;lt; for each document no call the sapscript form&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; call function 'WRITE_FORM'&lt;/P&gt;&lt;P&gt; .........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Joy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2008 08:57:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-problem/m-p/3974405#M949279</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-17T08:57:40Z</dc:date>
    </item>
  </channel>
</rss>

