On Admin Panel I need to create a sub-menu in Configuration that has a page. On that page I want to declare a global attribute and add a field that takes the values for this attribute.
I think answer from Magento2 : how to create admin page with configuration fields can help you.
system.xml has following attributes:
showInDefault- show item in Global scope
showInWebsite- show item in Website scope
showInStore- show item in Store View scope
If you set
0 the item will show in Global scope