<?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: SELECT-OPTIONS - combining 2 fields in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-combining-2-fields/m-p/4632151#M1090792</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Neither field is a key for BSEG, so this will not work in a production environment. You would have to search the relevant tables where there are keys, but what would you do if they are in both tables? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Oct 2008 19:14:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-16T19:14:02Z</dc:date>
    <item>
      <title>SELECT-OPTIONS - combining 2 fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-combining-2-fields/m-p/4632144#M1090785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The requirement is to combine bseg-ebeln and bseg-kblnr into one S_variable. The user will either enter ebeln or kblnr. How to do this? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK block_1 WITH FRAME TITLE text-t01.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS:&lt;/P&gt;&lt;P&gt;    s_ebeln FOR bseg-ebeln,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;   or for bseg-kblnr,&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;   s_kblnr FOR bseg-kblnr,&lt;/P&gt;&lt;P&gt;   s_confd FOR fmtc_schno-confd.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK block_1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much,&lt;/P&gt;&lt;P&gt;Punita&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 18:58:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-combining-2-fields/m-p/4632144#M1090785</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-16T18:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT-OPTIONS - combining 2 fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-combining-2-fields/m-p/4632145#M1090786</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 am not sure how you mean to combine it into one select-option. How can you then distinguish whether you have to check ebeln or kblnr field in the table bseg?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The best is to have two select-options and then make select like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM bseg into table it_bseg where&lt;/P&gt;&lt;P&gt;ebeln in so_ebeln and kblnr in so_kblnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will work correctly also if only one select option is filled ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or if you have different idea, please specify and we can discuss.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Karol&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 19:01:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-combining-2-fields/m-p/4632145#M1090786</guid>
      <dc:creator>karol_seman</dc:creator>
      <dc:date>2008-10-16T19:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT-OPTIONS - combining 2 fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-combining-2-fields/m-p/4632146#M1090787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ebeln or kblnr&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
at selection screen.

select single ebeln 
           from ... into ..
if sy-subrc eq 0.
flag = 'X'.
else.
flag = 'Y'.
endif.


write two different selects and based on the flag get data.

if flag = 'X'.
select...

where..
eblen in so_value.

else.
select..

where kblnr in so_value.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 19:03:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-combining-2-fields/m-p/4632146#M1090787</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2008-10-16T19:03:04Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT-OPTIONS - combining 2 fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-combining-2-fields/m-p/4632147#M1090788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, how does the program tell if it's a PO or an earmarked document?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 19:03:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-combining-2-fields/m-p/4632147#M1090788</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-16T19:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT-OPTIONS - combining 2 fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-combining-2-fields/m-p/4632148#M1090789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it is not possible, conditionally display them in selection screen if you want , with the help of some radio button or checkbox , using the event at selection-screen output you can hide them using loop at screen logic. but you cannot have a single field to hold the two variables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 19:04:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-combining-2-fields/m-p/4632148#M1090789</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-16T19:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT-OPTIONS - combining 2 fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-combining-2-fields/m-p/4632149#M1090790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Business has one text box and they will enter either purchase document number (EBELN) or KBLNR (documnt # for ear marked funds). The search should happen for both the fields in BSEG table.&lt;/P&gt;&lt;P&gt;Punita.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 19:08:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-combining-2-fields/m-p/4632149#M1090790</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-16T19:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT-OPTIONS - combining 2 fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-combining-2-fields/m-p/4632150#M1090791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you SO much, you all answered my question,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Punita&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 19:13:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-combining-2-fields/m-p/4632150#M1090791</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-16T19:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT-OPTIONS - combining 2 fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-combining-2-fields/m-p/4632151#M1090792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Neither field is a key for BSEG, so this will not work in a production environment. You would have to search the relevant tables where there are keys, but what would you do if they are in both tables? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 19:14:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-combining-2-fields/m-p/4632151#M1090792</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-16T19:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: SELECT-OPTIONS - combining 2 fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-combining-2-fields/m-p/4632152#M1090793</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;You can display the select-options with char10 dataelement...and then use OR condition in the where clause accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT ..FROM bseg ..WHERE..ebeln IN so_podoc OR kblnr IN so_podoc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Naren&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 19:14:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options-combining-2-fields/m-p/4632152#M1090793</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-16T19:14:56Z</dc:date>
    </item>
  </channel>
</rss>

