cancel
Showing results for 
Search instead for 
Did you mean: 

UI: How can I call a standard Bone Screen using UI API

Former Member
0 Kudos

Hi,

Can I call the existing BONe Screens like "quotation, Item Master" in my application using UI API.

thanks

raj

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Be careful not to confuse MenuUID's, FormUID's and Form Types.

MenuUID's relate to individual items you can click on in the menu system. eg. Quote = 2049, Order = 2050, Find = 1281. The ActiveMenuItem command uses MenuUID's.

The FormUID's that you observed uniquely identify individual forms within the running application. They are just sequentially generated numbers preceded with an F. They bear no fixed relationship to the type of form (eg Order). You use these FormUID's in code through the Forms collection to interact with a specific instance of a form. eg. sboApp.Forms(FormUID)

Form Types uniquely identify the class of form. They are the same for all individual windows of the same type. EG. Two open Order windows will both have a FormType of 139. Using the GetFormByTypeAndCount(FormType, Index) lets you reference an individual instance of particular type of form. eg. GetFormByTypeAndCount(139,1) will reference the order window that was opened first.

Hope this helps,

John.

Former Member
0 Kudos

You can use the ActivateMenuItem method to call standard business one screens. You will need to identify the UID of the menu item you want - you can do this with the event monitor.

e.g. Launch the order screen:-

sboApp.ActivateMenuItem "2050"

John.

Former Member
0 Kudos

Hi John,

thanks for the reply. But what we observed is the FORMUID is changing automatically when you reopen the same form.

Ex: If I open Business Partner it may have a FORM ID as F_16 and when I re-open it for 2nd time Im getting the FORM ID as F_25. It is not constant

thanks

raj

Former Member
0 Kudos

Hi raja

That's right, the FormUID is changing. But the FormType doesn't change. So use the method Application.GetFormByTypeAndCount(intFormType, intFormCount) to get the form you have opened just before:

'mwuiApp is SAPbouiCOM.Application

Dim uiFrm As SAPbouiCOM.Form

mwuiApp.ActivateMenuItem(strMyMenuItemToOpenAForm)

uiFrm = mwuiApp.Forms.GetFormByTypeAndCount(intTypeOfFormJustOpened, 1)