‎2007 Jul 15 2:20 AM
Hi,
i have one customised screen , during packing the packing people after delivery order printed they r unpacking (clicking unpack button which is on the tool bar) , all the packers have username and password , how should i disable the unpack button if the user is packer and enable the unpack button if the user is manager,
Can any one gve me logic
Rewards will b given
‎2007 Jul 15 2:30 AM
you have name for unpack button if so
if sy-uname = username. -> deactive button
loop at screen.
if screen-name = 'NAME'.
screen-input = '0'.
modify screen.
endif.
endloop.
endif.
if sy-uname = username. -> active button
loop at screen.
if screen-name = 'NAME'.
screen-input = '1'.
modify screen.
endif.
endloop.
endif.
please write the code under pbo.
PROCESS BEFORE OUTPUT.
module mod. -> double click on mod ,it will create module ,please paste above code
MODULE STATUS_9000.
Thanks
Seshu
‎2007 Jul 17 11:58 AM
Hi,
For this you have to check authorization object. for a manager this authorization would be successful. so by checking the sy-subrc you can write the logic whether to allow or not allow the user to enter this vale.
with regards,
Vamsi
AUTHORITY-CHECK OBJECT 'z_auth_manager_obj'.
ID 'ACTVT' FIELD 'XX'.
IF SY-SUBRC NE 0. "field shd be disabled.
loop at screen.
if screen-name = 'Packed'.
screen-input = 0.
modifscreen.
endloop.
endif.
endloop.
ENDIF.