With textbox(), you can display and edit a text.
- startrow, startcol, endrow, endcol - row and column co-ordinates
You can use the following options with the textbox:
"nowordwrap":true - The text does not wrap and the user has to click Enter to start a new line.
"readonly":true - The text cannot be changed.
"textfont":"font_name" - Specifies the selected font. Default font is Arial.
""textheight":x - Sets the text height in pixels. Default height is 12.
""textweight":x - Sets the text weight. Default weight is 5 and default bold setting is 7.
Creating a textbox
In this example, we will create a textbox on the SU01 screen in SAP. To demonstrate the process of creating new textbox, please do the following:
- Go to SU01 screen.
- Open the 'SAPLSUU5.E0050.sjs' script file and enter the code from the below script. Create the file if it does not exist.
- Save the changes and refresh the SAP screen. It will display as sown below:
Tips and Tricks
Creating a Notification
The scenario provides a simplified option to create a Plant Maintenance notification. The initial screen provides users to select a notification type and enter the notification details on PM Notification screen. Then, based on the notification type selected, the final screen appears with the notification details auto populated from the Create Notification - Initial screen, as shown in the following:
Create Notification Screen - Liquid UI
Create Notification - Final Screen
Copy text between files
The copytext and textbox are employed together to copy text between files, screen areas and text variables. For example navigate to iw21 transaction and execute the following code:
Learn more about Copy text using copytext and textbox.