<?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: selection-screen in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/5109923#M1185429</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can achieve your requirement by validating checkbox in ON... construct and using the message type E which blocks users from proceeding further before entering programtic manditatory selection-field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Krishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Jan 2009 15:24:14 GMT</pubDate>
    <dc:creator>nkr1shna</dc:creator>
    <dc:date>2009-01-26T15:24:14Z</dc:date>
    <item>
      <title>selection-screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/5109920#M1185426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ALL,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope all are doing fine!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;parameters: c1 as checkbox default 'X',
                  c2 as checkbox.

selection-screen begin of block b1.
 select-options: fld1 for bukrs modif id group1,
                       fld2 for kunr modif id group1,
                       fld3 for belmr modif group2,                          
                       fld4 for gjahr modi group2.  
selection-screen end of block b1.

selection-screen begin of block b2.
 select-options: fld5 for bukrs modif id group1,
                       fld6 for kunr modif id group1,
selection-screen end of block b2.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my requirement is metioned below:&lt;/P&gt;&lt;P&gt;whenever user selects c1 flag.., only block b1 is mandatory.....and when user select c2 only block b2 is mandatory..&lt;/P&gt;&lt;P&gt;and at the same time,,if user selects c1 flag  the group1 fields should be mandatory if group2 is not filled...,and vice versa i.e., group2 fields should be mandatory if group1 is not filled &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking for possible resolutions for the same!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Julius Bussche on Jan 26, 2009 2:37 PM&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Code tags added. You might want to try using the search as well as using a more meaningfull subject title in future.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2009 13:33:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/5109920#M1185426</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-26T13:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: selection-screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/5109921#M1185427</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;Test the following code hope this will solve out ur problem,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TABLES: vttk, kna1.
 
 
SELECTION-SCREEN BEGIN OF BLOCK box WITH FRAME TITLE text-001.
PARAMETERS: p_email AS CHECKBOX USER-COMMAND flag .
SELECT-OPTIONS: email FOR kna1-kunnr LOWER CASE NO INTERVALS MODIF ID md1.
SELECTION-SCREEN END OF BLOCK box.
 
AT SELECTION-SCREEN OUTPUT.
  PERFORM set_screen.
 
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  set_screen
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
FORM set_screen .
  IF p_email EQ 'X'.
    LOOP AT SCREEN.
      IF screen-group1 = 'MD1'.
        screen-input = '1'.
        screen-invisible = '0'.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ELSE.
    LOOP AT SCREEN.
      IF screen-group1 = 'MD1'.
        screen-input = '0'.
        screen-invisible = '1'.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.
ENDFORM.                    "set_screen&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Reply if have any Issue,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Faisal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2009 13:43:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/5109921#M1185427</guid>
      <dc:creator>faisalatsap</dc:creator>
      <dc:date>2009-01-26T13:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: selection-screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/5109922#M1185428</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;Test the following code, I have tested it is working exactly according to your requirement &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TABLES kna1.

PARAMETERS: c1 RADIOBUTTON GROUP g USER-COMMAND a ,
            c2 RADIOBUTTON GROUP g .

SELECTION-SCREEN BEGIN OF BLOCK b1.
SELECT-OPTIONS: fld1 FOR kna1-sortl MODIF ID gr1,
                fld2 FOR kna1-sortl MODIF ID gr1,
                fld3 FOR kna1-sortl MODIF ID gr1,
                fld4 FOR kna1-sortl MODIF ID gr1.
SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2.
SELECT-OPTIONS: fld5 FOR kna1-sortl MODIF ID gr2,
                fld6 FOR kna1-sortl MODIF ID gr2.
SELECTION-SCREEN END OF BLOCK b2.

AT SELECTION-SCREEN OUTPUT.

  PERFORM set_screen.

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  set_screen
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
FORM set_screen .
  IF c1 = 'X'.
    LOOP AT SCREEN.
      IF screen-group1 = 'GR1'.
        screen-required = '1'.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ELSE.
    LOOP AT SCREEN.
      IF screen-group1 = 'GR2'.
        screen-required = '1'.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.

