{"id":264,"date":"2022-01-23T13:45:23","date_gmt":"2022-01-23T12:45:23","guid":{"rendered":"http:\/\/www.laufzeitfehler.net\/?p=264"},"modified":"2023-01-21T15:20:04","modified_gmt":"2023-01-21T14:20:04","slug":"th_popup-ohne-anzeige-des-benutzers","status":"publish","type":"post","link":"https:\/\/www.laufzeitfehler.net\/index.php\/2022\/01\/23\/th_popup-ohne-anzeige-des-benutzers\/","title":{"rendered":"TH_POPUP ohne Anzeige des Benutzers"},"content":{"rendered":"<p>Heute mal ein eher sinnloser Tipp: Ich habe mir immer wieder mal bei etwas unerfahreren Kollegen den Spa\u00df gemacht, dass ich mit dem Funktionsbaustein &#8220;TH_POPUP&#8221; irref\u00fchrende Nachrichten auf deren Bildschirm gezaubert habe. Doch irgendwann hat SAP in die Darstellung des Popups den Benutzername hinzugef\u00fcgt, so dass der Gag damit eigentlich weg war. Doch durch Kopie des Funktionsbausteins kann man recht schnell und einfach die zus\u00e4tzlichen Zeilen entfernen und der Fuba arbeitet wieder wie fr\u00fcher &#8211; ohne den Verursacher zu verraten. \ud83d\ude09<\/p>\n<pre line=\"1\" lang=\"ABAP\"> \nFUNCTION ZTH_POPUP. \n*\"---------------------------------------------------------------------- \n*\"\n*\"Lokale Schnittstelle: \n*\" IMPORTING \n*\" VALUE(CLIENT) LIKE SY-MANDT \n*\" VALUE(USER) LIKE SY-UNAME \n*\" VALUE(MESSAGE) LIKE SM04DIC-POPUPMSG \n*\" VALUE(MESSAGE_LEN) LIKE SY-INDEX DEFAULT 0 \n*\" VALUE(CUT_BLANKS) LIKE SY-LANGU DEFAULT ' ' \n*\" EXCEPTIONS *\" USER_NOT_FOUND \n*\"---------------------------------------------------------------------- \nDATA: LOC_CUT_BLANKS LIKE TH_BOOL. \nDATA: PREFIX_MESSAGE_LEN TYPE I, LINEBREAK(512), NEW_MESSAGE(512). \nDATA: TMP(1024). \" Allow sending of a popup to oneself \nIF ( USER &lt;&gt; SY-UNAME ). \n  CALL 'C_SAPGPARAM' ID 'NAME' FIELD 'rdisp\/th_popup\/strict_check' \"#EC CI_CCALL \n                     ID 'VALUE' FIELD TMP. \n  IF SY-SUBRC = 0. \n    IF TMP = 1. \n     AUTHORITY-CHECK OBJECT 'S_ADMI_FCD' ID 'S_ADMI_FCD' FIELD 'POPU'. \n     IF SY-SUBRC &lt;&gt; 0. \n       RAISE USER_NOT_FOUND. \n     ENDIF. \n   ENDIF. \n ENDIF. \nENDIF. \n\nIF MESSAGE_LEN = 0. \n   MESSAGE_LEN = STRLEN( MESSAGE ). \nENDIF. \n\nIF CUT_BLANKS = ' '. \n  LOC_CUT_BLANKS = TH_FALSE. \nELSE. \n  LOC_CUT_BLANKS = TH_TRUE. \nENDIF. \n\nCALL 'ThUsrInfo' ID 'OPCODE' FIELD OPCODE_SEND_POP_UP \"#EC CI_CCALL  \n                 ID 'CLIENT' FIELD CLIENT \n                 ID 'USR' FIELD USER \n                 ID 'MSG' FIELD MESSAGE \n                 ID 'MSG_LEN' FIELD MESSAGE_LEN \n                 ID 'CUT_BLANKS' FIELD LOC_CUT_BLANKS. \nIF SY-SUBRC = 4. \n  RAISE USER_NOT_FOUND. \nENDIF. \n\nENDFUNCTION.<\/pre>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>Heute mal ein eher sinnloser Tipp: Ich habe mir immer wieder mal bei etwas unerfahreren Kollegen den Spa\u00df gemacht, dass ich mit dem Funktionsbaustein &#8220;TH_POPUP&#8221; <a class=\"mh-excerpt-more\" href=\"https:\/\/www.laufzeitfehler.net\/index.php\/2022\/01\/23\/th_popup-ohne-anzeige-des-benutzers\/\" title=\"TH_POPUP ohne Anzeige des Benutzers\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":399,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[86,59],"tags":[],"_links":{"self":[{"href":"https:\/\/www.laufzeitfehler.net\/index.php\/wp-json\/wp\/v2\/posts\/264"}],"collection":[{"href":"https:\/\/www.laufzeitfehler.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.laufzeitfehler.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.laufzeitfehler.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.laufzeitfehler.net\/index.php\/wp-json\/wp\/v2\/comments?post=264"}],"version-history":[{"count":2,"href":"https:\/\/www.laufzeitfehler.net\/index.php\/wp-json\/wp\/v2\/posts\/264\/revisions"}],"predecessor-version":[{"id":513,"href":"https:\/\/www.laufzeitfehler.net\/index.php\/wp-json\/wp\/v2\/posts\/264\/revisions\/513"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.laufzeitfehler.net\/index.php\/wp-json\/wp\/v2\/media\/399"}],"wp:attachment":[{"href":"https:\/\/www.laufzeitfehler.net\/index.php\/wp-json\/wp\/v2\/media?parent=264"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.laufzeitfehler.net\/index.php\/wp-json\/wp\/v2\/categories?post=264"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.laufzeitfehler.net\/index.php\/wp-json\/wp\/v2\/tags?post=264"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}