on 2025 Mar 21 9:25 PM
Hello,
I'm using the sap training developpement environement for SAP SCREEN PERSONAS. I have created a flavor for the SMEN and i'm trying to understand how to handle when a script is in error and how to get the hand back on my flavor so i can edit the script back and correct the error.
I have done on purpose an error on the onFinalize event of my flavor by calling a function with one missing parameter.
Even if i close this popup, the system tries de reprocess the script and i'm stuck in a infinite loop.
I'm using Chrome dev tool, i see the script calling onFinalize
Please provide me guidance on this because i'm sure there will be a case in real situation where this will happen...What can i do to to have the hand again on my flavor to edit it?
Thanks a lot for your time.
Regards,
Alexandre
Request clarification before answering.
Instead of the hacking, the simple addition of URL parameter sap-personas-ignoreloadevents=X would have allowed you to avoid the endless loop upon the error, since that prevents firing the onLoad, onAfterRefresh and onFinalize events 🙂
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well well...I knew this parameter i think i talk about it somewhere and also i have the documentation with all the parameters possible but where i failed is that to fill this parameter, at the end of "https://iccsrm.sap.com:44300/sap/bc/se/m/index.html" i had an & instead of a ?...& for next parameters and ? for the first, wrong copy/paste with my URL samples.. Well at least i learned to use dev chrome tool a lot so that's not a total loss of time...i guess..
Thanks again for your time Tamas.
Everyone,
I didn't found the perfect solution, like excluding the onFinalize event/script in the JS components but i've found ONE solution 🍾. The result of many hours trying things and debugging led me to this :
Check my breakpoint, at one point, you fall in this method when onFinalize is triggered (BE CAREFUL, this method is not triggered only by onFinalize so you have to check if it's the relevant http request you are handling). I've found out the t parameter contains a lot of things but mainly here, the faulty script that the framework try to load and raise each time an error!
You have to modify the t.body in the console of dev chrome tool. Right click on t.body -> copy content as literal then you open an editor like VLC, you paste everything and almost at the end of the file, you will see your script! you delete everything or you correct the anomaly. You put the correction back to t.body and you F8 in debug.
You do this every time (yes it triggers several times) until you reach flavor editor and then REMOVE the d*mn script associated to the onFinalize Event of the screen for you to apply corrections!
This led me to better understand chrome dev tools and how i can see/manipulate things so it's not a total loss of time.
I hope this will help others. Good luck
Alexandre
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried a new error like this one :
and now i have this message
It must be another kind of error and here i can't change the JS content using. Don't know what to do....
Edit i know why...it's because i'm on my sub adaptative flavor where i can't modify JS file....still stuck
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have a partial answer :
I found my onFinalize script in chrome dev tool
i changed the json content, i save (Ctr+S) + right clic on the file and i chose "Override content".
=> OK i'm back on the PERSONAS menu but when i tried to change the flavor, it triggered another time the script but in the adaptative flavor that i have underneath my main flavor...
And THIS script was NOT editable. Maybe because it's the same when you are editing an adaptative flavor, it says that script can be edited only in main flavor....I/WE need a solution for this please, this is last missing step before i find my peace of mind!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
9 | |
8 | |
7 | |
5 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.