ENDFORM.                    "set_screen

INITIALIZATION .
  c1 = 'X'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Test Following too,&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TABLES: kna1.
PARAMETERS: c1 RADIOBUTTON GROUP g USER-COMMAND a ,
            c2 RADIOBUTTON GROUP g .

SELECTION-SCREEN BEGIN OF BLOCK b1.
SELECT-OPTIONS: fld1 FOR kna1-kunnr MODIF ID gr1,
                fld2 FOR kna1-kunnr MODIF ID gr1,
                fld3 FOR kna1-kunnr MODIF ID gr1,
                fld4 FOR kna1-kunnr MODIF ID gr1.
SELECTION-SCREEN END OF BLOCK b1.

SELECTION-SCREEN BEGIN OF BLOCK b2.
SELECT-OPTIONS: fld5 FOR kna1-kunnr MODIF ID gr2,
                fld6 FOR kna1-kunnr MODIF ID gr2.
SELECTION-SCREEN END OF BLOCK b2.


AT SELECTION-SCREEN OUTPUT.

  PERFORM set_screen.

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  set_screen
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
FORM set_screen .
  IF c1 = 'X'.
    LOOP AT SCREEN.
      IF screen-group1 = 'GR1'.
        screen-required = '1'.
        MODIFY SCREEN.
      ENDIF.
      IF screen-group1 = 'GR2'.
        screen-required = '0'.
        screen-input = '0'.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
    CLEAR: fld5, fld5[], fld6, fld6[].
  ELSE.
    LOOP AT SCREEN.
      IF screen-group1 = 'GR2'.
        screen-required = '1'.
        MODIFY SCREEN.
      ENDIF.
      IF screen-group1 = 'GR1'.
        screen-required = '0'.
        screen-input = '0'.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
    CLEAR: fld1, fld1[], fld2, fld2[], fld3, fld3[], fld4, fld4[].
  ENDIF.

ENDFORM.                    "set_screen

INITIALIZATION .
  c1 = 'X'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Reply if you need some thing else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Faisal&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Faisal Altaf on Jan 26, 2009 8:06 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2009 14:47:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/5109922#M1185428</guid>
      <dc:creator>faisalatsap</dc:creator>
      <dc:date>2009-01-26T14:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: selection-screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/5109923#M1185429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can achieve your requirement by validating checkbox in ON... construct and using the message type E which blocks users from proceeding further before entering programtic manditatory selection-field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Krishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2009 15:24:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/5109923#M1185429</guid>
      <dc:creator>nkr1shna</dc:creator>
      <dc:date>2009-01-26T15:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: selection-screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/5109924#M1185430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Faisal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your time!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But you mis-understood my requirement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per my requirement group1,group2 are under same block b1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but u took it in other way,,by considering group1 in block b1 and group2 in block2...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;group1,group2 are in the same block b1 ,,,,,,but not in two different blocks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and at the same time ..,the  group1 fields should be made mandatory if group2 fields are not filled and vice versa.,,,both group1 and group2 are under same block..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if we select c1 only block b1 should be activated and b2 should be hidden/de-activated/grayed-out..&lt;/P&gt;&lt;P&gt;.., if we select c2 only b2 should be activated and b1 should be hidden/de-activated/grayed-out&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2009 16:24:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/5109924#M1185430</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-26T16:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: selection-screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/5109925#M1185431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the sample code from Faisal completely covers your requirement, at least you can figure out, what you have to do in your own program. If you need a complete source code, which covers your exact requirement... than SDN is not the proper place for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;all the best&lt;/P&gt;&lt;P&gt;ec&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2009 16:29:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/5109925#M1185431</guid>
      <dc:creator>JozsefSzikszai</dc:creator>
      <dc:date>2009-01-26T16:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: selection-screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/5109926#M1185432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please post full contact details for your client, including hidden / de-activated / greyed-out decision maker's names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We will do the needfull.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Julius&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2009 20:36:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen/m-p/5109926#M1185432</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-26T20:36:36Z</dc:date>
    </item>
  </channel>
</rss>

