<?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 Default parameter value if tcode is value in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/default-parameter-value-if-tcode-is-value/m-p/14038920#M2038727</link>
    <description>&lt;P&gt;Hi!&lt;BR /&gt;&lt;BR /&gt;I have a program that is used for two t-codes, and for a few of the parameters, the user wants to put the value to TRUE, but only for one of the t-codes.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;So far, I have something along the lines of this in the selection screen:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="abap"&gt;  SELECTION-SCREEN BEGIN OF BLOCK b5 WITH FRAME TITLE TEXT-t06.
    PARAMETERS p_param TYPE param. 
  SELECTION-SCREEN END OF BLOCK b5.

AT SELECTION-SCREEN OUTPUT.
  IF sy-tcode = 'T_CODE'
    LOOP AT SCREEN INTO ls_screen.
CASE ls_screen-name.
        WHEN 'P_PARAM'.
          p_param = 'X'.
          MODIFY SCREEN FROM ls_screen.
    ENDLOOP.
ENDCASE. &lt;/LI-CODE&gt;&lt;P&gt;But when I debug it, I see that even if I set the parameter to FALSE, in the debugger it sets it to TRUE again. Does anyone know how to deal with this? Or would the only option be making a whole new screen?&amp;nbsp;&lt;BR /&gt;&lt;!-- StartFragment  --&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 10 Mar 2025 13:10:06 GMT</pubDate>
    <dc:creator>RomyA</dc:creator>
    <dc:date>2025-03-10T13:10:06Z</dc:date>
    <item>
      <title>Default parameter value if tcode is value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/default-parameter-value-if-tcode-is-value/m-p/14038920#M2038727</link>
      <description>&lt;P&gt;Hi!&lt;BR /&gt;&lt;BR /&gt;I have a program that is used for two t-codes, and for a few of the parameters, the user wants to put the value to TRUE, but only for one of the t-codes.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;So far, I have something along the lines of this in the selection screen:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="abap"&gt;  SELECTION-SCREEN BEGIN OF BLOCK b5 WITH FRAME TITLE TEXT-t06.
    PARAMETERS p_param TYPE param. 
  SELECTION-SCREEN END OF BLOCK b5.

AT SELECTION-SCREEN OUTPUT.
  IF sy-tcode = 'T_CODE'
    LOOP AT SCREEN INTO ls_screen.
CASE ls_screen-name.
        WHEN 'P_PARAM'.
          p_param = 'X'.
          MODIFY SCREEN FROM ls_screen.
    ENDLOOP.
ENDCASE. &lt;/LI-CODE&gt;&lt;P&gt;But when I debug it, I see that even if I set the parameter to FALSE, in the debugger it sets it to TRUE again. Does anyone know how to deal with this? Or would the only option be making a whole new screen?&amp;nbsp;&lt;BR /&gt;&lt;!-- StartFragment  --&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 13:10:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/default-parameter-value-if-tcode-is-value/m-p/14038920#M2038727</guid>
      <dc:creator>RomyA</dc:creator>
      <dc:date>2025-03-10T13:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: Default parameter value if tcode is value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/default-parameter-value-if-tcode-is-value/m-p/14039043#M2041342</link>
      <description>&lt;P&gt;In this case you are not trying to modify the selection screen. You are only filling default values.&lt;/P&gt;&lt;P&gt;Use "INITIALIZATION" instead&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="abap"&gt;INITIALIZATION.
IF sy-tcode = 'T_CODE'    
    p_param = abap_true.    
ENDIF. &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 14:59:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/default-parameter-value-if-tcode-is-value/m-p/14039043#M2041342</guid>
      <dc:creator>FabioPagoti</dc:creator>
      <dc:date>2025-03-10T14:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: Default parameter value if tcode is value</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/default-parameter-value-if-tcode-is-value/m-p/14039139#M2041343</link>
      <description>&lt;P&gt;You put our code in the PBO, AT SELECTION-SCREEN OUTPUT, so if user press Enter, your code will be executed again, if they uncheck the field and press Execute (F8, F9) their value will be correct, but reset by your code as soon the initial selection-screen is displayed.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;So move your code to INITIALIZATION or LOAD-OF-PROGRAM block, so code only executed at start&lt;BR /&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="loiod28510ea1e4a45639308eac09d7efdfd_LowRes.png" style="width: 999px;"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/235133i384802AA9B6C90CF/image-size/large?v=v2&amp;amp;px=999" role="button" title="loiod28510ea1e4a45639308eac09d7efdfd_LowRes.png" alt="loiod28510ea1e4a45639308eac09d7efdfd_LowRes.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 15:34:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/default-parameter-value-if-tcode-is-value/m-p/14039139#M2041343</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2025-03-10T15:34:07Z</dc:date>
    </item>
  </channel>
</rss>

