Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Re: Dialo programming

Former Member
0 Likes
383

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

2 REPLIES 2
Read only

Former Member
0 Likes
363

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

Read only

former_member219399
Active Participant
0 Likes
363

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.