newly updated ! newly updated ! newly updated !newly updated !newly updated !
Hierarchy input Parameter f4 selection user customized solution searched
===========================================================
Summary:
Desired result is, that a SAP User with defined access rights can see and choose in the query input only those hierachie trees and leaves which he is authorized for.
The authorization rights for each single SAP User are available in a flat view consisting of (SAP User- Country -Region -- Company Code).
Current design Hierarchy Tree:
+-0HIER_NODE (Root=Betriebe Gesamt = All Plants)
+-- ZMO_CNTRY (Country Node = DE, AT)
+---ZMO REGION (Region Node: BER, FRO)
+----ZMO_CCODE (Company Code Leave=5070, 8000):
Current Query Design:
Hierachy node, Mulit entry, input ready variable of the filter which allows the multibed entry
Current– Customer Exit F4 Input Variable Design:
Current F4 Customers Exit Parameter Result:
Sample Desired Result:
A User with these Values Country = DE, Region=BER, Company Codes 5070, 5150, 5160 should result in this F4:
Suggested Solution With Badi RSR_VARIABLE_F4_RESTRICT
Filtervalues:
Using Class Method IF_RSR_VARIABLE_F4_RESTRICT~GET_RESTRICTION_NODE
With a Custome Class with the Method IF_RSR_VARIABLE_F4_RESTRICT~GET_RESTRICTION_NODE
???????Right Method ???????
???????But how to fill the Structures properly ??????
???????This wont do it
method IF_RSR_VARIABLE_F4_RESTRICT~GET_RESTRICTION_NODE.
DATA: l_s_node LIKE LINE OF c_t_node,
l_s_hier LIKE LINE OF c_t_hierarchy.
*
#CASE i_vnam.
**
WHEN 'ZCOMPCODE_HIERNODE_CUST_MULTI'.
* ZMO_COMPANY_HIERARCHIE_SAC is the flat view containing the
* Assigments Country Region – BUKR and via an Autorization CDS
* the right BUKrs
* GROUP By is only used to have only 1 BUKRS in the SELECT result set.
SELECT BUKRS
FROM ZMO_COMPANY_HIERARCHIE_SAC
GROUP BY BUKRS
INTO @DATA(BUKRS).
clear l_s_node.
l_s_node-niobjnm = 'ZMO_CCODE'. l_s_node-nodename = BUKRS.
APPEND l_s_node TO c_t_node.
ENDSELECT.
SELECT country
FROM ZMO_COMPANY_HIERARCHIE_SAC
GROUP BY country
INTO @DATA(country).
clear l_s_node.
l_s_node-niobjnm = 'ZMO_CNTRY'.
l_s_node-nodename = country.
APPEND l_s_node TO c_t_node.
ENDSELECT.
SELECT region
FROM ZMO_COMPANY_HIERARCHIE_SAC
GROUP BY region
INTO @DATA(region).
clear l_s_node.
l_s_node-niobjnm = 'ZMO_REGIO'.
l_s_node-nodename = region.
APPEND l_s_node TO c_t_node.
ENDCASE.
endmethod.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Subject | Kudos |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
User | Count |
---|---|
10 | |
8 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 | |
3 |