cancel
Showing results for 
Search instead for 
Did you mean: 

Extract data from balance sheet table f.01 using personas 3.0

Former Member
0 Kudos

Hi,

I am trying to write a Script that will bring the Income total from f.01.

For the same I made amendment in the layout so as the total will be always on the first line, hence I can pick it up.

I am trying to use the function getCellValue(int rowIndex, String columnName);

and my function will call the grid followed by the first row and the 3rd column like

session.findById("wnd[0]/usr/cntlGRID1/shellcont/shell/shellcont[1]/shell").getCellValue(1,"Total of reporting period");

I tried to debug, but I am getting no success.

Screenshot of the layout with total at the top.

The yellow bar is the total which is the top row.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos


Hi Saurabha,

That's the incorrect use of getCellValue method (you used wrong colName parameter.

Please have a look into this article. If possible, debug, so that you get an idea.

Copying Table data into a variable - SAP Imagineering - SCN Wiki

Regards,

Sushant

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sushant/Script Man,

Thanks.

@Sushant - I used the debug option and had that figured out.

@Script Man - FYI - I did not find such line in the recording, else it would have been easy.

The script gives row and column index which selected.

I still dont understand as to why the function takes column name instead of taking column index. That would have been a lot easier.

--

Regards

SAurabha J

script_man
Active Contributor
0 Kudos

Hi Saurabha,

You can find the right name for the column by recording a test script.

1. Start the scriptrecorder from SAP GUI.

2. Click the column at the top with the name: Total of reporting period

3. Stop recording.

4. Look at the recorded script. Somewhere, perhaps there is a line such as:

     session.findById("wnd[0]/usr/cntlGRID1/shellcont/shell/shellcont[1]/shell").selectColumn "XYZ"


5. The exemplary designation of the desired column ("XYZ") then you have to put it in the command.


    e.g.


   session.findById("wnd[0]/usr/cntlGRID1/shellcont/shell/shellcont[1]/shell").getCellValue(1,"XYZ")

Regards,

ScriptMan