How to manage with copyright window in SAP

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.

How to manage with copyright window in SAP sap guy

Probably You will see this message only once, during the first logging in to SAP.

How to manage with copyright window in SAP log in

But if You change the language next time to another, You will see the window showed below.

How to manage with copyright window in SAP

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.

session.findById("wnd[1]/tbar[0]/btn[0]").press

Having that we can go to the possible solutions.

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[1] exists

In this solution You need to create an object (somewhere the copyright window appears) and set there the wnd[1]. 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[1] is not nothing and the “clicking line” is proceeding.

On Error Resume Next
    Dim wnd1 As Object
    Set wnd1 = session.findById("wnd[1]")
On Error GoTo 0

If Not (wnd1 Is Nothing) Then

    session.findById("wnd[1]/tbar[0]/btn[0]").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[1]/tbar[0]/btn[0]").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.

Tomasz Płociński

Author: Tomasz Płociński

Excel VBA enthusiast who is also open for other languages. Mainly working in VBA, some SQL, hungry for more.

One thought on “How to manage with copyright window in SAP”

Leave a Reply

Your email address will not be published. Required fields are marked *