Skip to Content
Former Member
Apr 15, 2010 at 10:50 AM

Authority Check for a selection condition/Range


I am relatively new to ABAP and still learning.

I am trying to create an authorisation check as part of a custom badi implementation.

i have amended the code, but i am just trying to figure out how to take the selection condition table to get the specific value to check.

i know the parameter - p_tplnr

this code is pulled back into the Badi..

* Import selection result
  IMPORT sel_tab = lt_nodes selcond = t_selcond           

the table is t_selcond . so i do a loop round table into structure based upon this parameter.

it could have single or multiple objects, and i am just unsure which object needs to be auth checked....

my code...

*--- Defect # 96 - Add Authorisation Check to filter out all Functional Locations.
  DATA: s_selcond TYPE rsparams.
  DATA: tplnr     TYPE diacl_lbk_sel_ds-tplnr.

*--- Read table where selection name is Functional Location
  LOOP AT t_selcond INTO s_selcond
  WHERE   selname = 'P_TPLNR'.

    IF sy-subrc = 0.

*--- Check the authorisation object for functional location
      ID 'TPLNR' FIELD tplnr
      ID 'ACTVT' FIELD '03'.


My question is how do i Authority Check the values within s_selcond when it could have single or multiple entries and could have conditions to include/exclude and have selection options?