cancel
Showing results for 
Search instead for 
Did you mean: 

SO addon

Former Member
0 Kudos
45

Hi, I'm trying to create an addon for the Sales Order form. I would like to know when the quantity field in the SO is filled with a value or if the value is changed. Here is my code but it does not work:

(pVal.FormType == 139 && pVal.ItemUID == ("38") && pVal.ColUID == "11" && pVal.EventType.Equals(SAPbouiCOM.BoEventTypes.et_VALIDATE) && pVal.Before_Action == false && pVal.InnerEvent == false && pVal.ItemChanged == true)

Any ideas?

Accepted Solutions (1)

Accepted Solutions (1)

Nussi
Active Contributor
0 Kudos

Hi,

in c# its


if (pVal.FormType == 139 && pVal.ItemUID == "38" && pVal.ColUID == "11" &&
pVal.EventType == SAPbouiCOM.BoEventTypes.et_VALIDATE && pVal.InnerEvent == false && 
pVal.BeforeAction == true && pVal.ItemChanged == true)
{

}

regards

David

Former Member
0 Kudos

Hi David and thanks for the reply. It seems that the only thing that changed was making the before action true instead of false. I tried this code but it doesn't work:

if (pVal.FormType == 139 && pVal.ItemUID == "38" && pVal.ColUID == "11" && pVal.EventType == SAPbouiCOM.BoEventTypes.et_VALIDATE && pVal.InnerEvent == false && pVal.BeforeAction == true && pVal.ItemChanged == true)

{

globals.SBO_Application.MessageBox("Test", 0, "OK", "Cancel", "");

}

The messagebox doen't appear. Any ideas?

Nussi
Active Contributor
0 Kudos

Costas,

1. when you're using eventfilters you have to add

oFilter = oFilters.Add(SAPbouiCOM.BoEventTypes.et_VALIDATE);

oFilter.Add("139"); // Auftrag

2. and than try to simplify the event once. (altough the first statement was correct)

if (pVal.FormType == 139 && pVal.ItemUID == "38" && pVal.ColUID == "11" && pVal.EventType == SAPbouiCOM.BoEventTypes.et_VALIDATE)

{

globals.SBO_Application.MessageBox("Test", 0, "OK", "Cancel", "");

}

i guess it has something to do with eventfilters.

regards

David

Former Member
0 Kudos

Wow, your good

I totally forgot about the filters that I put. As you've already guessed it works fine. Thanks

Answers (0)