The copyright window is the information, which is popping up when You are changing the language of your sessions. In this article I’m going to show You the simple trick of how to avoid this copyright window in SAP.
Probably You will see this message only once, during the first logging in to SAP.
But if You change the language next time to another, You will see the window showed below.
And this is that copywright window.
When I started to work in SAP I often changed the language from english to polish. I thought it will help me to better understand new system. So when I was using SAP manually I was forgetting about macros and changing the language.
Often it was just disrupting launched macros, because I did not know how to handle this. I didn’t know how to deal with the window, which appears sometimes, not always.
What to do in such situation?
First of all, You need to simulate the situation, in which that windows pops up and record it using SAP Script Recording.
In our case, the line responsible for clicking that green confirmation button to close the copyright window looks like showed below.
Having that we can go to the possible solutions.
To solve this issue I prepared for You 2 solutions – easy and little bit complex. Let’s start with the second one.
Check if wnd exists
In this solution You need to create an object (somewhere the copyright window appears) and set there the wnd. It stands for the any additional, popping out window. In our case it will look for the copyright window. If it popped up the wnd is not nothing and the “clicking line” is proceeding.
On Error Resume Next Dim wnd1 As Object Set wnd1 = session.findById("wnd") On Error GoTo 0 If Not (wnd1 Is Nothing) Then session.findById("wnd/tbar/btn").press End If
Simple error handling
In the easier solution You just need to do nothing but put the “clicking line” into error handling brackets. That’s all.
In case of no copyright window macro will go on skipping this line.
On Error Resume Next session.findById("wnd/tbar/btn").press 'language version On Error GoTo 0
To sum up
Now You should know how to manage with copyright window in SAP macros. Choose the method that fits You more.
You can also use those solutions to deal with any pop up window, which appears once in a while. Just need to know, where they can occur and trap them down.
One thought on “How to manage with copyright window in SAP”