01-14-2009 9:53 AM
Hi All,
I have one requirement in table maintanance generator.I have 4 fields werks,matnr and to other fields for uper and lower limit.I want to display only those entry in the table maintanance for which user is authorized.
I want to check authorization on plant.I want to write some logic for this where I will check the user id for auth. in authorization object and based on the authorization plant I will select those entries and display.
If somebody know something then please suggest.
Regards,
Rajesh
01-14-2009 10:04 AM
Hi,
just a suggestion.
In the table generation, you can edit some "exits" places in some points by Sap. For example in data selection or data input validation, before data display and so on.
Implementig this exit, you can (after the standard selection), delete the entries form the internal table that doesen't fullfill your requirements (eg authority-checks).
Hope it helps
Bye
Andrea
01-14-2009 11:30 AM
hi rajesh,
se54 -> menue "environment" -> events.
i think you should try AA instead of the standard routine. i think the generated subroutine is named get_<viewname>.
either you can edit the where-statement or you can work with the result itab TOTAL which ahs the fields of your view and the fields of vimflagtab.
so i would recommend to define a itab
TYPES: BEGIN OF t_itab.
INCLUDE STRUCTURE <your_view>t.
INCLUDE STRUCTURE vimflagtab.
TYPES: END OF t_itab,
ti_itab TYPE STANDARD TABLE OF t_itab.
...
and then move the TOTAL to your itab.
Hope this is getting you closer to the solution.
robert
01-14-2009 11:47 AM
check this sap help on tmg events
http://help.sap.com/saphelp_nw04/helpdata/en/06/395e3c80530f6be10000000a11405a/frameset.htm
check for event 25 for additional authorization checks
01-14-2009 3:53 PM
Hi Rajesh,
Pls goto table maint.Dialog Generat. screen of table, then Environment->Modification->Events
in change mode, you can choose event for display. and inside that event which is exit you can check authorization object written for plant(or any other field).
I think all are pointing you to use those events, please check those.
Regards,
Bin
01-15-2009 5:04 AM
Hi friends,
Thanks for the reply. I also tried the event AA but the method is standard methos which I need to change.How can I change that.
Some of u mentioned that I need to changed entries in TOTAL table but I m not getting how to change and whre to change.
Again I would like to mention that I want to delete some entries for which user is not authorized.
Kindly suggest..
Regards,
Rajesh
01-15-2009 8:12 AM
Hi Rajesh,
in the function pool you will find a subroutine get_data_-alr_sorted = 'R'.
run your table maintance and you will stop in your subroutine, which will be identical to the standard.
take a look at the tabel total after the endselect. you will see that the table-lines have no structure.
define your own itab as i described. it has to include the structure of your view and the structure of the vimtbflags. move the total to your table, so you have access to your fields.
program your own authority check to know, which entries to show in the dialog. remove the false entries from your itab. then move your itab back to total.
i hope this desciption is a little bit more detailed and you can go a step further.
kindly regards,
Robert