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

User Defined Fields form

Hi All

Please help. I am trying to automatically load the user defined fields form withing code, on the form load event. For some reason it gives me the following errors:

"Cannot enable a disbaled menu option". It is an intermitent problem. The following code gets triggered during the load of a transaction form eg. Sales Quotation.

Dim oMenus As SAPbouiCOM.Menu

Dim oMenu As SAPbouiCOM.MenuItem

oMenus = SBO_Application.Menus

Try

oMenu = oMenus.Item("6913")

If oMenu.Enabled = False Then

If oMenu.Checked = False Then

oMenu.Checked = True

oMenu.Enabled = True

oMenu.Activate()

End If

End If

Catch

SBO_Application.MessageBox("Error in Function " & "'" & ErrorToString() & "'")

End Try

Regards John

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 20, 2005 at 02:22 PM

    Hi Barend

    I do understand that not all forms have a user defined field forms. The form that I am working on is the Sales Quotation, which does have a user defined field form...

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      Are you sure the correct for has focus? You can check this by setting

      oForm = oApplication.Forms.ActiveForm
      MessageBox.Show(oForm.FormType)

      This will just show you which form has focus.

      Adele

  • Posted on Oct 20, 2005 at 12:36 PM

    Hi John,

    Not all forms have a UDF form to accompany it. The error will apply to these forms. And the question you will next ask is : "How do I know which forms do not have the UDF forms with them" -> the answer is unfortunately that you will have to check it out yourself...

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.