Skip to Content
author's profile photo
Former Member

I canu00B4t hide UDF

Hi all,

My problem is that i can´t hide the user defined fields. My idea is to hide some udf-s depending what form is loaded, but i can´t hide noone. I have SBO 2005 A PL 34 but i remenber that in low pl-s too the problem exist. Example of code:

oForm = SBO_Application.Forms.GetFormByTypeAndCount(-149, 1);

oItem = oForm.Items.Item("U_peso_t");

//oItem.ToPane = 3;

oItem.Visible = false;

//oForm.PaneLevel = 1;

//oForm.Freeze(true);

Not error appear but the item always show.

Exist a way to do this?

Thank you, regards.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    author's profile photo
    Former Member
    Posted on Sep 28, 2007 at 12:32 PM

    Hi Aitor,

    You have to Set Visible=False in ALL_EVENTS

    Case SAPbouiCOM.BoEventTypes.et_ALL_EVENTS

    oItem.Visible=False

    This will helpfull for you. And give me reward points,

    Regards,

    G.Suresh

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 28, 2007 at 11:20 AM

    hi Aitor,

    this is the right way to hide the UDF.

    do one thing, after

    oitem.visible=false

    reload your form or refresh the form. it will disappear.

    hope this helps u.

    regards

    nirdesh panwar

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 28, 2007 at 11:51 AM

    Sorry,

    exist a way to do than i want in tools of SAP,nevertheless, i put oForm.Refresh() after oItem.Visible=false and the field is not hidden. I try too with oForm.Update(); but the field not disappear.

    Thanks nirdesh.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Sep 28, 2007 at 12:12 PM

    Hi Aitor

    If you have added the field in the form area you should be able to hide the field. But if you are tryin to hide the field that appears in the right pane then i dont think it is possible.. If you have added it on the form area then the alternate solution would be try setting the editable property to false. Instead of setting the visible property..

    Regards

    Aris.

    Add comment
    10|10000 characters needed characters exceeded