Quantcast
Channel: Jive Syndication Feed
Viewing all articles
Browse latest Browse all 11

The Standard Text Editor (OO ABAP CFW class)

$
0
0
  *Introduction*  If you want to enable users editing standard texts in extremely simple and  straightforward UI, you can use the component described in this weblog. It's a  class (OO ABAP) which pops up a CL_GUI_TOOLBAR (CFW) control which enables user to enter  text and save or close.   *Why not a standard transaction?  I had a request from a user. On a custom-made purchase order (I made it as a SmartForm) the user wanted to have a piece of freely entered text. The text should've been vendor-specific and user wanted to be able to change it from time to time. The obvious solution to me was a dynamical standard-text node in the SmartForm. The question was how to let the user edit standard text?  Stanard solution CALL TRANSACTION 'SO10' is not bad, but has drawbacks: 0.1.   0.2. Going directly to the text editor is possible by using the AND SKIP FIRST  SCREEN addition. However, returning to the calling program displays the SO10  first screen. It's one useles and irritating screen too much for the user, and one click  too much:   0.3.   0.4. Formatting options are good to have. But if they are unneccessary for some  functionality, then it's good to hide them from users. What they can't see  they can't break. Look at all the nice confuzing buttons to mess with in SO10:   0.5.   0.6. SO10 occupies the entire session screen - I can't run it in a popup (or  any desired) container 0.7.    *The new component** All in all, I wanted to  make it as simple as possible for users. Ofcourse, I wanted to make my  life easy too, by making a generic reusable OO component with simple programming  interface. So  I came up with this.  This executable little sample program...   REPORT  Z_TEST_ST_TEXT_EDITOR. DATA: o_txe     TYPE REF TO zcl_standard_text_editor,       v_caption TYPE char100,       s_thead   TYPE thead.        * call screen CALL SCREEN 0100.  * MODULE s0100_start MODULE s0100_start OUTPUT.     SET PF-STATUS 'BASIC'.     s_thead-tdname   = 'VENDOR0000000011'.     s_thead-tdid     = 'ST'.     s_thead-tdobject = 'TEXT'.     s_thead-tdspras  = sy-langu.     CONCATENATE 'Standard text:' s_thead-tdname                 INTO v_caption SEPARATED BY space.     IF o_txe IS INITIAL.        CREATE OBJECT o_txe             EXPORTING i_thead   = s_thead                       i_caption = v_caption.     ENDIF. ENDMODULE.  * MODULE s0100_exit MODULE s0100_exit INPUT.   LEAVE PROGRAM. ENDMODULE.  ...results with a popup screen: 

Viewing all articles
Browse latest Browse all 11

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>