Skip to Content
author's profile photo Former Member
Former Member

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

Hi,

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

thanks

raj

Add comment
10|10000 characters needed characters exceeded

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 12, 2004 at 11:51 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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)

  • author's profile photo Former Member
    Former Member
    Posted on May 18, 2004 at 12:07 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded