cancel
Showing results for 
Search instead for 
Did you mean: 

SAP - Get Table Data

ChristopherConn
Level 2
Hello: I am trying to grab table data out of SAP but I am given the following error: Internal : Invalid collection data returned from action - are field names duplicated? My assumption is that BP is unable to differentiate the table headers from one another and are naming each field based on the header data type. (i.e. text) Have any of you folks found a way to grab the table data without using an incremental loop? I feel like this should be a fairly easy thing to do; if you can spy a table, you should be able to read it! Any advice or tips would be much appreciated. Thank you kindly, Christopher Connors  
2 REPLIES 2

JosephGarro
Level 3
I am going through some headaches to extract data off of a SAP table grid as well. I thought this would be easier...

ChristopherConn
Level 2
Hey Joseph: This might not be relevant anymore; however, I have a work around. You can loop through an SAP tables contents by spying a table element and setting it as dynamic. Look for the items table ID (should be something like [ x, y ]) and use a loop to update the value via a numeric Row Index data item and a [Row Index] + 1 calculation. This will update the data table item dynamically and will let you get text from each item. If your table has multiple pages, you can have BP use a global send key to scroll down the page 1 full iteration. You'll need to reset your loop once it has reached the maximum number of iterations visible in your table as after the {PGDN} is sent, the first element in the columns ID will reset to [0, 0]. Hope this helps! Christopher