cancel
Showing results for 
Search instead for 
Did you mean: 

The Navigate stage is not giving any options for SAP spy elements

KunalPuranik
Level 3
Hello,   I am working on an SAP screen. The screen has a table and I need to focus/click a row or a field in that table to proceed. When I spy the field with SAP spy mode the element is identified as "SAP Label" and the only operation I can perform is read the value. So that option is not valid. The table also has check box in the left for each row. I tried spying the check box with SAP spy mode and selecting it in navigate stage but the navigate stage doesn't give me any options to perform any actions. Am I doing something wrong or this particular page in SAP is difficult? Thanks for the help!
5 REPLIES 5

IanGrant
Level 3
Hi kpuranak,   Can you provide the transaction code you're trying to spy? A screenshot would be very helpful.   The BP SAP Spying procedures are very good at spying SAP forms, but can struggle with some of the ALV, treeview, and grids that the SAP GUI uses to deal with dynamic data. There are work arounds for most of these issues though.

KunalPuranik
Level 3
Hey Ian, Attached is the screen shot of the screen I am working with. The table is what I am trying to do operation on. so like select the amount and double click it, or focus that line item and then press a short cut key or a button. I spied the check box on the extreme left to see if I could check check it and ultimately focus the row but it doesn't give me any option to perform anything.

IanGrant
Level 3
Hey,   Okay, I understand what you're trying to do now and the issue you're having.   For reasons unknown to me, BP forces Element Type to be static based on it's determination of what the element ""should"" be. This is a real pain in the butt with more involved interactions with SAP like your focus & shortcut method. Note that in the API layer of SAP there is no difference between the double click or focus and F2 methods you mention above. It records the same script to go to the focused document: ""session.findById(""wnd[0]"").sendVKey 2"". It just converts your second click to the send key command.   To get this working in BP without doing a Code Block, you need to trick the Application Moddeller. First model any SAP TextBox so that you get an Element with type SAP TextBox. Second spy the check box that you first tried to use. It will create an Element with type SAP Check Box. Like you mentioned, you can't focus on this Element Type. Finally copy the ID from the Check Box element (should be like /app/con[0]/ses[0]/wnd[0]/usr/chk[1,7]) and then paste it into the ID of the TextBox element. You can now use a navigate action to Set Focus on the TextBox element and it will focus on your Checkbox. From there just use a Global Send Keys to the SAP window. I had issues trying to do a Windows Send Key and eventually had to spy it as a Window (UIA). There may be better workarounds to the Send Keys issue, I didn't invest time in looking for them.    

IanGrant
Level 3
With all of that being said, I have some observations based on your posts in the past few days.   You're using BP to interact with a list of FI postings in FBL3N. You have indicated in a separate post that you need to be able to dynamically move through the rows.   “So basically what I want to know is, if I can edit the spied element attribute value to something like /app/con[0]/ses[0]/wnd[0]/usr/lbl[98,$variable$] and set this variable from my process”   This is very possible to do and will work with the interaction method I gave you above; however, if your list of records exceeds what you can display given your screen resolution, SAP will generate a scrollbar. Anything not visible without moving the scrollbar down will be inaccessible to BP interaction. You can “solve” this by scrolling down, but you are introducing a screen resolution requirement into your objects. As an alternative, consider changing your FBL3N layout in SAP so that it includes Document # and Fiscal Year. You could then change your logic to download the FBL3N data into excel/csv and then into an internal BP collection. From there you could loop into FB03 and for each record pass the Company Code, Document #, and Fiscal Year to get to the posting. I believe this would save you headaches down the line. It would also better modularize your objects.

PranjalDhade
Level 2

I was having a similar issue, I tried to find a resolution but I could not find why navigation stage is not giving any actions to select for a checkbox element. Instead, I found a workaround for that - you can use a Write stage with the same checkbox element(element type should be SAP Check box) and it would act as a flag in there. So, you can use "True" for check and "False" for uncheck. Hope it helps.



------------------------------
Pranjal Dhade
------------------------------