on 08-29-2014 2:54 PM
I am trying to check if the User has set an item to Inactive in the UI and I've got the following code:
10002050 is the ID for the Active radio button. I don't have a lot of experience with the UI API, but anyways, this code gave mean error converting to IOptionButton, which I'm assuming is an interface being implemented by that control. However when I search the SDK Help for IOptionBtn I don't find anything, and I can't seem to find anything in google either. I'm sure checking a radio button in SAP is simpler than this. Where in the documentation should I be looking for how to check the value of a radio button (or option button?)
If CStr(oForm.Items.Item("10002050").Specific) = "" Then | |
ClearChannelMaxAnalysisFieldsForItem(boItem) | |
DeleteSKUFromChannelMax(currentSku) | |
UpdateRequiresOutputFile = True | |
End If |
Hi Cynthia,
Many questions in a single thread...
Yes IOptionButton is an interface, but none are documented: only the classes. In fact, all objects are described by interface, so if you look in the SDK's help file for the class, you 'll find de facto the definition of the interface.
.Specific returns an object, not a string; and the return object in your case is an OptionButton; and you have to do an explicite cast to use it.
On the OptionButton, you have a property which is named Selected and wil give you the value you want.
Regards,
Eric
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Cynthia,
To translate Eric's answer :
Dim oOpt as SAPbouiCOM.OptionBtn
oOpt = oForm.Items.Item("10002050").Specific 'You do not need an explicit cast here ... it is VB..
if oOpt.Selected then
ClearChannelMaxAnalysisFieldsForItem(boItem)
DeleteSKUFromChannelMax(currentSku)
UpdateRequiresOutputFile = True
End If
Cheers
Edy
Thanks guys!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.