cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Gui 770 (Patch 7) ALV navigation problem

flavio.lara
Level 5
Hello Experts,

When we have an ALV report (SAP GridView element type) with lots of lines, "Get All Items" returns many empty lines. We understood that SAP needs to return all lines to SAP Gui before BP could read them.

To solve that, we navigate thru the ALV report sending "Page Down" commands until we reach the report's end. It forces SAP to return all lines to the ALV report and then, "Get All Items" works as expected.

26826.png
Img1: My ALV report

After upgrading to SAP Gui 770 (Patch 7) we realized that "Page Down" does not work as expected. The cursor always moves back to the first (1st) line when SAP Gui reads a batch of lines from its database/memory to plot them in the ALV report.

Check the scroll bar in the gif below. After load new lines, the cursor moves back to 1st line.
After this, the lines still loaded and we can move down normally. Then, when we reach new lines, the cursor moves back again.
This simulation does not uses blue prism. It  happens performing Page Down manually as well. It's a SAP Gui issue or new option that changed the behavior.
26827.gif
Video1: Cursor moving back to 1st line

We did several tests, using SAP Gui 770 from patch 3 to patch 10.
The problem starts in Patch 7 and is still in further versions.

26828.png
Img2: SAP Gui Version and Patch Level

IMPORTANT: This behavior only occurs when accessibility options are active (as recommended in Blue Prism documentation).

26829.png
Img3: Accessibility options in SAP Gui

Have you faced that situation in your projects? Is it possible to move back to the previous behavior, where the cursor does not move back to the 1st line after a page down, without performing an SAP Gui downgrade?

We are trying some answer from our SAP provider as well.

We do appreciate any ideas/tips/guess.

Thank you!
------------------------------
Flavio Lara
System Analyst
Vallourec Tubos do Brasil
Belo HorizonteBrazil
------------------------------
5 REPLIES 5

michael.wulf
Level 3

Hi Flavio,

Disabling accessibility is not an option? We don't have it enabled and are using BluePrism since 2017 without any problems. 

Otherwise you could  try code like this instead of sending Keystrokes.

(Line is a variable that is incremented)

dim oSession as Object


oSession = GetObject("SAPGUI").GetScriptingEngine.Children(0).Children(0) 

oSession.findById("wnd[0]/usr/cntlCUSTOM_SPLITTER/shellcont/shell/shellcont[2]/shell/shellcont[0]/shell").firstVisibleRow = Line
	
oSession = Nothing


------------------------------
Michael Wulf
Senior Developer Robotic Process Automation
e.kundenservice NETZ GmbH
Europe/Hamburg
------------------------------

Hi Michael!

Unfortunately, disabling accessibility is not an option. As accessibility changes some SAP screens (mainly popups, search helps, etc), disable it will bring more problems because of the number of robots we have running. In the past, We've decided to follow the BP instructions and activate it... now we cannot change without refactoring our bots (and they are many!)

About your code, I've tried it. It works perfectly!

We're waiting for an answer from our SAP Support... if they don't find an alternative, We'll adopt your code as a solution for these cases.

I'll post the answer from SAP Team here.

Thank you very much!



------------------------------
Flavio Lara
System Analyst
Vallourec Tubos do Brasil
Belo HorizonteBrazil
------------------------------

kkazantsev
Level 5

Hi Flavio,

the solution may depend on what you need to do with the data in ALV report.

If you need to examine all records and get to a particular record in SAP after reviewing the report data, one option may be saving report to CSV and working with text rather than SAP page scrolling.

If you need to perform actions on the screen itself, then recording a macro would be an alternative. Bot account logged on to SAP would need access to Server Scripting for that.



------------------------------
Konstantin Kazantsev
Solutions Architect
Church and Dwight
America/New_York
------------------------------

Hi  Konstantin,

Thank you for your answer.

The requirement is to read all lines from an ALV grid without exporting the list. For that, we use "Get All Items" in Read stage.

The issue is: we need to force SAP to return all lines to the screen before using "Get All Items". If not, the read stage returns blank lines.

Your suggestion of downloading the list to an external file will work, but it will add a lot of steps to the process. Additionally, not all screens with an SAP GridView element have the "export" option available. 

Thank you again!

Regards,



------------------------------
Flavio Lara
System Analyst
Vallourec Tubos do Brasil
Belo HorizonteBrazil
------------------------------

Hello @michael.wulf and @kkazantsev

Just to give you feedback. Our SAP Support suggested creating the registry key below. We tried values 1 and 2 for this key without success.

[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\SAP\SAPGUI Front\SAP Frontend Server\Customize]
"AlvInitialFocusPosition"=dword:00000001

The final decision is to downgrade SAP Gui to version 770 Patch 6 if using accessibility options.

Thank you again for your help.

Best regards!



------------------------------
Flavio Lara
System Analyst
Vallourec Tubos do Brasil
Belo HorizonteBrazil
------------------------------