Showing results for 
Search instead for 
Did you mean: 

hide or disable field

0 Kudos

is possible to hide or disable a field if a user has not a specified authorization?

I know how to do it with SDK I'd like to know if there an other way to manage it


Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos


Feliciello Tiziana

as per yours  if a user has not a specified authorization?

As per my knowledge ..

if your work is on customization forms..

you create a form put one matrix..

usercode(cfl)      autorizarion(Combobox)   

user1                     yes

user2                      no

user3                      no

suppose the  you want to restrict on the  bp master.. for particular user..

use form load...

If (pVal.BeforeAction = True) Then

            Select Case pVal.EventType

                Case Is <> SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD

                    If (pVal.FormType = "141") Then

                        '// get the event sending form

                        oForm = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount)

                        If ((pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD)) Then

-after this code...

you can use          ocompany.UserName

it will list all the users in your company ok

if (ocompany.username)=user1

here you just check in your customization form (through the Recrodset)

if user1 having the permission.... ok dont do any thing



which means item is moving to left....

but i dont know this is good method or bad...

but i am doing this way..

if user2 having the permision..

again oitem.left=-(minus)120

bcz you moved the item previously..

you just try , you can get an idea..............

one more important point..

have a look on above screen.. address is one tab is there..ok

if your field(you want to hide one particular field) is under this tab..

if you want to restrict particular user wise....

same method customization form authorization...

if you want to restrict for particular user have a look on below code.

after clicking on the address , folder you  immediately click other folder using

   oitem = oForm.Items.Item("112")



            If (pVal.FormType = "142" And pVal.ItemUID = "ProduAppro" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED And pVal.BeforeAction = False) Then

                oForm = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount)

                oForm.PaneLevel = 88

                Dim ousrname As String

                ousrname = ocompany.UserName

                If (ousrname <> "HR") Then

                    Dim oitem As SAPbouiCOM.Item

                    oitem = oForm.Items.Item("112")


                    SBO_Application.SetStatusBarMessage("You Dont have the permission To See the Contatent", SAPbouiCOM.BoMessageTime.bmt_Short, False)

                End If

            End If

        Catch ex As Exception


        End Try

Active Contributor
0 Kudos

Hi Feliciello,

Natively, I don't think this is possible. There are addon's who do this kind of thing by relying on the SDK.

Best regards,

Pedro Magueija

View Pedro Magueija's profile on LinkedIn