cancel
Showing results for 
Search instead for 
Did you mean: 

Restricting Variable Values on F4 for Hierarchies

former_member496538
Discoverer
0 Kudos
1,612

Hi All,

I am having a hierarchy variable but I need to restrict only few hierarchies in F4, I looked into few blogs which deals with Flat list and hierarchy nodes but could some one help me how to implement F4 values restriction for Hierarchy variable.

Thanks,

Guna

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Experts, I have similar question. Lets say we need to restrict the Values for GL Hierarchies WHERE Char of Account = 'XYZZ'

When we see the GL Hierarchies, we see <Char of Account> / GL Account. So how to restrict to one single Chart of Account? Can anybody please share the BADI enhancement code? Thanks

Vikram

Loed
Active Contributor

Hi,

If you want to filter only by a single chart of account (CoA), why don't you filter your query for that single CoA? That's easier than doing the BADI. I think filtering the CoA will also make the list for GL hierarchies limited based on the filtered CoA.

Regards,

Loed

Former Member
0 Kudos

Hi Loed,

How can we filter Hierarchies at run time in F4 listing (Selection F4 Listing) do we have option?

former_member302041
Contributor
0 Kudos

Hi,

May be you can use BADI RSR_VARIABLE_F4_RESTRICT_BADI and then in the method GET_RESTRICTION_HIER you got an internal table I_T_COMPID with queries.

Then restrict required hierarchy by required query.

BR,

former_member496538
Discoverer
0 Kudos

Hi Koen,

Thank you for your response.

My requirement was to restrict hierarchies based on query not based on user.

Please advise.

Thanks

Guna

kohesco
Active Contributor
0 Kudos

Ha didn't grab that from your question

if you use a specific variable on your hierarchy in only those queries you want that to happen and in the other queries you use other variables, you will have a query based solution, no?

grtz

Koen

former_member496538
Discoverer
0 Kudos

Hi Koen,

In the blog you have given, the code is written based on user name, I am not sure how this can be done based on query name.

Please advise.

Thanks,

Guna

kohesco
Active Contributor
0 Kudos

I see now,

you could use a ref char in the datamodel and set resitriction on that infoobject via the I_iobjnm you could have your condition

Grtz

Koen

kohesco
Active Contributor
0 Kudos