cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the Cell which is active in a form? (without using pval.row)

Former Member
0 Kudos
96

Hi,

Can I get the Cell of the Matrix which is active in a form?

I need to launch my search screen, when F11 is pressed in a SBO form. (in 10 different forms including Purchase Order form.)

And, put the selected value back into the form.(i.e, into the matrix cell, which was active when F11 was pressed.)

For getting the active cell, I don't want to keep track of pval.row,.. in the ItemEvents, because I need to do it for 10 different forms.

To explain the sequence of events: I want help in Step 5.

1. User clicks on a cell in the matrix

2. User presses F11

3. My add-on launches my search screen

4. User searches in it and gets the results.

4. User selects one of the Item# from the results

5. I want to put back the selcted Item# in the Matrix of purchase order form, in the cell originally clicked by the user.

Thank you!

-Geetha

View Entire Topic
Former Member
0 Kudos

Geetha

There are only just two way in which i think you can achieve this.

1. Keeping track of cell by keeping pval.ColID and pval.Row on modular variables at the appropriate event (et_KEY_DOWN). Afterwards you can refer to the matrix cell with these.

2. Calling the GetNextSelectedRow method of the matrix like this ...


    Dim intRow As Int16 = oMatrix.GetNextSelectedRow(0, SAPbouiCOM.BoOrderType.ot_RowOrder)

This method however, i believe, needs for the row to be selected (highlighted).

Hope it helps

Former Member
0 Kudos

Hi Neftali,

Thank you for your reply.

I was aware of the solutions that you suggested.

I wanted to know whether there's a better way to capture the active cell ( for the specified Grid, in the given form of type SAPBOUI.form.)

If only these two ways are available, I can manage with them.

-Geetha