cancel
Showing results for 
Search instead for 
Did you mean: 

i want check value if Item="38",column="4" is NULL give system show message

Former Member
0 Kudos

if I want check value by when I click at item "29" already if value at Form="179",Item="38",column="4" is empty give system show message warning "input value" i will code?

<u><u><b>Code VB.NET</b></u></u>

If (pVal.FormTypeEx = 179) Then

Dim EventEnum As SAPbouiCOM.BoEventTypes

EventEnum = pVal.EventType

If pVal.ItemUID = "29" Then

If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK Then

...

if Item="38" column ="4" is null give system show message warning

...

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Excuse me Again. I write code such as

<u><b>Code VB.NET</b></u>

If (pVal.FormTypeEx = 179) Then

Dim EventEnum As SAPbouiCOM.BoEventTypes

EventEnum = pVal.EventType

If pVal.ItemUID = "29" Then

If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK Then

Dim oMatrix As SAPbouiCOM.Matrix

Dim oColumn As SAPbouiCOM.Column

Dim ColNum As Integer

Dim oEditText As SAPbouiCOM.EditText

Dim oItem As SAPbouiCOM.EditText '*****I EDIT

Dim myMatrix(1, 1) As String

'Inside your ItemEvent condition:

oForm = SBO_Application.Forms.Item(FormUID) '****I EDIT

oItem = oForm.Items.Item("38").Specific '****I EDIT

oMatrix = oItem.Value '********* I EDIT Already Error here

oEditText = oMatrix.Columns.Item("6").Cells.Item(1).Specific

If (oEditText.Value <> Nothing) And (oEditText.Value <> "") Then

SBO_Application.MessageBox("Please Input Value") '***I EDIT

End If

Former Member
0 Kudos
oItem = oForm.Items.Item("38").Specific '****I EDIT
oMatrix = oItem.Value '********* I EDIT Already Error here

oMatrix and oItem.Value

has different types:

SAPbouiCOM.Matrix and SAPbouiCOM.EditText

Message was edited by: Denis Sapunkov

Former Member
0 Kudos

Hello Kitti,

You're not declaring right your variables, I wrote you an example and then you have to modify it to make it work, because you have other variable names so copy-paste won't work for you, you have to change it. The error I see is that you are not declaring ok your variables. In my example the variables should be declarated:

Dim oForm As SAPbouiCOM.Form

Dim oItem As SAPbouiCOM.Item

Dim oMatrix As SAPbouiCOM.Matrix

Dim oColumn As SAPbouiCOM.Column

Dim ColNum As Integer

Dim oEditText As SAPbouiCOM.EditText

Dim myMatrix(1, 1) As String

This declarations should be at the start of the class, and not inside the If condition.

Hope this helps,

Regards,

Mariana Mazzero

Former Member
0 Kudos

I'm Sorry ,I don't give reward points for good answers.

now I'm practice for this prog thus,if I do something wrong apologize.

Regards,

kitti vipaveepitak

Former Member
0 Kudos

Hello Kitti,

If you have any problems, I'll be happy to help you if you need it.

Regards,

Mariana Mazzero

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Kitti,

I think that you want to check if a row of a matrix is null right? If this is what you need here's an example:

Dim oMatrix As SAPbouiCOM.Matrix
Dim oColumn As SAPbouiCOM.Column
Dim ColNum As Integer

Dim myMatrix(1, 1) As String

'Inside your ItemEvent condition:
oItem = oForm.Items.Item("38")
oMatrix = oItem.Specific

oEditText = oMatrix.Columns.Item("4").Cells.Item(1).Specific

If (oEditText.Value <> Nothing) And (oEditText.Value <> "") Then
aplicattion.MessageBox("your message")

'NOTE: If you want to get the value of that row use: myMatrix(i, j) = oEditText.Value. If you want to check all values you'll have to use a FOR

End if

Hope this helps,

Regards,

Mariana Mazzero

Former Member
0 Kudos

Hi,mariana mazzero : Thank you for answer to me but Program cann't working

<u><b>CODE YOU</b></u>

Dim oMatrix As SAPbouiCOM.Matrix

Dim oColumn As SAPbouiCOM.Column

Dim ColNum As Integer

Dim myMatrix(1, 1) As String

'******* I Think so --> Dim oItem as SAPbouiCOM.Form

'Inside your ItemEvent condition:

oItem = oForm.Items.Item("38")

oMatrix = oItem.Specific

oEditText = oMatrix.Columns.Item("4").Cells.Item(1).Specific

If (oEditText.Value <> Nothing) And (oEditText.Value <> "") Then

aplicattion.MessageBox("your message") 'I think so SBO_Application.messagebox("message me")

'NOTE: If you want to get the value of that row use: myMatrix(i, j) = oEditText.Value. If you want to check all values you'll have to use a FOR

End if

<u><b>CODE ME</b></u>

If (pVal.FormTypeEx = 179) Then

Dim EventEnum As SAPbouiCOM.BoEventTypes

EventEnum = pVal.EventType

If pVal.ItemUID = "29" Then

If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK Then

Dim oMatrix As SAPbouiCOM.Matrix

Dim oColumn As SAPbouiCOM.Column

Dim ColNum As Integer

Dim oEditText As SAPbouiCOM.EditText

Dim oItem As SAPbouiCOM.Form '***** I ADD EDIT

Dim myMatrix(1, 1) As String

'Inside your ItemEvent condition:

oForm = SBO_Application.Forms.Item(FormUID) '***********I ADD EDIT

oItem = oForm.Items.Item("38").Specific '********I ADD .Specific

oMatrix = oItem ' !!!

oEditText = oMatrix.Columns.Item("6").Cells.Item(1).Specific

If (oEditText.Value <> Nothing) And (oEditText.Value <> "") Then

SBO_Application.MessageBox("Please Input Value") ' I Edit

End If

Program cannot working Please mariana mazzero looking for me Thankyou