avCheckInstanceAuth Example

This documentation is not applicable to VLF-ONE

Example of an avCheckInstanceAuth User IIP in UF_SYSTM (or equivalent):

 

Mthroutine Name(avCheckInstanceAuth) Options(*Redefine)
* ==> Define_Map For(*input)  Class(#std_obj) Name(#UserProfile)
* ==> Define_Map for(*input) class(#vf_eltxts) Name(#ObjectType)
* ==> Define_Map For(*input)  Class(#vf_elidn) Name(#BusObjectName)
* ==> Define_Map For(*input)  Class(#vf_elidn) Name(#CmdObjectName) mandatory(' ')
* ==> Define_Map For(*output) Class(#std_Bool) Name(#ReturnCode)
* ==> Define_Map for(*output) class(#std_TextL) Name(#UserAuthInformation) mandatory(' ')

* ==> Define_map for(*input) class(#vf_elXAK1) Name(#AKey1)
* ==> Define_map for(*input) class(#vf_elXAK2) Name(#AKey2)
* ==> Define_map for(*input) class(#vf_elXAK3) Name(#AKey3)
* ==> Define_map for(*input) class(#vf_elXAK4) Name(#AKey4)
* ==> Define_map for(*input) class(#vf_elXAK5) Name(#AKey5)
* ==> Define_map for(*input) class(#vf_elXNK1) Name(#NKey1)
* ==> Define_map for(*input) class(#vf_elXNK2) Name(#NKey2)
* ==> Define_map for(*input) class(#vf_elXNK3) Name(#NKey3)
* ==> Define_map for(*input) class(#vf_elXNK4) Name(#NKey4)
* ==> Define_map for(*input) class(#vf_elXNK5) Name(#NKey5)

Set Com(#ReturnCode) Value(OK)

Define Field(#UF_WKOBJT) Reffld(#VF_ELIDN)
Define Field(#UF_WKOBJ1) Reffld(#VF_ELIDN)
Define Field(#UF_WKOBJ2) Reffld(#VF_ELIDN)

Change Field(#UF_WKOBJT) To('#OBJECTTYPE.VALUE')
Change Field(#UF_WKOBJ1) To('#BusObjectName.VALUE')
Change Field(#UF_WKOBJ2) To('#CmdObjectName.VALUE')

Case Of_Field(#UF_WKOBJT)
When Value_Is('= BUSINESS_OBJECT')

Case Of_Field(#UF_WKOBJ1)
When Value_Is('= EMPLOYEES')

Case Of_Field(#UF_WKOBJ2)
When Value_Is('= SKILLS')
* invoked by the Framework to determine
* whether to show a command tab
If Cond('#AKEY1.VALUE *eq A1002')
Set Com(#ReturnCode) Value(ER)
Endif
When Value_Is('= VIDEO')
* invoked by the Framework to determine
* whether to show a command tab
If Cond('#AKEY1.Value *eq A1001')
Set Com(#ReturnCode) Value(ER)
Endif
when '= *blanks'
* this routine has been invoked from
* a filter in order to determine whether
* to add an entry to the instance list
If Cond('#AKEY1.Value *eq A1003')
Set Com(#ReturnCode) Value(ER)
Endif
Endcase
Endcase

Endcase

Endroutine