Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Two different linked buttons in a single column.

Hi,

I have a grid with 1 column of link buttons.

My first attempt uses only one SAP B1 table (OPDN) as datatable, and I created the linked button using the following code:

        ''==============================================

        ''// LINKED BUTTON

        ''==============================================

        Dim oCol As SAPbouiCOM.EditTextColumn

        oCol = oGrid.Columns.Item("DocNum")

        oCol.LinkedObjectType = "20"

With this model, the linked button works fine. Clicking on it opens the appropriate GRPO document.

----------

My next attempt is to use 2 SAP B1 table (OPDN and ORPD i.e Goods Receipt PO and Goods Return)

I used UNION ALL in the query to group the 2 tables.

If "TYPE" = 'GReturn', then the linked button should refer to ORPD ( oCol.LinkedObjectType = "21")

If "TYPE" = 'GRPO', then the linked button should refer to OPDN ( oCol.LinkedObjectType = "20")

Can this be done? How to modify the basic code?

I can achieve my objective with 2 columns of linked buttons, one for  oCol.LinkedObjectType = "21", and the other for  oCol.LinkedObjectType = "20".

But I would like to put both types of linked buttons in a single column, and use a 'Type' column to distinguish the LinkedObjectType.

Thanks

Leon Lai

replied

Hi Leon,

your code looks good.

And I believe Ankit has satisfy your queries on the pval.BeforeAction and MatrixLinkPressed event.

.

Regards

Edy

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question