Skip to Content
author's profile photo
Former Member

Setup Databrowser

Hi,

I was trying to setup a databrowser but, has not been successful. I have setup UniqueID=txtTNo, Alias=TNo, TableName=@TBL and DataBound=True in screen painter. My code as follow:

Set oForm = SBO_Application.Forms(FormUID)

oForm.AutoManaged = True

oForm.SupportedModes = -1

oForm.Mode = fm_FIND_MODE

oForm.DataBrowser.BrowseBy = "txtTNo"

My concerns:

1. the browseby will generate an error "General Failure"

2. the navigation buttons are not enabled

3. how to link the navigation with UDO tables

I have searched the forum and try different solutions but, no luck.

I am using VB and would appreciate if someone could guide me through this. Thanks.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • Best Answer
    author's profile photo
    Former Member
    Sep 29, 2005 at 12:11 PM

    Adele,

    1. You need to register a user-defined object. This is where your tables are linked. Have you done this?

    >> I have registered the UDO and linked the 'documents' via wizard.

    3. Do databinding in screen painter. I believe you've done this too. Also set the Object Type property of the form to the name of your user-defined object.

    >> Do I bind all the items on the form?

    4. Now set the properties in your original post in code.

    >> Don't really get what you meant?

    I'll try it out and keep you posted. Thanks.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      1. Great

      3. If you're having problems, start with just doing data binding on your main edit text boxes. (Like code and name), can expand if those are working. Based on your code you can start with just data binding your txtTNo field to the docnum field of your UDO.

      4. Set the settings you had in your first post...

      Set oForm = SBO_Application.Forms(FormUID)
      oForm.AutoManaged = True
      oForm.SupportedModes = -1
      oForm.Mode = fm_FIND_MODE
      oForm.DataBrowser.BrowseBy = "txtTNo"

      Once you've got this you should be able to browse your data (navigation buttons should be enabled).

      Adele

  • author's profile photo
    Former Member
    Sep 29, 2005 at 06:23 AM

    Hi,

    The way the navigation buttons know how to databrowse (and on which table to browse) is by setting the Object Type property of the form in screen painter. Then it will browse through that UDO based on the database field that is bound to your field specified in oForm.DataBrowser.BrowseBy.

    Don't know why you're getting "general failure". Are you sure field UID is typed correctly?

    HTH

    Adele

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Sep 29, 2005 at 07:19 AM

    Adele,

    Thanks for responding.

    Would you mind guide me through this cause I have been trying but not successful.

    What should I input in the Object Type entry in screen painter? Afterwhich, how do I link the master and child? And how do I populate my header (master) and matrix (child)?

    Any other steps I should take?

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      I am also having a bit of a problem with UDO (and not sure where my problem is) but will help you as far as I possibly can 😊

      1. You need to register a user-defined object. This is where your tables are linked. Have you done this? You can look at this post for detail on registering: UDO registration through COde

      2. Design your form in screen painter. You have done this right?

      3. Do databinding in screen painter. I believe you've done this too. Also set the Object Type property of the form to the name of your user-defined object.

      4. Now set the properties in your original post in code.

      Try this and see if you still get the general failure error. Have you registered a user-defined object?

      Let me know,

      Adele

  • author's profile photo
    Former Member
    Sep 30, 2005 at 08:13 AM

    Adele,

    Thanks, I got it working following your steps.

    However, as I start the form in Add mode, a message "Changes will cause the data to be deleted" will pop up when I start to use the navigate button. Is there a way to disable this message?

    If you don't mind, how can we disable a cell or a range of cells in a row? And I hope the backcolor can be changed to white instead of grey when disabled.

    Thanks.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi, you can only disable a column (or the whole matrix)and not cells individually.

      You can change the color of cells, but as soon as you make a disabled cell white, it returns to the default grey color of being disabled. What I would suggest is that you change it to an offset of the color, by defining custom color.

      This message that you are referring to (changes will cause...) does this only happen if you change something on the window before you scroll or even if you just scroll. If you want, try starting your form in Find mode by

      oForm.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE

      Hope it helps,

      Adele

  • author's profile photo
    Former Member
    Oct 01, 2005 at 10:12 AM

    Adele,

    Yes, I will not see the message when form start in 'Find' mode. I am trying to follow the standard system form where the start mode is 'Add'.

    If I start in 'Add' mode, when I click the navigation or find menus, the message will pop up. This only happen once when I start the form. But I don't see this happen in system form.

    Do you have any clue or anyway I can disable this message and still start in 'Add' mode? Thanks.

    Add comment
    10|10000 characters needed characters exceeded