{"id":834,"date":"2013-11-17T12:16:54","date_gmt":"2013-11-17T11:16:54","guid":{"rendered":"http:\/\/oprsteny.cz\/?p=834"},"modified":"2013-11-17T18:56:01","modified_gmt":"2013-11-17T17:56:01","slug":"abap-how-to-disable-functions-instead-of-hiding-them-in-a-screen","status":"publish","type":"post","link":"https:\/\/oprsteny.cz\/?p=834","title":{"rendered":"Dynpro &#8211; How to disable functions instead of hiding them in a screen"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"358\" data-permalink=\"https:\/\/oprsteny.cz\/?attachment_id=358\" data-orig-file=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/SAP.jpg\" data-orig-size=\"44,50\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Picasa&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1365690880&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"SAP\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/SAP.jpg\" class=\"alignleft size-full wp-image-358\" alt=\"SAP\" src=\"http:\/\/oprsteny.cz\/wp-content\/uploads\/SAP.jpg\" width=\"44\" height=\"50\" \/>If you need to manipulate with a screen dynamically, sometimes you need to enable\/disable some functions\/buttons in the toolbar. Standard exclusion of function when setting PF-STATUS will by default hide the excluded functions. But what if you want to display them, but just in disabled state ?<!--more--><\/p>\n<p>In the following picture you can see the screen without any function deactivated<\/p>\n<p><a href=\"http:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_01.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"836\" data-permalink=\"https:\/\/oprsteny.cz\/?attachment_id=836\" data-orig-file=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_01.png\" data-orig-size=\"525,157\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"All functions\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_01.png\" class=\"size-medium wp-image-836 alignnone\" alt=\"All functions\" src=\"http:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_01-300x89.png\" width=\"300\" height=\"89\" srcset=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_01-300x89.png 300w, https:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_01-500x149.png 500w, https:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_01.png 525w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Here&#8217;s the sample code of a screen PBO module where we exclude some functions<\/p>\n<pre lang=\"abap\">MODULE pbo OUTPUT.\r\n  DATA:\r\n    lt_ucomm TYPE TABLE OF sy-ucomm.\r\n\r\n  FIELD-SYMBOLS:\r\n    &lt;fs_ucomm&gt; TYPE sy-ucomm.\r\n\r\n  CLEAR lt_ucomm[].\r\n\r\n  APPEND INITIAL LINE TO lt_ucomm ASSIGNING &lt;fs_ucomm&gt;.\r\n  &lt;fs_ucomm&gt; = 'REFRESH'.\r\n\r\n  SET PF-STATUS 'MY_PF_STATUS' EXCLUDING lt_ucomm.\r\n\r\n* ... futher code  \r\nENDMODULE.<\/pre>\n<p>The output of screen will now be following:<\/p>\n<p><a href=\"http:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_02.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"837\" data-permalink=\"https:\/\/oprsteny.cz\/?attachment_id=837\" data-orig-file=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_02.png\" data-orig-size=\"375,158\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"Function excluded\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_02.png\" class=\"size-medium wp-image-837 alignnone\" alt=\"Function excluded\" src=\"http:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_02-300x126.png\" width=\"300\" height=\"126\" srcset=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_02-300x126.png 300w, https:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_02.png 375w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>If you prefer the excluded functions to be just disabled but visible, you have to modify the PF-STATUS Application toolbar attributes:<\/p>\n<p><a href=\"http:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_03.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"838\" data-permalink=\"https:\/\/oprsteny.cz\/?attachment_id=838\" data-orig-file=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_03.png\" data-orig-size=\"569,506\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"Attributes of Application toolbar\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_03.png\" class=\"size-medium wp-image-838 alignnone\" alt=\"Attributes of Application toolbar\" src=\"http:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_03-300x266.png\" width=\"300\" height=\"266\" srcset=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_03-300x266.png 300w, https:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_03-337x300.png 337w, https:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_03.png 569w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>and select &#8220;Display all&#8221; option.<\/p>\n<p><a href=\"http:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_04.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"839\" data-permalink=\"https:\/\/oprsteny.cz\/?attachment_id=839\" data-orig-file=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_04.png\" data-orig-size=\"454,210\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"&amp;#8220;Display all&amp;#8221; attribute\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_04.png\" class=\"size-medium wp-image-839 alignnone\" alt=\"&quot;Display all&quot; attribute\" src=\"http:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_04-300x138.png\" width=\"300\" height=\"138\" srcset=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_04-300x138.png 300w, https:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_04.png 454w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Now the screen output will look like this<\/p>\n<p><a href=\"http:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_05.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"840\" data-permalink=\"https:\/\/oprsteny.cz\/?attachment_id=840\" data-orig-file=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_05.png\" data-orig-size=\"429,159\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"Function disabled\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_05.png\" class=\"size-medium wp-image-840 alignnone\" alt=\"Function disabled\" src=\"http:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_05-300x111.png\" width=\"300\" height=\"111\" srcset=\"https:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_05-300x111.png 300w, https:\/\/oprsteny.cz\/wp-content\/uploads\/ALV_FUNCTIONS_05.png 429w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you need to manipulate with a screen dynamically, sometimes you need to enable\/disable some functions\/buttons in the toolbar. Standard exclusion of function when setting PF-STATUS will by default hide the excluded functions. But what if you want to display &hellip; <a href=\"https:\/\/oprsteny.cz\/?p=834\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[16,9,222],"tags":[446,223,225,224],"class_list":["post-834","post","type-post","status-publish","format-standard","hentry","category-abap","category-development","category-dynpro","tag-abap","tag-application-toolbar","tag-exclude-function","tag-pf-status"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3nYbe-ds","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/oprsteny.cz\/index.php?rest_route=\/wp\/v2\/posts\/834","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oprsteny.cz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oprsteny.cz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oprsteny.cz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oprsteny.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=834"}],"version-history":[{"count":4,"href":"https:\/\/oprsteny.cz\/index.php?rest_route=\/wp\/v2\/posts\/834\/revisions"}],"predecessor-version":[{"id":857,"href":"https:\/\/oprsteny.cz\/index.php?rest_route=\/wp\/v2\/posts\/834\/revisions\/857"}],"wp:attachment":[{"href":"https:\/\/oprsteny.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=834"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oprsteny.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=834"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oprsteny.cz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=834"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}