<?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 Changing select option dynamically . in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-select-option-dynamically/m-p/2418569#M539820</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 need to change selects option dynamically from mandatory / not mandatory&lt;/P&gt;&lt;P&gt;depends on the user selection of radio buttons.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the event should i use for task ?&lt;/P&gt;&lt;P&gt;I tried the following code:&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN  OUTPUT. &lt;/P&gt;&lt;P&gt;    IF  p_cust IS NOT INITIAL .&lt;/P&gt;&lt;P&gt;    LOOP AT SCREEN.&lt;/P&gt;&lt;P&gt;      IF screen-name = 'S_KNA1'.&lt;/P&gt;&lt;P&gt;        screen-required = '1'.&lt;/P&gt;&lt;P&gt;        MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;      IF screen-name = 'S_KONDA'.&lt;/P&gt;&lt;P&gt;        screen-required = '0'.&lt;/P&gt;&lt;P&gt;        MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;I also tried the event :&lt;/P&gt;&lt;P&gt;*AT SELECTION-SCREEN ON  RADIOBUTTON GROUP radi  .&lt;/P&gt;&lt;P&gt; IF  p_cust IS NOT INITIAL .&lt;/P&gt;&lt;P&gt;    LOOP AT SCREEN.&lt;/P&gt;&lt;P&gt;      IF screen-name = 'S_KNA1'.&lt;/P&gt;&lt;P&gt;        screen-required = '1'.&lt;/P&gt;&lt;P&gt;        MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;      IF screen-name = 'S_KONDA'.&lt;/P&gt;&lt;P&gt;        screen-required = '0'.&lt;/P&gt;&lt;P&gt;        MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;However  both events doesn't work ! &lt;/P&gt;&lt;P&gt;Please give  a code example of how to do the task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Moshe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Jul 2007 08:31:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-07-05T08:31:39Z</dc:date>
    <item>
      <title>Changing select option dynamically .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-select-option-dynamically/m-p/2418569#M539820</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 need to change selects option dynamically from mandatory / not mandatory&lt;/P&gt;&lt;P&gt;depends on the user selection of radio buttons.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the event should i use for task ?&lt;/P&gt;&lt;P&gt;I tried the following code:&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN  OUTPUT. &lt;/P&gt;&lt;P&gt;    IF  p_cust IS NOT INITIAL .&lt;/P&gt;&lt;P&gt;    LOOP AT SCREEN.&lt;/P&gt;&lt;P&gt;      IF screen-name = 'S_KNA1'.&lt;/P&gt;&lt;P&gt;        screen-required = '1'.&lt;/P&gt;&lt;P&gt;        MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;      IF screen-name = 'S_KONDA'.&lt;/P&gt;&lt;P&gt;        screen-required = '0'.&lt;/P&gt;&lt;P&gt;        MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;I also tried the event :&lt;/P&gt;&lt;P&gt;*AT SELECTION-SCREEN ON  RADIOBUTTON GROUP radi  .&lt;/P&gt;&lt;P&gt; IF  p_cust IS NOT INITIAL .&lt;/P&gt;&lt;P&gt;    LOOP AT SCREEN.&lt;/P&gt;&lt;P&gt;      IF screen-name = 'S_KNA1'.&lt;/P&gt;&lt;P&gt;        screen-required = '1'.&lt;/P&gt;&lt;P&gt;        MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;      IF screen-name = 'S_KONDA'.&lt;/P&gt;&lt;P&gt;        screen-required = '0'.&lt;/P&gt;&lt;P&gt;        MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;However  both events doesn't work ! &lt;/P&gt;&lt;P&gt;Please give  a code example of how to do the task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Moshe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2007 08:31:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-select-option-dynamically/m-p/2418569#M539820</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-05T08:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: Changing select option dynamically .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-select-option-dynamically/m-p/2418570#M539821</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;U should manage it in AT SELECTION-SCREEN event without to change the field input/output characteristics.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETERS: P1 TYPE C,
                         P2 TYPE C,
                         P3 TYPE C.

