<?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: Mandatory fields in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-mandatory-fields/m-p/5980985#M1340840</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the program still requires slight correction. Please find the below code and help.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  ztest_prg.

TABLES : estrh, plko.
DATA : c_speci TYPE c,
       c_insp  TYPE c.

SELECTION-SCREEN: BEGIN OF BLOCK bal WITH FRAME TITLE txt3.
PARAMETERS: rb_speci  RADIOBUTTON GROUP rd1 . "USER-COMMAND abc
PARAMETERS: rb_inspl RADIOBUTTON GROUP rd1  DEFAULT 'X'.
SELECTION-SCREEN: END OF BLOCK bal.

SELECTION-SCREEN: BEGIN OF BLOCK val WITH FRAME TITLE txt1.
SELECT-OPTIONS  : s_specif FOR estrh-subid OBLIGATORY MODIF ID r1.
SELECT-OPTIONS  : s_plant  FOR plko-werks MODIF ID r1 .
PARAMETER       : p_chgnum TYPE aenr-aennr MODIF ID r1.
SELECTION-SCREEN: END OF BLOCK val.

SELECTION-SCREEN: BEGIN OF BLOCK upd WITH FRAME TITLE txt2.
SELECT-OPTIONS: s_insp FOR plko-plnnr  OBLIGATORY MODIF ID r2.
SELECT-OPTIONS: s_plan  FOR plko-werks  MODIF ID r2.
PARAMETERS:     p_chgn TYPE aenr-aennr MODIF ID r2.
SELECTION-SCREEN: END OF BLOCK upd.

INITIALIZATION.
  txt1 = 'Specifications'.
  txt2 = 'Inspection Plans'.
  txt3 = 'Selection'.

AT SELECTION-SCREEN OUTPUT.
  IF rb_speci = 'X'.


    LOOP AT SCREEN.
      IF screen-group1 = 'R1'.
        screen-active = 1.
      IF screen-name = 'S_SPECIF'.
       screen-required = '2'.
      ENDIF.
        MODIFY SCREEN.
      ENDIF.
      IF screen-group1 = 'R2'.
        screen-active = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.

  ELSEIF

  rb_inspl = 'X'.

  REFRESH screen.
  MODIFY SCREEN.

    LOOP AT SCREEN.
      IF screen-group1 = 'R2'.
        screen-active = 1.
        MODIFY SCREEN.
      ENDIF.
      IF screen-group1 = 'R1'.
        IF screen-name = 'S_SPECIF'.
      screen-required = '1'.
*      MODIFY SCREEN.
    ENDIF.
        screen-active = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.



START-OF-SELECTION.
  PERFORM f_validation.
  IF rb_speci = 'X'.
    CHECK  c_speci IS INITIAL.
  ENDIF.
  IF rb_inspl = 'X'.
    CHECK  c_insp IS INITIAL.
  ENDIF.

  WRITE:/10(10) 'ITS DONE'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Aug 2009 06:53:03 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-08-14T06:53:03Z</dc:date>
    <item>
      <title>Selection screen: Mandatory fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-mandatory-fields/m-p/5980972#M1340827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;As we all know, If the fields in a selection screen are mandatory, there will be a small tick box inside that field. Suppose if a field is not mandatory(obligatory), can we still push a tick box symbol to those fields. Is there a way to push the mandatory symbol into non-mandatory fields??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 04:35:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-mandatory-fields/m-p/5980972#M1340827</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-14T04:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: Selection screen: Mandatory fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-mandatory-fields/m-p/5980973#M1340828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;nope.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;why do you want to do that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 04:36:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-mandatory-fields/m-p/5980973#M1340828</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2009-08-14T04:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: Selection screen: Mandatory fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-mandatory-fields/m-p/5980974#M1340829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thats a weird requirement. So you mean you just want to display a field as obligatory but not mandatory in real?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 04:40:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-mandatory-fields/m-p/5980974#M1340829</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-14T04:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: Selection screen: Mandatory fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-mandatory-fields/m-p/5980975#M1340830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Functional designer's requirement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 05:12:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-mandatory-fields/m-p/5980975#M1340830</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-14T05:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: Selection screen: Mandatory fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-mandatory-fields/m-p/5980976#M1340831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Functional designer's requirement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 05:13:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-mandatory-fields/m-p/5980976#M1340831</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-14T05:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: Selection screen: Mandatory fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-mandatory-fields/m-p/5980977#M1340832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wiered...Let the designer know that your a programmer not a magician &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 05:21:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-mandatory-fields/m-p/5980977#M1340832</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2009-08-14T05:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: Selection screen: Mandatory fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-mandatory-fields/m-p/5980978#M1340833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vishnu,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is not possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we can actualy make a field mandatory with out using 'OBLIGATORY' key word, by adding validation on field like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF field Is INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Message .....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but we cant add tick mark in the field without using 'OBLIGATORY' key work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raj Gupta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 05:28:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-mandatory-fields/m-p/5980978#M1340833</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-14T05:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: Selection screen: Mandatory fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-mandatory-fields/m-p/5980979#M1340834</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;this is not good requirement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;still u can try the following logic&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create a check box and assign a user command for it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when we change the value of that field in at selection screen event will be trigered&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in that loop at screen table and change the required field to 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i didnt tried this logic. Seems it will work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you have another optio like doing it in program&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;by giving condition.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 05:31:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-mandatory-fields/m-p/5980979#M1340834</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-14T05:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: Selection screen: Mandatory fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-mandatory-fields/m-p/5980980#M1340835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the requirement is misunderstood. &lt;/P&gt;&lt;P&gt;Vishnu , The mandatory check in requirement may be context specific i.e. The field is set mandatory based on the value of some other influencing fields.&lt;/P&gt;&lt;P&gt;If thats the case,you can change the property by loop at screen.endloop. in at selection screen output event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we cannot have an optional filed with mandatory property.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;AJR&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 05:41:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-mandatory-fields/m-p/5980980#M1340835</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-14T05:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: Selection screen: Mandatory fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-mandatory-fields/m-p/5980981#M1340836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;IF rb_speci = 'X'.


    LOOP AT SCREEN.
      IF screen-group1 = 'R1'.
        screen-active = 1.
        screen-display_3d = 1.
        screen-value_help  = 1.
        screen-request  = 1.
        screen-values_in_combo  = 0.
        screen-color  = 100.
        MODIFY SCREEN.
      ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea which field i have to change?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 06:24:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-mandatory-fields/m-p/5980981#M1340836</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-14T06:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: Selection screen: Mandatory fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-mandatory-fields/m-p/5980982#M1340837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;IF rb_speci = 'X'.


    LOOP AT SCREEN.
      IF screen-group1 = 'R1'.
        screen-active = 1.
        screen-display_3d = 1.
        screen-value_help  = 1.
        screen-request  = 1.
        screen-values_in_combo  = 0.
        screen-color  = 100.
        MODIFY SCREEN.
      ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea which field i have to change?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 06:25:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-mandatory-fields/m-p/5980982#M1340837</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-14T06:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: Selection screen: Mandatory fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-mandatory-fields/m-p/5980983#M1340838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;PARAMETER p_field TYPE char10.

AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF screen-name = 'P_FIELD'.
      screen-required = '2'.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 06:39:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-mandatory-fields/m-p/5980983#M1340838</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-14T06:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: Selection screen: Mandatory fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-mandatory-fields/m-p/5980984#M1340839</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;change the requird field to 0&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 06:42:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-mandatory-fields/m-p/5980984#M1340839</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-14T06:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: Selection screen: Mandatory fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-mandatory-fields/m-p/5980985#M1340840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the program still requires slight correction. Please find the below code and help.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT  ztest_prg.

TABLES : estrh, plko.
DATA : c_speci TYPE c,
       c_insp  TYPE c.

SELECTION-SCREEN: BEGIN OF BLOCK bal WITH FRAME TITLE txt3.
PARAMETERS: rb_speci  RADIOBUTTON GROUP rd1 . "USER-COMMAND abc
PARAMETERS: rb_inspl RADIOBUTTON GROUP rd1  DEFAULT 'X'.
SELECTION-SCREEN: END OF BLOCK bal.

SELECTION-SCREEN: BEGIN OF BLOCK val WITH FRAME TITLE txt1.
SELECT-OPTIONS  : s_specif FOR estrh-subid OBLIGATORY MODIF ID r1.
SELECT-OPTIONS  : s_plant  FOR plko-werks MODIF ID r1 .
PARAMETER       : p_chgnum TYPE aenr-aennr MODIF ID r1.
SELECTION-SCREEN: END OF BLOCK val.

SELECTION-SCREEN: BEGIN OF BLOCK upd WITH FRAME TITLE txt2.
SELECT-OPTIONS: s_insp FOR plko-plnnr  OBLIGATORY MODIF ID r2.
SELECT-OPTIONS: s_plan  FOR plko-werks  MODIF ID r2.
PARAMETERS:     p_chgn TYPE aenr-aennr MODIF ID r2.
SELECTION-SCREEN: END OF BLOCK upd.

INITIALIZATION.
  txt1 = 'Specifications'.
  txt2 = 'Inspection Plans'.
  txt3 = 'Selection'.

AT SELECTION-SCREEN OUTPUT.
  IF rb_speci = 'X'.


    LOOP AT SCREEN.
      IF screen-group1 = 'R1'.
        screen-active = 1.
      IF screen-name = 'S_SPECIF'.
       screen-required = '2'.
      ENDIF.
        MODIFY SCREEN.
      ENDIF.
      IF screen-group1 = 'R2'.
        screen-active = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.

  ELSEIF

  rb_inspl = 'X'.

  REFRESH screen.
  MODIFY SCREEN.

    LOOP AT SCREEN.
      IF screen-group1 = 'R2'.
        screen-active = 1.
        MODIFY SCREEN.
      ENDIF.
      IF screen-group1 = 'R1'.
        IF screen-name = 'S_SPECIF'.
      screen-required = '1'.
*      MODIFY SCREEN.
    ENDIF.
        screen-active = 0.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.



START-OF-SELECTION.
  PERFORM f_validation.
  IF rb_speci = 'X'.
    CHECK  c_speci IS INITIAL.
  ENDIF.
  IF rb_inspl = 'X'.
    CHECK  c_insp IS INITIAL.
  ENDIF.

  WRITE:/10(10) 'ITS DONE'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 06:53:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/selection-screen-mandatory-fields/m-p/5980985#M1340840</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-14T06:53:03Z</dc:date>
    </item>
  </channel>
</rss>

