{"id":7356,"date":"2025-08-03T14:36:24","date_gmt":"2025-08-03T09:06:24","guid":{"rendered":"https:\/\/www.sapewmhelp.com\/?question=difference-between-selection-screen-output-and-at-selection"},"modified":"2025-08-03T14:36:24","modified_gmt":"2025-08-03T09:06:24","slug":"difference-between-selection-screen-output-and-at-selection","status":"publish","type":"question","link":"https:\/\/www.sapewmhelp.com\/?question=difference-between-selection-screen-output-and-at-selection","title":{"rendered":"Difference between selection screen output and at selection?"},"content":{"rendered":"<h3 data-start=\"124\" data-end=\"159\"><code>AT SELECTION-SCREEN OUTPUT<\/code><\/h3>\n<p><strong>Purpose:<\/strong><br \/>This event is triggered <strong>before the selection screen is displayed<\/strong> to the user.<\/p>\n<p><strong>Use Case:<\/strong><br \/>To modify the selection screen dynamically \u2014 for example, to hide\/show fields, enable\/disable them, or set default values based on conditions.<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>AT SELECTION-SCREEN OUTPUT.\r\nLOOP AT SCREEN.\r\nIF p_radio1 = 'X'.\r\nIF screen-name = 'P_FIELD2'.\r\nscreen-active = '0'. \"Disable the field\r\nMODIFY SCREEN.\r\nENDIF.\r\nENDIF.\r\nENDLOOP.<\/code><\/pre>\n<h3 data-start=\"661\" data-end=\"689\"><code>AT SELECTION-SCREEN<\/code><\/h3>\n<p><strong>Purpose:<\/strong><br \/>This event is triggered <strong>after the user has entered data<\/strong> and pressed <strong>Enter or Execute<\/strong>.<\/p>\n<p><strong>Use Case:<\/strong><br \/>Used for <strong>input validation<\/strong> and <strong>custom checks<\/strong> on user input before the report proceeds.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<div class=\"contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary\">\n<div class=\"overflow-y-auto p-4\">\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-html\" data-lang=\"HTML\"><code>AT SELECTION-SCREEN.\r\nIF p_date &lt; sy-datum.\r\nMESSAGE 'Date cannot be in the past' TYPE 'E'.\r\nENDIF.\r\n<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","question-category":[158],"question_tags":[178,213,177,275],"class_list":["post-7356","question","type-question","status-publish","hentry","question-category-abap","question_tags-abap","question_tags-reports","question_tags-sap","question_tags-selectionscreen"],"_links":{"self":[{"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=\/wp\/v2\/question\/7356","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=\/wp\/v2\/question"}],"about":[{"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=\/wp\/v2\/types\/question"}],"author":[{"embeddable":true,"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7356"}],"wp:attachment":[{"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7356"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fquestion-category&post=7356"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/www.sapewmhelp.com\/index.php?rest_route=%2Fwp%2Fv2%2Fquestion_tags&post=7356"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}