cancel
Showing results for 
Search instead for 
Did you mean: 

Matrix Item search and Item arrow

Former Member
0 Kudos

Hi,

I have build a matrix and I like to have item serach and when I get the Item I like to display the orange arrow; B1 standard (See Sales Order)

Any code sample in VB or C#?

Thank you,

Rune

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Rune,

The orange arrow you mean is a LinkedButton object in the UI API. You can declare it for a matrix and accordingly map any document you need to, using the LinkedObject for that corresponding LinkedButton object.

Dim objLinkedButton As SAPbouiCOM.LinkedButton

objMatrix = objForm.Items.Item("Matrix").Specific

objMatrixColumn = objMatrix.Columns.Item("V_1")

objLinkedButton = objMatrixColumn.ExtendedObject

objLinkedButton.LinkedObject = SAPbouiCOM.BoLinkedObject.lf_GLAccounts

Hope this helps.

Best Regards,

Satish. B.

former_member682029
Contributor
0 Kudos

Rune.

How are you adding column to the matrix?.

If you are adding columns by code, then you have to specify the column type property as LinkedButton.

There are several options available for a column type as EditText, CheckBox, Combobox, PictureBox and LinkedButton.

If you are loading the form using XML then you can specify the column type in screen painter.

Once you have loaded the matrix you can specify other properties as described by satish.

Anoop

Former Member
0 Kudos

Thank you very much for your feedback.

I am using XML (srf) to display my Form Matrix.

What is the code in the XML file for search and Item arrow for column V_0?

I need the code also, code sample...

Thank you,

Rune

former_member682029
Contributor
0 Kudos

Rune

In screen painter, there is option to change the column type property to Linked button.

Just edit the XML using the screen painter. Also set the extended object property of the column. This is what you need to do. If you need to link the button to (Orange button) business partner, the extendedObject is 2.

Save the XML and load. You will get orange button.

Anoop

Former Member
0 Kudos

Hi Rune,

For getting the Link Button for that particular column V_0, all you need is, to open the form in screen painter, and in the type combo, for that particular column, select it as Link_Button.

Regards,

Satish. B.

Former Member
0 Kudos

Please display the right code in XML for search and link in same column:

<column uid="V_0" 
type="16" 
title="Item" 
description="Item" 
visible="1" 
AffectsFormMode="1" 
width="250" 
disp_desc="0" 
editable="1" 
right_just="0" 
val_on="Y" 
val_off="N" 
backcolor="-1" 
forecolor="-1" 
text_style="0" 
font_size="-1" 
ChooseFromListUID="BPItem" 
ChooseFromListAlias="ItemCode">
                                            
<databind databound="1" table="" alias="SearchItem" />
<databind databound="1" table="" alias="LinkItem" />
<ExtendedObject linkedObject="4" LinkedObjectType="4" />
<ExtendedObject linkedObject="2" LinkedObjectType="2" />
</column>


<ChooseFromListCollection>
                    <action type="add">
                        <ChooseFromList UniqueID="-1" ObjectType="-1" MultiSelection="0" IsSystem="1"/>
                        <ChooseFromList UniqueID="SearchItem" ObjectType="4" MultiSelection="0" IsSystem="1" />
                       <ChooseFromList UniqueID="LinkItem" ObjectType="2" MultiSelection="0" IsSystem="1" />
         </action>
                </ChooseFromListCollection>

Edited by: Rune Brattas on Aug 17, 2009 2:43 PM

Former Member
0 Kudos

Hi Rune,

In the first property type, instead of 16, give it as 116. It will work.

Regards,

Satish. B.

Former Member
0 Kudos

Like this:

<column uid="V_0" type="116" title="Item" description="Item" 
                                                visible="1" AffectsFormMode="1" width="250" disp_desc="0" 
                                                editable="1" right_just="0" val_on="Y" val_off="N" 
                                                backcolor="-1" forecolor="-1" text_style="0" font_size="-1" 
                                                ChooseFromListUID="ItemSearch" ChooseFromListAlias="ItemSearch">
                                            <databind databound="1" table="" alias="ItemSearch" />
                                            <databind databound="1" table="" alias="ItemLink" />
                                            <ExtendedObject linkedObject="2" LinkedObjectType="2" />
                                            <ExtendedObject linkedObject="4" LinkedObjectType="4" />
                                        </column>

<ChooseFromListCollection>
                    <action type="add">
                        <ChooseFromList UniqueID="-1" ObjectType="-1" MultiSelection="0" IsSystem="1"/>
                        <ChooseFromList UniqueID="ItemSearch" ObjectType="4" MultiSelection="0" IsSystem="1" />
                        <ChooseFromList UniqueID="ItemLink" ObjectType="2" MultiSelection="0" IsSystem="1" />
                    </action>
                </ChooseFromListCollection>

Former Member
0 Kudos

...Sorry; but I do not get any search icon or link icon in my column...

former_member682029
Contributor
0 Kudos

You really do not have screen painter?

Try these changes

ChooseFromListUID="ItemSearch" ChooseFromListAlias="ItemCode">

ChooseFromListAlias must be "ItemCode"

<databind databound="1" table="" alias="ItemSearch" />

This means you are binding the column to UserDataSource. The Table is nothing.

SO you must add the ItemSearch UserDataSource in your XML

If you have a database field for this column, assign DBDatasource using Table="TableName" and alias="FieldName"

<databind databound="1" table="" alias="ItemLink" /> Remove this line since another databind "ItemSearch" is correct

<ExtendedObject linkedObject="2" LinkedObjectType="2" /> Remove this line. Since another linked object of type "4" is correct.

<ExtendedObject linkedObject="4" LinkedObjectType="4" />

So the final code is

ChooseFromListUID="ItemSearch" ChooseFromListAlias="ItemCode">
<databind databound="1" table="" alias="ItemSearch" />
<ExtendedObject linkedObject="4" LinkedObjectType="4" />

Anoop

former_member682029
Contributor
0 Kudos

If you are using UserDataSource "ItemSearch" Do not forget to add userdata source in XML

<datasources>
  <userdatasources>
   <action type="add">
    <datasource uid="ItemSearch" type="9" size="100"/>
   </action>
 </userdatasources>
</datasources>

Anoop

Answers (0)