<?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 selection-screen code error in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-code-error/m-p/1789825#M339855</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;     i am trying to code selection screen. where in when i click on 1 pushbutton one field should be active and the other one should be invisible. &lt;/P&gt;&lt;P&gt;the code is syntactically correct but when i execute it . it is not working properly .&lt;/P&gt;&lt;P&gt;i am unable to find the error . &lt;/P&gt;&lt;P&gt;so can any one plz take some time and solve it. and plzzz let me know where i was wrong. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is the code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: mat1 type mara-matnr,&lt;/P&gt;&lt;P&gt;            lif1 type lfa1-lifnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen begin of line.&lt;/P&gt;&lt;P&gt;selection-screen pushbutton: (5)   lif user-command abc,&lt;/P&gt;&lt;P&gt;                             10(5) mat user-command dec.&lt;/P&gt;&lt;P&gt;selection-screen end of line.&lt;/P&gt;&lt;P&gt;data: f_1 type i value 1,&lt;/P&gt;&lt;P&gt;      s_1 type i.&lt;/P&gt;&lt;P&gt;at selection-screen output.&lt;/P&gt;&lt;P&gt;  loop at screen.&lt;/P&gt;&lt;P&gt;    case screen-name.&lt;/P&gt;&lt;P&gt;      when 'mat1'.&lt;/P&gt;&lt;P&gt;        screen-active = f_1.&lt;/P&gt;&lt;P&gt;      when 'lif1'.&lt;/P&gt;&lt;P&gt;        screen-active = s_1.&lt;/P&gt;&lt;P&gt;    endcase.&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;at selection-screen.&lt;/P&gt;&lt;P&gt;  if sy-ucomm = 'abc'.&lt;/P&gt;&lt;P&gt;    f_1 = 1.&lt;/P&gt;&lt;P&gt;    s_1 = 0.&lt;/P&gt;&lt;P&gt;  elseif sy-ucomm = 'dec'.&lt;/P&gt;&lt;P&gt;    f_1 = 0.&lt;/P&gt;&lt;P&gt;    s_1 = 1.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Dec 2006 09:25:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-12-11T09:25:10Z</dc:date>
    <item>
      <title>selection-screen code error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-code-error/m-p/1789825#M339855</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;     i am trying to code selection screen. where in when i click on 1 pushbutton one field should be active and the other one should be invisible. &lt;/P&gt;&lt;P&gt;the code is syntactically correct but when i execute it . it is not working properly .&lt;/P&gt;&lt;P&gt;i am unable to find the error . &lt;/P&gt;&lt;P&gt;so can any one plz take some time and solve it. and plzzz let me know where i was wrong. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is the code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: mat1 type mara-matnr,&lt;/P&gt;&lt;P&gt;            lif1 type lfa1-lifnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;selection-screen begin of line.&lt;/P&gt;&lt;P&gt;selection-screen pushbutton: (5)   lif user-command abc,&lt;/P&gt;&lt;P&gt;                             10(5) mat user-command dec.&lt;/P&gt;&lt;P&gt;selection-screen end of line.&lt;/P&gt;&lt;P&gt;data: f_1 type i value 1,&lt;/P&gt;&lt;P&gt;      s_1 type i.&lt;/P&gt;&lt;P&gt;at selection-screen output.&lt;/P&gt;&lt;P&gt;  loop at screen.&lt;/P&gt;&lt;P&gt;    case screen-name.&lt;/P&gt;&lt;P&gt;      when 'mat1'.&lt;/P&gt;&lt;P&gt;        screen-active = f_1.&lt;/P&gt;&lt;P&gt;      when 'lif1'.&lt;/P&gt;&lt;P&gt;        screen-active = s_1.&lt;/P&gt;&lt;P&gt;    endcase.&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;at selection-screen.&lt;/P&gt;&lt;P&gt;  if sy-ucomm = 'abc'.&lt;/P&gt;&lt;P&gt;    f_1 = 1.&lt;/P&gt;&lt;P&gt;    s_1 = 0.&lt;/P&gt;&lt;P&gt;  elseif sy-ucomm = 'dec'.&lt;/P&gt;&lt;P&gt;    f_1 = 0.&lt;/P&gt;&lt;P&gt;    s_1 = 1.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2006 09:25:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-code-error/m-p/1789825#M339855</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-11T09:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: selection-screen code error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-code-error/m-p/1789826#M339856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check my sample code :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
PARAMETERS     : p_file LIKE rlgrap-filename MODIF ID sim.

AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
      IF screen-group1 = 'SIM'.
        screen-active = '0'.
      ENDIF.
      MODIFY SCREEN.
    ENDLOOP.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Moreover I think u should have a problem because "AT SELECTION-SCREEN" statement is executed after the "AT SELECTION-SCREEN OUTPUT"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erwan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Erwan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2006 09:29:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-code-error/m-p/1789826#M339856</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-11T09:29:01Z</dc:date>
    </item>
    <item>
      <title>Re: selection-screen code error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-code-error/m-p/1789827#M339857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I think you can go with screen-input = 0 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward Points if it is help ful to you&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;kiran I&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2006 09:31:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-code-error/m-p/1789827#M339857</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-11T09:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: selection-screen code error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-code-error/m-p/1789828#M339858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;first declare &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables : sscrfields.&lt;/P&gt;&lt;P&gt;data: f_1(1)  value '1',&lt;/P&gt;&lt;P&gt;        s_1(1) value '0'.&lt;/P&gt;&lt;P&gt;there is nothing to be changed in at selection-screen output&lt;/P&gt;&lt;P&gt;now in &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;at selection-screen.&lt;/P&gt;&lt;P&gt;if sscrfields-ucomm = 'abc'.&lt;/P&gt;&lt;P&gt;f_1 = '1'.&lt;/P&gt;&lt;P&gt;s_1 = '0'.&lt;/P&gt;&lt;P&gt;elseif sscrfields-ucomm = 'dec'.&lt;/P&gt;&lt;P&gt;f_1 = '0'.&lt;/P&gt;&lt;P&gt;s_1 = '1'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2006 09:34:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-code-error/m-p/1789828#M339858</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-11T09:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: selection-screen code error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-code-error/m-p/1789829#M339859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;Hi amar,

  I had modified ur code , chk this , In the quotes u have to give upper case


REPORT YCHATEST LINE-SIZE 350.

PARAMETERS: MAT1 TYPE MARA-MATNR,
LIF1 TYPE LFA1-LIFNR.


SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN PUSHBUTTON: (5) LIF USER-COMMAND ABC,
10(5) MAT USER-COMMAND DEC.
SELECTION-SCREEN END OF LINE.
DATA: F_1 TYPE I VALUE 1,
S_1 TYPE I.

AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    CASE SCREEN-NAME.
      WHEN 'MAT1'.
        SCREEN-ACTIVE = F_1.
      WHEN 'LIF1'.
        SCREEN-ACTIVE = S_1.
    ENDCASE.
    MODIFY SCREEN.
  ENDLOOP.

AT SELECTION-SCREEN.
  IF SY-UCOMM = 'ABC'.
    F_1 = 1.
    S_1 = 0.
  ELSEIF SY-UCOMM = 'DEC'.
    F_1 = 0.
    S_1 = 1.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2006 09:35:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-code-error/m-p/1789829#M339859</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-11T09:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: selection-screen code error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-code-error/m-p/1789830#M339860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;at selection-screen.&lt;/P&gt;&lt;P&gt;if sy-ucomm = 'abc'. write capital abc and check it out&lt;/P&gt;&lt;P&gt;f_1 = 1.&lt;/P&gt;&lt;P&gt;s_1 = 0.&lt;/P&gt;&lt;P&gt;elseif sy-ucomm = 'dec'.&lt;/P&gt;&lt;P&gt;f_1 = 0.&lt;/P&gt;&lt;P&gt;s_1 = 1.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;USE CAPITAL LETTERS WITHIN QUOTES.&lt;/P&gt;&lt;P&gt;TO MAKE IT READ ONLY YOU CAN GO WITH SCREEN-INPUT = 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Manoharsairam Kavuri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2006 09:35:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-code-error/m-p/1789830#M339860</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-11T09:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: selection-screen code error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-code-error/m-p/1789831#M339861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try the following codes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: mat1 TYPE mara-matnr,&lt;/P&gt;&lt;P&gt;lif1 TYPE lfa1-lifnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF LINE.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN PUSHBUTTON: (5) lif USER-COMMAND abc,&lt;/P&gt;&lt;P&gt;                           10(5) mat USER-COMMAND dec.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: f_1 TYPE i VALUE 1,&lt;/P&gt;&lt;P&gt;s_1 TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&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-name CS 'MAT1'.&lt;/P&gt;&lt;P&gt;      screen-input = f_1.&lt;/P&gt;&lt;P&gt;    ELSEIF screen-name CS  'LIF1'.&lt;/P&gt;&lt;P&gt;      screen-input = s_1.&lt;/P&gt;&lt;P&gt;    ENDIF.&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;AT SELECTION-SCREEN.&lt;/P&gt;&lt;P&gt;  IF sy-ucomm = 'ABC'.&lt;/P&gt;&lt;P&gt;    f_1 = 1.&lt;/P&gt;&lt;P&gt;    s_1 = 0.&lt;/P&gt;&lt;P&gt;  ELSEIF sy-ucomm = 'DEC'.&lt;/P&gt;&lt;P&gt;    f_1 = 0.&lt;/P&gt;&lt;P&gt;    s_1 = 1.&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;Regards,&lt;/P&gt;&lt;P&gt;Hendy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2006 09:36:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-code-error/m-p/1789831#M339861</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-11T09:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: selection-screen code error</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-code-error/m-p/1789832#M339862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;your cording is ok dear, its working properly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where you want to active fields, its not apper.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Dec 2006 09:37:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-code-error/m-p/1789832#M339862</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-12-11T09:37:45Z</dc:date>
    </item>
  </channel>
</rss>

