2024 Apr 10 9:06 AM
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?
2024 Apr 10 9:32 AM
If you don't find usage of restrict elsewhere in the code, then it's not used. No need to spend time on it.
2024 Apr 10 9:36 AM - edited 2024 Apr 10 9:39 AM
The domain values explain it all:
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".
2024 Apr 10 9:43 AM
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!
2024 Apr 10 9:55 AM
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)