Sei sulla pagina 1di 5

To change the menu dynamically.

We can change the menu dynamically using the table EB.DYNAMIC.ATTRIBUTES.

Steps to be followed to change the menu dynamically:

1) Create the required menu using the application HELPTEXT.MENU.

BNK R05BASE HELPTEXT.MENU SEE

MENU.NAME......... BNKMENU
------------------------------------------------------------------------------
1. 1 APPL CUSTOMER
2. 1. 1 GB DESCRIPT. VEIW CUSTOMER
5 CURR.NO........... 3
6. 1 INPUTTER....... 67_TESTER
7. 1 DATE.TIME...... 11 FEB 09 12:20
8 AUTHORISER........ 67_TESTER
9 CO.CODE........... US-001-0001 BNK R05BASE
10 DEPT.CODE......... 1
------------------------------------------------------------------------------

2) Attach the menu which should get display by default in the field INIT.APPLICATION of USER record.

BNK R05BASE USER PROFILE SEE

USER.ID........... JAYANTHI.1
------------------------------------------------------------------------------
1 USER.NAME......... JAYANTHI1
2 SIGN.ON.NAME...... JAYANTHI1
3 CLASSIFICATION.... INTERNAL
4 LANGUAGE.......... 1 English
5. 1 COMPANY.CODE... US0010001 BNK R05BASE
5. 2 COMPANY.CODE... DE0010001 CO2 R05ESE01 R05.000
6 DEPARTMENT.CODE... 1 Implementation
7 PASSWORD.VALIDITY. 01 AUG 2009 M0601 01 AUG 2009 Every 6 months on day 1
8 START.DATE.PROFILE 01 JAN 1985
9 END.DATE.PROFILE.. 31 DEC 2009
10. 1 START.TIME..... 00:00
11. 1 END.TIME....... 23:59
12 TIME.OUT.MINUTES.. 999
13 ATTEMPTS.......... 9
14 INIT.APPLICATION.. ?BNKMENU
17. 1 COMPANY.RESTR.. DE0010001 CO2 R05ESE01 R05.000
------------------------------------------------------------------------------
3) Create the routine to change the menu dynamically based on the company.

This routine will pass the ID (say Y.ID) and the relevant record(say MENU.REC) as arguments which can then be
modified and returned back to T24 to use instead of the original or default menu.
When the user logs in with default (BNK) company, the default menu(BNKMENU) which is attached in
corresponding USER record will get displayed. And after when he changes the company, the below routine will get
triggered and the relevant menu will get changed with the menu applications as we specified in the local routine
according to the company.
In the below routine, the MENU is modified if the COMPANY is DE0010001, this will have the menu VIEW ACCOUNT
with application ACCOUNT.

Modify the below routine as per your requirement.

SUBROUTINE TEST.MENU(Y.ID,MENU.REC)
$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_F.COMPANY
$INSERT I_F.HELPTEXT.MENU
FN.HELP = 'F.HELPTEXT.MENU'
F.HELP = ''
CALL OPF(FN.HELP,F.HELP)
MENU.REC = ''
MENU.ERR = ''
CALL F.READ(FN.HELP,Y.ID,MENU.REC,F.HELP,MENU.ERR)
IF ID.COMPANY = 'DE0010001' THEN
MENU.REC<EB.MEN.APPLICATION> = "ACCOUNT"
MENU.REC<EB.MEN.DESCRIPT> = "VIEW ACCOUNT"
END
RETURN
END

4) Attach this routine to EB.DYNAMIC.ATTRIBUTES table in the field MENU.RTN field. This routine should
have entry in EB.API and PGM.FILE files.

BNK R05BASE Dyanmic Attributes SEE

DYN.HOOK.......... SYSTEM
------------------------------------------------------------------------------
4 MENU.RTN.......... TEST.MENU TEST.MENU
12 CURR.NO........... 2
13. 1 INPUTTER....... 85_TRAINEE14
14. 1 DATE.TIME...... 11 FEB 09 11:48
15 AUTHORISER........ 85_TRAINEE14
16 CO.CODE........... US-001-0001 BNK R05BASE
17 DEPT.CODE......... 1
------------------------------------------------------------------------------
5) Now login into T24 Browser and we could see the default menu is displayed which is attached to the USER
record.

In the above screenshot we could see that the default menu VIEW CUSTOMER is displayed.

And when we change the company, the menu will get displayed according to the company as specified the
local routine.
In the above screenshot we could see the menu VIEW ACCOUNT is displayed when the user has changed
the company (CO2 DE0010001).

This is how we can change the menu dynamically based on the COMPANY for the same user.

Potrebbero piacerti anche