<?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 (Checkbox) in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-checkbox/m-p/2671796#M616927</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Siddesh,&lt;/P&gt;&lt;P&gt;please try the following sample coding:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT ZZAVVTEST .

tables: ska1.

parameters: p_check1 as checkbox user-command comm,
            p_check2 as checkbox user-command comm,
            p_check3 as checkbox user-command comm,
            p_check4 as checkbox user-command comm,
            p_check5 as checkbox user-command comm.

parameters: p_field1 like bkpf-belnr modif id cb1,
            p_field2 like t001-bukrs modif id cb1.
select-options: s_saknr for ska1-saknr modif id cb2.

at selection-screen output.
  loop at screen.
    if not p_check1 is initial.
      if screen-group1 = 'CB1'.
        screen-input = '0'.
        screen-output = '0'.
        screen-invisible = '1'.
      endif.
    else.
      if screen-group1 = 'CB1'.
        screen-input = '1'.
        screen-output = '1'.
        screen-invisible = '0'.
      endif.
    endif.

    if not p_check2 is initial.
      if screen-group1 = 'CB2' and not screen-name cp '*OPTI_PUSH*'.
        screen-input = '0'.
        screen-output = '0'.
        screen-invisible = '1'.
      endif.
    else.
      if screen-group1 = 'CB2' and not screen-name cp '*OPTI_PUSH*'.
        screen-input = '1'.
        screen-output = '1'.
        screen-invisible = '0'.
      endif.
    endif.

    modify screen.
  endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may complete it to your requirements (5 checkboxes and more fields). This is just a guideline.&lt;/P&gt;&lt;P&gt;I hope it helps. Best regards,&lt;/P&gt;&lt;P&gt;Alvaro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Aug 2007 06:10:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-22T06:10:18Z</dc:date>
    <item>
      <title>selection-screen (Checkbox)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-checkbox/m-p/2671793#M616924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently i am doing one report in which i want to  handle events through checkbox, means i am having 5 checkboxes. on clicking on perticular checkbox&lt;/P&gt;&lt;P&gt;some selection fields needs to be display.Some of the fields are common while displaying selection, so i dnt want repeat declarations..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help out of this..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2007 05:58:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-checkbox/m-p/2671793#M616924</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-22T05:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: selection-screen (Checkbox)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-checkbox/m-p/2671794#M616925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It will be hard to do that since this kind of call depends on the SCREEN-GROUP check and you cannot have some fields of the group as active and some inactive so easily.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward all helpful replies.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2007 06:03:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-checkbox/m-p/2671794#M616925</guid>
      <dc:creator>amit_khare</dc:creator>
      <dc:date>2007-08-22T06:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: selection-screen (Checkbox)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-checkbox/m-p/2671795#M616926</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;try like this,&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 screen-name = 'C1' and C1 ='X'.&lt;/P&gt;&lt;P&gt;      loop at screen.&lt;/P&gt;&lt;P&gt;              screen-required = 1. // to make  remaining check boxes as mandatory&lt;/P&gt;&lt;P&gt;               modify screen.&lt;/P&gt;&lt;P&gt;      enddloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else if screen-name = 'C2' and c2 = 'X'.&lt;/P&gt;&lt;P&gt;        loop at screen.&lt;/P&gt;&lt;P&gt;                 screen-input = 0. // to disable remaining check boxes.&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;endif.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if helpful reward some points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with regards,&lt;/P&gt;&lt;P&gt;Suresh Aluri.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2007 06:05:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-checkbox/m-p/2671795#M616926</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-22T06:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: selection-screen (Checkbox)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-checkbox/m-p/2671796#M616927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Siddesh,&lt;/P&gt;&lt;P&gt;please try the following sample coding:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT ZZAVVTEST .

tables: ska1.

parameters: p_check1 as checkbox user-command comm,
            p_check2 as checkbox user-command comm,
            p_check3 as checkbox user-command comm,
            p_check4 as checkbox user-command comm,
            p_check5 as checkbox user-command comm.

parameters: p_field1 like bkpf-belnr modif id cb1,
            p_field2 like t001-bukrs modif id cb1.
select-options: s_saknr for ska1-saknr modif id cb2.

at selection-screen output.
  loop at screen.
    if not p_check1 is initial.
      if screen-group1 = 'CB1'.
        screen-input = '0'.
        screen-output = '0'.
        screen-invisible = '1'.
      endif.
    else.
      if screen-group1 = 'CB1'.
        screen-input = '1'.
        screen-output = '1'.
        screen-invisible = '0'.
      endif.
    endif.

    if not p_check2 is initial.
      if screen-group1 = 'CB2' and not screen-name cp '*OPTI_PUSH*'.
        screen-input = '0'.
        screen-output = '0'.
        screen-invisible = '1'.
      endif.
    else.
      if screen-group1 = 'CB2' and not screen-name cp '*OPTI_PUSH*'.
        screen-input = '1'.
        screen-output = '1'.
        screen-invisible = '0'.
      endif.
    endif.

    modify screen.
  endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may complete it to your requirements (5 checkboxes and more fields). This is just a guideline.&lt;/P&gt;&lt;P&gt;I hope it helps. Best regards,&lt;/P&gt;&lt;P&gt;Alvaro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2007 06:10:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-checkbox/m-p/2671796#M616927</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-22T06:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: selection-screen (Checkbox)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-checkbox/m-p/2671797#M616928</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;create a 3 modif id's to visible one ,invisible one and common one &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and put a logic in at selection-screen output event&lt;/P&gt;&lt;P&gt;&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;if c1 = 'X'.&lt;/P&gt;&lt;P&gt;          IF SCREEN-GROUP1 = 'GRP'. FOR INVISIBLE FIELDS&lt;/P&gt;&lt;P&gt;              SCREEN-ACTIVE = '0'.&lt;/P&gt;&lt;P&gt;              MODIFY SCREEN.&lt;/P&gt;&lt;P&gt;          ENDIF.&lt;/P&gt;&lt;P&gt;          IF SCREEN-GROUP1 = 'GRP1'. FOR VISIBLE FIELDS&lt;/P&gt;&lt;P&gt;              SCREEN-ACTIVE = '1'.&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;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward points to all helpful answers &lt;/P&gt;&lt;P&gt;kiran.M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2007 06:15:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-checkbox/m-p/2671797#M616928</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-22T06:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: selection-screen (Checkbox)</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-checkbox/m-p/2671798#M616929</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 use the USER-COMAND addition while declaring the Checkbox.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg :&lt;/P&gt;&lt;P&gt;PARAMETER : val1 AS CHECKBOX DEFAULT 'X' USER-COMMAND chk.&lt;/P&gt;&lt;P&gt;PARAMETER : val2 AS CHECKBOX USER-COMMAND chk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thus you have assigned a SY-Ucomm to the checkbox, now if a user checks or unchecks the checkbox then the sy-ucomm is raised and it takes to AT SELECTION SCREEN event where you can check as to whether sy-ucomm is the command related to your User-command. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AT Selection-screen&lt;/P&gt;&lt;P&gt; if sy-ucomm = 'CHK'.&lt;/P&gt;&lt;P&gt;  perform Process_hide_unhide_logic.&lt;/P&gt;&lt;P&gt; endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the hide_unhide_logic subroutine the code as mention by others above can be written. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kanchan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Aug 2007 06:42:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-checkbox/m-p/2671798#M616929</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-22T06:42:43Z</dc:date>
    </item>
  </channel>
</rss>

