Application Development 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: 

What is salv_de_layout_restriction and disvariant-variant?

Romy_A_98
Explorer
0 Kudos

Hello and good morning!
I'm very much a beginner when it comes to ABAP, and right now I was given the task to go through some ALV code and see how they do it. There's many things I don't understand, one of them being what salv_de_layout_restriction is? In the code it is used as a type, like this:

 

 

types: begin of g_type_s_test,
         amount    type i,
         repid     type syrepid,
         display   type i,
         restrict  type salv_de_layout_restriction,
         default   type sap_bool,
         layout    type disvariant-variant,
         load_layo type sap_bool,
       end of g_type_s_test.

 

 

Maybe I'm being way too detailed when it comes to understanding every little thing, but I really want to know what it is I'm using. I've seen salv_de_layout_restriction be used in other code examples, but haven't found any explanation as to what it is, what you can do with it, etc. So I was wondering if anyone could help me? 

4 REPLIES 4

Sandra_Rossi
Active Contributor
0 Kudos

If you don't find usage of restrict elsewhere in the code, then it's not used. No need to spend time on it.

thomas_mller13
Participant

The domain values explain it all:

thomas_mller13_0-1712738169213.png

It defines if layouts can be stored as user specific or cross user ...

Disvariant-variant is one layout variant. A layout variant is a saved  "how the ALV-list looks currently".

Ah thank you, I honestly didn't think to check what's in the domain and I'll remember that for next time. Have a great day!

raymond_giuseppi
Active Contributor

Double-clik on it, you will get a data element with its documentation and double-click on domain name for values (here a list, but can also be a table of values)