The page to bottom and page down, then enter a text line at the very end, and finally hitting enter in between which moves the line up. It's best for adding text to the end, but works with new text, too. But you can leave this aside and keep the option that works best for you.
Precisely Software Inc.
Original Message:
Sent: 03-27-2023 07:08
From: Michael Lund
Subject: IA06 load Operation long texts
Hi Sigrid
Thank you for your advise.
Your first option with having all the Line (F6) steps first and then all the Text editor text lines afterwards did the trick. When I add a Tag column line in front of each Text editor line and populate the respective columns with / I can add blank lines between populated lines and by leaving the tag columns blank after last real text line I can avoid using If Condition. The script still accepts to load less than maximum number of lines without creating blank lines up to maximum number after last line with text.
I did not completely understand you second option with page to bottom and page down. I could not find the right sequence of keying in the information during recordning.
But the first option works for me
Br Michael
------------------------------
Michael Lund
Novo Nordisk A/S
Original Message:
Sent: 03-24-2023 10:11
From: Sigrid Kok
Subject: IA06 load Operation long texts
Hi Michael
When recording long text this way I either
(1) hit the LINE button to insert a fixed number of lines and then map those
or
(2) I do a page to the bottom and page down, then add the line at the very bottom and hit enter - it moves the text up.
Both ways ensure you don't overwrite previous entries
HTH,
Sigrid
------------------------------
Sigrid Kok
Precisely Software Inc.
Original Message:
Sent: 03-24-2023 09:29
From: Michael Lund
Subject: IA06 load Operation long texts
Correction:
It should have said:
...(Where x represent the line number of the long text)
------------------------------
Michael Lund
Novo Nordisk A/S
Original Message:
Sent: 03-24-2023 09:27
From: Michael Lund
Subject: IA06 load Operation long texts
Hi Sigrid
Thank you for your suggestions.
If I surround each block of
ctxtRSTXT-TXPARGRAPH[0,x].text
txtRSTXT-TXLINE[2,x].text
btn[6].press()
(Where x represent the line number in the script)
with an IF statement checking the tag column, it works fine. By using the tag column I can even insert intended empty lines between populated lines.
I am not sure I understand by nesting. I get to think of nested loop, but that works vertically, whereas the columns with text are horizontal
Regardless of IF statements, it is really hard to control the placement of the lines. I have tried many combinations and sequences of the steps mentioned above. I also tried including a step: txtRSTXT-TXLINE[2,3].setFocus() in combination with the former, but either the scripts inserts and delete again the first line or keep the first line and/or overwrites the second line with the third. , but I will keep experimenting with the steps.
Br Michael
------------------------------
Michael Lund
Novo Nordisk A/S
Original Message:
Sent: 03-23-2023 15:26
From: Sigrid Kok
Subject: IA06 load Operation long texts
Hi Michael
Please consider using an IF statement. If the column text not blank, upload it (and include any navigation for that line in the IF, as needed). Otherwise, it will skip the line. You can even nest them, so that once you hit a blank column of text, you skip the rest.
Best Regards,
Sigrid
------------------------------
Sigrid Kok
Precisely Software Inc.
Original Message:
Sent: 03-23-2023 11:00
From: Michael Lund
Subject: IA06 load Operation long texts
Hi Forum
I have run into some issues with a script for loading long text into task list operations.
It's done via excel solution
To hit the right operation I use Index field conditions (and GUI scripting as a consequence) inside a loop. See attachment Index field.png
Due to this mode, each line must be in a separate column and to control that I enter tag columns and text lines txtRSTXT-TXLINE[2,1].text, txtRSTXT-TXLINE[2,2].text asf. see attachment Txt_Columns.png
As I would not know how many lines the user would request for any operation, I have defaulted to 20 columns, ie. 20 text lines.
The problem occurs if less than 20 lines are requested. The script expects all 20 columns to be populated in the excel sheet, otherwise the long text will not be saved when loaded into SAP
I have tried to insert skip indicator \ in the excessive columns, but they seem to be ignored.
Do anyone know of a method for a script to handle long text of variable number of lines (columns)?
Br Michael
------------------------------
Michael Lund
Novo Nordisk A/S
------------------------------