<?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 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/771941#M38356</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will make it clearer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my program, I am populating an internal table and then I am calculating age by subtracting two date fields and storing that field (zage) also in the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So now internal table contains all the data. I want to delete the extra data which is not falling in user selection (i.e. S_ZAGE)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if the user enter age as 10 to 20 means I want to delete all the records which are not falling in that range. So I am using DELETE command and "NB".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But below code is not working... (user input 10 and 20)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE: 'NB' TO s_zage-option.&lt;/P&gt;&lt;P&gt;'I' TO s_zage-sign.&lt;/P&gt;&lt;P&gt;APPEND s_zage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if I hard-code... like below... then it's working as I expect....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE: 'NB' TO s_zage-option.&lt;/P&gt;&lt;P&gt;'I' TO s_zage-sign.&lt;/P&gt;&lt;P&gt;'10' TO s_zage-low,&lt;/P&gt;&lt;P&gt;'20' TO s_zage-high.&lt;/P&gt;&lt;P&gt;APPEND s_zage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Balaji Viswanath.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Nov 2004 13:36:10 GMT</pubDate>
    <dc:creator>balaji_viswanath</dc:creator>
    <dc:date>2004-11-25T13:36:10Z</dc:date>
    <item>
      <title>Select-Options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/771937#M38352</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 want to delete internal data based on user input so I wrote the following code and it is working fine if I hard-code s_zage-low and s_zage-high but without that hardcode if you user inputs it's not working. How to make it work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Advance thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------------------------------------------------" /&gt;&lt;P&gt;SELECT-OPTIONS: s_zage          FOR zsubdci-znldays.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE: 'NB'    TO s_zage-option,&lt;/P&gt;&lt;P&gt;      'I'     TO s_zage-sign,&lt;/P&gt;&lt;P&gt;      '10'    TO s_zage-low,&lt;/P&gt;&lt;P&gt;      '20'	TO s_zage-high.&lt;/P&gt;&lt;P&gt;APPEND s_zage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE itab_data WHERE&lt;/P&gt;&lt;P&gt;       zage IN s_zage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;V Balaji.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Nov 2004 11:25:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/771937#M38352</guid>
      <dc:creator>balaji_viswanath</dc:creator>
      <dc:date>2004-11-25T11:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: Select-Options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/771938#M38353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Balaji,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is not totally clear why you face a problem here. But I can think of one thing that you might have missed out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the statement DELETE ITAB_DATA WHERE ZAGE IN S_ZAGE, if the select-options internal table is empty, that is to say if the user does not enter anything in this field on the selection-screen, then all the contents of the internal table will get deleted. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this the problem you are facing? If yes, then you can do some processing and adopt either of these two approaches as suits your case:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Force the user to amke some input on these select-options, by making them mandatory. For example, you can use something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables vbak.&lt;/P&gt;&lt;P&gt;select-options s_vbeln for vbak-vbeln obligatory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. You need not make the select-options field mandatory, but you can give warning message on the selection screen when the user hits EXECUTE (F8) on the screen. For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF S_VBELN IS INITIAL.&lt;/P&gt;&lt;P&gt;  MESSAGE W001(XYZ) WITH 'All the records will be deleted, are you sure you want to continue?'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If these are not the actual descriptions of your problem, please state the exact nature of the issue that you are facing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Nov 2004 12:03:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/771938#M38353</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-11-25T12:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: Select-Options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/771939#M38354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That code must work... it deletes all data who is not between 10 and 20...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you used SELECT-OPTIONS without the MOVE and APPEND sentences, it must work too, I believe... Just be sure your selection is well done (maybe your user is selecting data BETWEEN 10 and 20 and not NOT BETWEEN them...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to debug it and catch the values of s_zage...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best luck,&lt;/P&gt;&lt;P&gt;Vic&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Nov 2004 12:03:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/771939#M38354</guid>
      <dc:creator>VXLozano</dc:creator>
      <dc:date>2004-11-25T12:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: Select-Options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/771940#M38355</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;plz dbug , if SO s_zage is the same &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) with your default values &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;2) with user values &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perhaps option (NB in 1) differs,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Grx Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Nov 2004 12:06:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/771940#M38355</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2004-11-25T12:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: Select-Options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/771941#M38356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will make it clearer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my program, I am populating an internal table and then I am calculating age by subtracting two date fields and storing that field (zage) also in the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So now internal table contains all the data. I want to delete the extra data which is not falling in user selection (i.e. S_ZAGE)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if the user enter age as 10 to 20 means I want to delete all the records which are not falling in that range. So I am using DELETE command and "NB".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But below code is not working... (user input 10 and 20)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE: 'NB' TO s_zage-option.&lt;/P&gt;&lt;P&gt;'I' TO s_zage-sign.&lt;/P&gt;&lt;P&gt;APPEND s_zage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if I hard-code... like below... then it's working as I expect....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MOVE: 'NB' TO s_zage-option.&lt;/P&gt;&lt;P&gt;'I' TO s_zage-sign.&lt;/P&gt;&lt;P&gt;'10' TO s_zage-low,&lt;/P&gt;&lt;P&gt;'20' TO s_zage-high.&lt;/P&gt;&lt;P&gt;APPEND s_zage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Balaji Viswanath.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Nov 2004 13:36:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/771941#M38356</guid>
      <dc:creator>balaji_viswanath</dc:creator>
      <dc:date>2004-11-25T13:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: Select-Options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/771942#M38357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to exclude the user selection from your DELETE, maybe you must change the selection, and not add another selection...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try changing only the sign, from "I" to "E", and it will work, and don't use APPEND, use MODIFY.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Nov 2004 13:54:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/771942#M38357</guid>
      <dc:creator>VXLozano</dc:creator>
      <dc:date>2004-11-25T13:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: Select-Options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/771943#M38358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I use modify I am getting "TABLE_ILLEGAL_STATEMENT" dump.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Balaji Viswanath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Nov 2004 14:16:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/771943#M38358</guid>
      <dc:creator>balaji_viswanath</dc:creator>
      <dc:date>2004-11-25T14:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: Select-Options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/771944#M38359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Balaji,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I now understand the issue. when you hard code the values, the select-options table contains only one row, which is &lt;/P&gt;&lt;P&gt;OPTION : NB ; SIGN : I ; LOW : 10 ; HIGH : 20.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This row is actually quite fine. So the delete works as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the other case, the select-options internal table contains two rows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPTION : NB ; SIGN : I ; LOW :  ; HIGH : .(thru append statement)&lt;/P&gt;&lt;P&gt;OPTION : BT ; SIGN : I ; LOW : 10 ; HIGH : 20.( thru the user-input on the selection screen)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So to accomplish your requirement, you would have to code something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selection-screen.&lt;/P&gt;&lt;P&gt;s_zage-option = 'NB'.&lt;/P&gt;&lt;P&gt;modify s_zage index 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you can go ahead with your DELETE operation on the internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will solve your probelm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand Mandalika&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Nov 2004 14:20:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/771944#M38359</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-11-25T14:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Select-Options</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/771945#M38360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Poornanand Mandalika,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Excatly what you told is correct. You solved my problem. Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Balaji Viswanath.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Nov 2004 14:29:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/select-options/m-p/771945#M38360</guid>
      <dc:creator>balaji_viswanath</dc:creator>
      <dc:date>2004-11-25T14:29:53Z</dc:date>
    </item>
  </channel>
</rss>

