Description
There is existing long text in the Editor. We want to add a line either at the top of the existing long text or at the bottom of the existing long text. There are two different approaches on how to cover both scenarios.
Applies to
Transaction 10x, Studio 11x, Studio 12x.
Solution
There is an existing Long Text in the Editor. We want to add a new line at the bottom. Example => existing line Thursday, new line Friday at the bottom.
1. Go to the Editor by clicking the below icon.
3. To add the line at the bottom (Friday), we will need to position the cursor on the third line during the recording and press Enter.
4. Fill in the third line with the new Text and save the recording.
5. Below is an example of the recorded script.
6. As we can see the cursor is positioned on the second line when we press Enter.
7. Important note : during the Debug mode cursor is positioned at the end of the line 02 and when we click Enter, it is going to the next line 03, filling it in with the new text and it doesn't overwrite the second line. However, during the Run mode cursor is positioned at the beginning of the line 02 and when we click Enter, it is moving the whole line down and as a result it overwrites the text leaving the second line blank and the third line with the value Friday.
Debug Mode (correct result)
Run Mode (not correct result)
8. To avoid the second line being moved down and being overwritten, we need to change the position of the cursor in our mapping to the line 03 as shown below.
9. The script will be now working successfully in the Run Mode.
There is an existing Long Text in the Editor. We want to add a new line at the top. Example => existing line Thursday, new line Wednesday at the top.
1. Go to the Editor by clicking the below icon.
2. As per SAP configuration, the first line (Thursday) is considered as the second line.
3. To add the line at the top (Wednesday), we will need to position the cursor at the beginning of the second line during the recording and press Enter. This will create a new line at the top.
4. Fill in a newly created second line with the new Text and save the recording.
5. Below is an example of the recorded script.
6. Important note : the script will be working successfully in the Run Mode because the cursor is positioned at the beginning of the second line. When Enter is pressed, it moves the entire line 02 down to the line 03 allowing us to fill in the second line which was emptied out. However, during the Debug mode the cursor is positioned at the end of the line 02. When we press Enter, the cursor will be moved to the third line and the script will overwrite the second line.
Run Mode (correct result)
Debug Mode (not correct result)
7. There is no need to update the script as per step 8 in the scenario when we add a new line at the bottom as in the Run Mode the script is working successfully.
Comments
0 comments
Please sign in to leave a comment.