cancel
Showing results for 
Search instead for 
Did you mean: 

How to detect if the "DB profile" window poped-up or not?

Former Member
0 Kudos

Hello,

I'm writing a script for "CJI3" - this is similar to other Tcodes as well-.

1- If the code is not used in this session and the DB profile is not selected I'll have a pop-up asking to choose the DB profile.

2- Otherwise, I'll get the Tcode window entry.

In the recordeed script the following line will be added only if the DB profile Pop-up window appears.

session.findById("wnd[1]/usr/ctxtTCNT-PROF_DB").text = "z1000"

How to limit this line execution to cases (1) above?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Approach #1

If session.ActiveWindow.Name = "wnd[1]" Then

  session.FindById("wnd[1]/usr/ctxtTCNT-PROF_DB").text = "z1000"  

  session.FindById("wnd[1]").SendVKey 0

End If

Approach #2

If session.ActiveWindow.Text = "Enter profile"  Then

   session.FindById("wnd[1]/usr/ctxtTCNT-PROF_DB").text = "z1000"

   session.FindById("wnd[1]").SendVKey 0

End If

Either should work.

Chad

Former Member
0 Kudos

Thanks Chad .. you saved my time 🙂

Answers (0)