PARAMETERS: R1 RADIOBUTTON GROUP R1 USER-COMMAND AAA,
                         R2 RADIOBUTTON GROUP R1,
                         R3 RADIOBUTTON GROUP R1.

AT SELECTION-SCREEN.

CASE 'X'.
   WHEN R1.
     IF P1 IS INITIAL.
        MESSAGE E208(00) WITH 'Insert P1'.
     ENDIF.
   WHEN R2.
     IF P2 IS INITIAL.
        MESSAGE E208(00) WITH 'Insert P1'.
     ENDIF.
   WHEN R3.
     IF P3 IS INITIAL.
        MESSAGE E208(00) WITH 'Insert P1'.
     ENDIF.
ENDCASE.        &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2007 08:39:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-select-option-dynamically/m-p/2418570#M539821</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-05T08:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: Changing select option dynamically .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-select-option-dynamically/m-p/2418571#M539822</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;Instead of SCREEN-NAME use SCREEN-GROUP1 and for your select options give MODIF ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-OPTIONS: selcrt for dobj MODIF ID MOD1.&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN OUTPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT SCREEN.&lt;/P&gt;&lt;P&gt;CHECK SCREEN-GROUP1 = 'MOD1.&lt;/P&gt;&lt;P&gt;SCREEN-REQUIRED = 1.&lt;/P&gt;&lt;P&gt;MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is COZ when you use select-options you get TWO fileds on the INPUT screen LOW and HIGH so you have to check for selcrit-low and selctri-high you can avoid all this my assigning a MODIF ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2007 08:41:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-select-option-dynamically/m-p/2418571#M539822</guid>
      <dc:creator>seshatalpasai_madala</dc:creator>
      <dc:date>2007-07-05T08:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: Changing select option dynamically .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-select-option-dynamically/m-p/2418572#M539823</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 have used the correct event. The things you have to take care:&lt;/P&gt;&lt;P&gt;    1. In declaration of the RADIO BUTTON you must use the addition USER-COMMAND. &lt;/P&gt;&lt;P&gt;        For example,&lt;/P&gt;&lt;P&gt;PARAMETER  p_rdoc  RADIOBUTTON GROUP grp USER-COMMAND ucmnd DEFAULT 'X'.&lt;/P&gt;&lt;P&gt;    2.    if you are using select option, then the screen fields will be S_KNA1-LOW and S_KNA1-HIGH and correspondingly same for the S_KONDA. But if you are parameters, then your code is alright.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT SELECTION-SCREEN OUTPUT.&lt;/P&gt;&lt;P&gt;IF p_cust IS NOT INITIAL .&lt;/P&gt;&lt;P&gt;LOOP AT SCREEN.&lt;/P&gt;&lt;P&gt;IF screen-name = 'S_KNA1'.&lt;/P&gt;&lt;P&gt;screen-required = '1'.&lt;/P&gt;&lt;P&gt;MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;IF screen-name = 'S_KONDA'.&lt;/P&gt;&lt;P&gt;screen-required = '0'.&lt;/P&gt;&lt;P&gt;MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2007 08:59:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-select-option-dynamically/m-p/2418572#M539823</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-05T08:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: Changing select option dynamically .</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-select-option-dynamically/m-p/2418573#M539824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dp !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First Thanks for your answer, it was very helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wanted to ask else how at the AT SELECTION-SCREEN OUTPUT.&lt;/P&gt;&lt;P&gt;do i get the last field the user selected&lt;/P&gt;&lt;P&gt;( set focus at : S_KNA1-low, S_KONDA-low, or p_cust radio button )&lt;/P&gt;&lt;P&gt;I tried GET CURSOR FIELD CURSORFIELD.&lt;/P&gt;&lt;P&gt;However its sy-subrc is always ne 0, and  hence i don't get proper field?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Moshe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2007 12:35:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-select-option-dynamically/m-p/2418573#M539824</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-07-05T12:35:19Z</dc:date>
    </item>
  </channel>
</rss>

