cancel
Showing results for 
Search instead for 
Did you mean: 

ASKBN scripting issue

Former Member
0 Kudos

Hello,

I have recorded macro for ASKBN. For few company codes, it is showing error as "there are no documents to post" as mentioned in 3rd picture. for few other company codes it is showing results as mentioned in 2nd picture.

For executing ASKBN, i have the code mentioned at particular screen shot.

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

From here it has to go back.

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

Problem starts over here, i did not get SAP coding for below dialog box. I have used below mentioned code.

If session.findById("wnd[0]/sbar").Text = "There are no documents to process since the last run." Then

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

End If

Finally my coding is like below.

If session.findById("wnd[0]/sbar").Text = "There are no documents to process since the last run." Then

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

End If

And SAP is not considering at all. Kindly help us to solve the issue.

Thanks

Sunil

Accepted Solutions (1)

Accepted Solutions (1)

holger_khn
Contributor
0 Kudos

Hello.

One Option is to walk over session children for subwindow:

For Each subWindow In Session.Children

     If subWindow.Name = "wnd[1]" Then Session.FindById("wnd[1]").SendVKey 0

Next

If there is one subwindow code will execute "Enter" by sendig VKey command.

Former Member
0 Kudos

Thanks a lot Holger . its working fine

Answers (0)