This is just a small life hack that some may find fun or useful.
I work a lot with linked scripts. Sometimes these chains of linked scripts can contain scripts that I only want to run if certain conditions have been met. This is easy enough using an IF statement. The thing is, that if a script is intentionally skipped, then I just get a blank log cell, and that is something I'm not in favor of. A blank log field to me is inconclusive. I would much rather have a log text saying "Skipped" or "N/A (Not Applicable).
So I decided to see if I could find a way to preload log texts so I can see if a script should run or not. Here is an example of what I did in a script with cell based mapping where I always have to create a BOM and sometimes, but not always, create a second BOM.
I start my chain of scripts with a MM02 script changing a dummy material I have created for the purpose. All that is needed is the basic 1 view for the material, because I'm using the material description as a source for my preloading of log texts.
In the first screen I'm uploading a text I would like to preload as a log text. In the second screen I read the uploaded text to the log cell.
------------------------------
Karsten Salin | SAP Business analyst II
MAT Holdings Inc. | 4540340776
------------------------------