<?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: Toggle selection screen in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/toggle-selection-screen/m-p/2728391#M633249</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi megan ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried removing the code...USER-COMMAND fcode DEFAULT 'X'&lt;/P&gt;&lt;P&gt;and it was ok..yet the first radio button was checked..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sampath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Sep 2007 16:06:12 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-04T16:06:12Z</dc:date>
    <item>
      <title>Toggle selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/toggle-selection-screen/m-p/2728385#M633243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using the code below to create a toggling selection screen. So based on the radio button selected, it displays different select options. In BLOCK b3, the matnr and werks is obligatory, so when I try to change the screen, it gives out all required fields must be entered error. How to resolve this? I would like to change the screens even if the fields are left blank. But they need to be obligatory if I am on Screen 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;**********************************************************************
* S E L E C T I O N    S C R E E N
**********************************************************************
* Block to display the selection  options (By Inventory or By document)
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-001.
PARAMETERS: radio1 RADIOBUTTON GROUP rnd USER-COMMAND fcode DEFAULT 'X',
            radio2 RADIOBUTTON GROUP rnd.
SELECTION-SCREEN END OF BLOCK b2.

* Block to display By document options
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-002.
PARAMETERS:
           vbeln_va TYPE vbak-vbeln MODIF ID sc1, "Sales Order
           vbeln_vl TYPE likp-vbeln MODIF ID sc1. "Delivery Note
SELECTION-SCREEN END OF BLOCK b1.

* Block to display By inventory options
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
PARAMETERS:
           matnr   TYPE mara-matnr MODIF ID sc2 OBLIGATORY,
           werks   TYPE mard-werks MODIF ID sc2 OBLIGATORY,
           kunag   TYPE vbak-kunnr MODIF ID sc2,
           p_vrkme TYPE char4 AS LISTBOX VISIBLE LENGTH 10 MODIF ID sc2,
           negativ LIKE am07m-seneg MODIF ID sc2.
SELECTION-SCREEN END OF BLOCK b3.

**********************************************************************
* A T    S E L E C T I O N    S C R E E N
**********************************************************************
* To toggle the selection options
AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF screen-group1 = 'SC1' AND radio1 EQ 'X'.
      screen-active = '0'.     "make screen invisible
      gv_sel = '1'.            "assign 1 for select by inventory options
      MODIFY SCREEN.
      CONTINUE.
    ELSEIF screen-group1 = 'SC2' AND radio2 EQ 'X'.
      screen-active = '0'.     "make screen invisible
      gv_sel = '2'.            "assign 2 for select by document options
      MODIFY SCREEN.
      CONTINUE.
    ENDIF.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 15:25:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/toggle-selection-screen/m-p/2728385#M633243</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-04T15:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: Toggle selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/toggle-selection-screen/m-p/2728386#M633244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;For making obligatory off use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Loop at screen .
