cancel
Showing results for 
Search instead for 
Did you mean: 

Setting the value of some editText

Former Member
0 Kudos

Hello,

I have created a Customer, Contract, CustomerEquipmentCard and whatever is needed to create a service call (all through a custom form using the DI).

Now, through that custom form I want to change the internal serial number on the already open Service Call form so it'll open up the data automatically (when I do it manually it works)

However when I do it manually it pops up the lookup (ChooseFromList) window which I prefer the user wouldn't see.... is there any way to set that internal number from an external form without that lookup window popping up?

thanks.

Accepted Solutions (1)

Accepted Solutions (1)

former_member185703
Active Contributor
0 Kudos

Hi,

This is how the story could go in a simple case.

Please note that this is just a sample - no warranties!

Regards

'********************************************************
'* Please note: you can get all IDs when you activate   *
'* "System information" in the "View" menu + hover over *
'* e.g. an item with the mouse cursor                   *
'*                                                      *
'* Assumption: Service Call form not yet open...        *
'********************************************************
Private Sub GoToServiceCall()
'
  ' Launch Service Call form...
  SBO_Application.ActivateMenuItem("3587")
'
  ' switch to "Find" mode...
  SBO_Application.ActivateMenuItem("1281")
'
  Dim oForm As SAPbouiCOM.Form
  Dim oEditText As SAPbouiCOM.EditText
'
  ' Access the form...
  oForm = SBO_Application.Forms.ActiveForm() 
  'evtl. GetForm("60110", (e.g.)1) when already open
'
  ' Access callID edittext...
  oEditText = oForm.Items.Item("12").Specific
'
  ' Fill in service call number...
  oEditText.String = "14" ' replace with your number
'
  oForm.Items.Item("9").Click()
  ' XX-strange! I think this button should have ID "1" - as usual!
  'or SBO_Application.SendKeys("{ENTER}")
'
  ' That's it (hopefully ;-))

End Sub

Former Member
0 Kudos

Yeah I managed that much...

The problem was that whenever the edittext ( oForm.Items.Item("12") ) was unfocused, the choose from list window popped up (even if it was an exact match). That's exactly what I am trying to avoid....

Thanks!

Answers (0)