on ‎2006 Nov 27 4:24 PM
I've seen this asked before with no answers that worked.
I have a matrix from a user table, so all fields start with U_. I have a U_DocEntry and U_DocNum field in my user table and I want to link to the appropriate document. Both fields are it_Linked_Button types.
Clicking on the link button for the U_DocEntry field works fine as expected since SAP assumes that a value for DocEntry is being used. Naturally, clicking on the U_DocNum field links to the wrong document since it finds using DocEntry.
If I have both fields displayed and perform a ct_Linked click on the DocNum cell then that works. In my example "Col11" is the column with DocEntry in it.
BubbleEvent = false;
SAPbouiCOM.Cell oClickCell = (SAPbouiCOM.Cell)_oMatrix.Columns.Item("Col11").Cells.Item(pVal.Row);
oClickCell.Click(BoCellClickType.ct_Linked,0);
However, I don't want to display the DocEntry field and the user may hide the field anyway. Forcing a ct_Linked click on a non-visible cell causes the calling event to repeat itself and doesn't produce a "catchable" error. This causes the SAP client to crash.
So, does anyone have any ideas of how to accomplish this?
Request clarification before answering.
You can achieve this by intercepting the et_MATRIX_LINK_PRESSED event.
In BeforeAction=True, freeze the form and change the "U_DocNum" cell value to contain the docentry value.
In BeforeAction=False, set the "U_DocNum" cell value back to its original value and unfreeze the form.
John.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 29 | |
| 14 | |
| 7 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.