set the scree-required field to '1' .
modify screen.
endloop .
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 15:34:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/toggle-selection-screen/m-p/2728386#M633244</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-09-04T15:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: Toggle selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/toggle-selection-screen/m-p/2728387#M633245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you use obligatory then you need to enter values and you will able to select radio button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to use validation like if material number is initial then raise error message ,please use check in start-of-selection.&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;REPORT ZSAI1.&lt;/P&gt;&lt;P&gt;**********************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;S E L E C T I O N    S C R E E N&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;**********************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Block to display the selection  options (By Inventory or By document)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-001.&lt;/P&gt;&lt;P&gt;PARAMETERS: radio1 RADIOBUTTON GROUP rnd USER-COMMAND fcode DEFAULT 'X',&lt;/P&gt;&lt;P&gt;            radio2 RADIOBUTTON GROUP rnd.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK b2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Block to display By document options&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-002.&lt;/P&gt;&lt;P&gt;PARAMETERS:&lt;/P&gt;&lt;P&gt;           vbeln_va TYPE vbak-vbeln MODIF ID sc1, "Sales Order&lt;/P&gt;&lt;P&gt;           vbeln_vl TYPE likp-vbeln MODIF ID sc1. "Delivery Note&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK b1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Block to display By inventory options&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.&lt;/P&gt;&lt;P&gt;PARAMETERS:&lt;/P&gt;&lt;P&gt;           matnr   TYPE mara-matnr MODIF ID sc2 ,"OBLIGATORY,&lt;/P&gt;&lt;P&gt;           werks   TYPE mard-werks MODIF ID sc2 ,"OBLIGATORY,&lt;/P&gt;&lt;P&gt;           kunag   TYPE vbak-kunnr MODIF ID sc2,&lt;/P&gt;&lt;P&gt;           p_vrkme TYPE char4 AS LISTBOX VISIBLE LENGTH 10 MODIF ID sc2,&lt;/P&gt;&lt;P&gt;           negativ LIKE am07m-seneg MODIF ID sc2.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK b3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;**********************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;A T    S E L E C T I O N    S C R E E N&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;**********************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;To toggle the selection options&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;AT SELECTION-SCREEN OUTPUT.&lt;/P&gt;&lt;P&gt;  LOOP AT SCREEN.&lt;/P&gt;&lt;P&gt;    IF screen-group1 = 'SC1' AND radio1 EQ 'X'.&lt;/P&gt;&lt;P&gt;      screen-active = '0'.     "make screen invisible&lt;/P&gt;&lt;P&gt;      gv_sel = '1'.            "assign 1 for select by inventory&lt;/P&gt;&lt;P&gt;*options&lt;/P&gt;&lt;P&gt;      MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;      CONTINUE.&lt;/P&gt;&lt;P&gt;    ELSEIF screen-group1 = 'SC2' AND radio2 EQ 'X'.&lt;/P&gt;&lt;P&gt;      screen-active = '0'.     "make screen invisible&lt;/P&gt;&lt;P&gt;      gv_sel = '2'.            "assign 2 for select by document options&lt;/P&gt;&lt;P&gt;      MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;      CONTINUE.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if matnr is initial.&lt;/P&gt;&lt;P&gt;  message e001(z01).&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if werks is initial.&lt;/P&gt;&lt;P&gt;  message e001(z01).&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 15:36:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/toggle-selection-screen/m-p/2728387#M633245</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-04T15:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: Toggle selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/toggle-selection-screen/m-p/2728388#M633246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried this .. that did not work. I dont think changing screen-required will work as I tried all the combinations. &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;**********************************************************************
* A T    S E L E C T I O N    S C R E E N
**********************************************************************
* To toggle the selection options
AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF screen-group1 = 'SC1' AND radio1 EQ 'X'.
      screen-active = '0'.     "make screen invisible
      gv_sel = '1'.            "assign 1 for select by inventory options
      MODIFY SCREEN.
      CONTINUE.
    ELSEIF screen-group1 = 'SC2' AND radio2 EQ 'X'.
      screen-required = '0'.
      screen-active = '0'.     "make screen invisible
      gv_sel = '2'.            "assign 2 for select by document options
      MODIFY SCREEN.
      CONTINUE.
    ENDIF.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 15:55:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/toggle-selection-screen/m-p/2728388#M633246</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-04T15:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Toggle selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/toggle-selection-screen/m-p/2728389#M633247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Megan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you check the my reply,just keep the condition at start-of-selection,if user does not enter any value on matnr or werks,when he cliks on execute button,&lt;/P&gt;&lt;P&gt;he will get message ,if you keep obligatory then you need to enter all values in selection-screen then you will able to select radio button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you see my code then you can select radio button without entering any values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess there is no option other than this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Seshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 16:03:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/toggle-selection-screen/m-p/2728389#M633247</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-04T16:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: Toggle selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/toggle-selection-screen/m-p/2728390#M633248</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;PRE&gt;&lt;CODE&gt;
Chekc this code:

PARAMETERS: SP_CHECK AS CHECKBOX USER-COMMAND CHECK.
SELECT-OPTIONS: SO_MATNR FOR MARA-MATNR MODIF ID GRP.
 
AT SELECTION-SCREEN OUTPUT.
  IF SP_CHECK IS INITIAL.
    LOOP AT SCREEN.
      IF SCREEN-GROUP1 = 'GRP'.
        SCREEN-INPUT = '0'.
        SCREEN-OUTPUT = '1'.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
    CLEAR: SO_MATNR.
    REFRESH: SO_MATNR.
  ENDIF.
 
AT SELECTION-SCREEN ON SP_CHECK.
  PERFORM MATERIAL_CHECK.
 
FORM MATERIAL_CHECK.
 
  IF NOT SP_CHECK IS INITIAL AND SY-UCOMM = 'ONLI'.
    IF SO_MATNR[] IS INITIAL.
      LOOP AT SCREEN.
        IF SCREEN-NAME = 'SO_MATNR-LOW'.
          SCREEN-INPUT = '1'.
          SCREEN-OUTPUT = '0'.
          SCREEN-REQUIRED = '1'.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    ENDIF.
  ENDIF.
ENDFORM.                    

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 16:05:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/toggle-selection-screen/m-p/2728390#M633248</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2007-09-04T16:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: Toggle selection screen</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/toggle-selection-screen/m-p/2728391#M633249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi megan ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried removing the code...USER-COMMAND fcode DEFAULT 'X'&lt;/P&gt;&lt;P&gt;and it was ok..yet the first radio button was checked..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sampath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Sep 2007 16:06:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/toggle-selection-screen/m-p/2728391#M633249</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-04T16:06:12Z</dc:date>
    </item>
  </channel>
</rss>

