79678947

Date: 2025-06-25 11:13:54
Score: 8.5 🚩
Natty:
Report link

Problem:

I'm using VBA to extract the 'Total' value from SAP COOIS and paste it into Excel. Everything works fine except capturing the Total value, because the position of the Total changes every time, and I can't figure out how to dynamically locate and copy it into Excel.

What I've Done:

Question:

How can I programmatically capture the Total value from the SAP ALV grid (where the Total is calculated after summing a column) and copy it to Excel even when its position changes?

Attached is the working script up to the Total display, but I need help with the part that extracts the value.

Thanks in advance!

To dynamically read ALV grid data in SAP using scripting, you may need to loop through visible rows in the grid using:

Set grid = session.FindById("grid_id")

value = grid.GetCellValue(rowIndex, "columnKey")

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (0.5): How can I
  • Blacklisted phrase (0.5): I need
  • Blacklisted phrase (2.5): I need help
  • RegEx Blacklisted phrase (3): Thanks in advance
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: ERPROOTS