cancel
Showing results for 
Search instead for 
Did you mean: 

Get the BaseType Document data from a Delivery line

Former Member
0 Kudos

Hi,

I want to get the BaseType Document data from a line in a Delivery Form, but I get always the same error:

"Types Mismatch"

This is the code:

...

Dim loEditText As SAPbouiCOM.EditText

Dim loComboBox As SAPbouiCOM.ComboBox

Dim loItems As SAPbouiCOM.Matrix

Set loItems = coForm.Items.Item("38").Specific

If (loItems.RowCount > 0) Then

Set loComboBox = loItems.Columns.Item(47).Cells.Item(1).Specific

end if

...

What is the object where I should get the Base Type Document data?

Thanks ...

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Thank you, all was very useful.

Regards...

Former Member
0 Kudos

Hi,

I'm doing this somewhere, but I have item 47 in my list as basekey not basetype. Basetype is item 46 and is indeed a combo box. Item 47 is an edittext. Hence when you set a combo to it, it should raise a type mismatch...

So e.g.:

Dim txtRead As SAPbouiCOM.EditText

Set colRead = mtxRead.Columns.Item(intCol)

Set txtRead = colRead.Cells.Item(intRow).Specific

Hth,

Jacques

Former Member
0 Kudos

Hi Briseida,

Hope You want to add the base ref # in a combo box. Am I right?

Please try this

...

Dim loEditText As SAPbouiCOM.EditText

Dim loComboBox As SAPbouiCOM.ComboBox

Dim loItems As SAPbouiCOM.Matrix

Set loItems = coForm.Items.Item("38").Specific

If (loItems.RowCount > 0) Then

' for each row

loComboBox.ValidValues.Add = intRowCount,loItems.Columns("44").Cells(intIndex).Specific.String

'next

end if

...

Ajith