Hello @Beginner23 
This requires modification on the related view combining current user’s combination rules with the view.
You cannot resolve it on application level.
Hope this helps
Furkan
                
     
                                    
            Hello,
I think I can confirm what @Furkan Zengin said. 
Problem is technical - when you press F8, system is passing remaining key values to the view used in LOV - for code part it is company only. 
To filter allowed values depending on allowed combinations, you should define additionally 2 of remaining 3 fields as a key: cost center, department, segment. It requires creation of brand new view and use it as LOV. 
If you consider technical change please keep in mind that LOV selection is not company-dependent. It is fine if you have single company or all companies share the same logic. 
You must remember as well that LOV for code part value is used in multiple places in IFS system - doing voucher entry is one example, but same LOV is using during posting supplier invoice and enter preposting in various objects. Especially in preposting cases, not all 3 dimensions: department, segment or cost center could came from preposting, some of them can be derived from posting control…
As you can see, change is not so easy even logically, not digging to technical details.