|**STOCKHOLDERS' EQUITY (Tables)**                                          | 12 Months Ended                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
|-------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|**Stockholders' Equity Note [Abstract]**                                   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
|Schedule of Share Repurchases under Authorized Programs                    | Stock repurchases under the two stock repurchase programs were as follows during the fiscal years ended June 30:202020192018AmountShares(in thousands)AmountShares(in thousands)AmountShares(in thousands)Open-market purchase program$85577$3282,266$95749Evergreen Program1579543322,2081771,422Total stock repurchases$2421,531$6604,474$2722,171                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
|                                                                           |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
|                                                                           | 2020                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
|                                                                           | Amount                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
|Open-market purchase program                                               | $                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
|Evergreen Program                                                          | 157                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
|Total stock repurchases                                                    | $                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
|Dividends Declared                                                         | Dividends per share paid during the fiscal years ended June 30 were as follows:202020192018Dividends per share paid$4.24$3.84$3.48                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
|                                                                           |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
|                                                                           | 2020                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
|Dividends per share paid                                                   | $                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
|Schedule of Accumulated Other Comprehensive Income (Loss)                  | Changes in Accumulated other comprehensive net (loss) income by component were as follows for the fiscal years ended June 30:Foreign currencytranslation adjustmentsNetunrealizedgains(losses) onderivativesPension andpostretirementbenefitadjustmentsAccumulatedothercomprehensive net(loss) incomeBalance June 30, 2017$(356)$(37)$(150)$(543)Other comprehensive (loss) income beforereclassifications(20)811(1)Amounts reclassified from Accumulated othercomprehensive net (loss) income—6814Income tax benefit (expense)(8)(2)(7)(17)Net current period other comprehensive (loss) income(28)1212(4)Balance June 30, 2018(384)(25)(138)(547)Other comprehensive (loss) income beforereclassifications(20)(5)—(25)Amounts reclassified from Accumulated othercomprehensive net (loss) income—6612Income tax benefit (expense)(2)1(2)(3)Net current period other comprehensive (loss) income(22)24(16)Cumulative effect of accounting changes(1)(8)—(31)(39)Balance June 30, 2019(414)(23)(165)(602)Other comprehensive (loss) income beforereclassifications(35)(5)(16)(56)Amounts reclassified from Accumulated othercomprehensive net (loss) income—10717Income tax benefit (expense)(1)—21Net current period other comprehensive (loss) income(36)5(7)(38)Balance June 30, 2020$(450)$(18)$(172)$(640)(1) The opening balance of Accumulated other comprehensive net (loss) income was adjusted as a result of adopting ASU No. 2018-02, “Income Statement-Reporting Comprehensive Income (ASC 220): Reclassification of Certain Tax Effects from Accumulated Other Comprehensive Income,” on April 1, 2019.
|                                                                           |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
|                                                                           | Foreign currencytranslation adjustments                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              
|Balance June 30, 2017                                                      | $                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
|Other comprehensive (loss) income beforereclassifications                  | (20)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
|Amounts reclassified from Accumulated othercomprehensive net (loss) income | —                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
|Income tax benefit (expense)                                               | (8)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
|Net current period other comprehensive (loss) income                       | (28)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
|Balance June 30, 2018                                                      | (384)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
|Other comprehensive (loss) income beforereclassifications                  | (20)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
|Amounts reclassified from Accumulated othercomprehensive net (loss) income | —                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
|Income tax benefit (expense)                                               | (2)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
|Net current period other comprehensive (loss) income                       | (22)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
|Cumulative effect of accounting changes(1)                                 | (8)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
|Balance June 30, 2019                                                      | (414)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
|Other comprehensive (loss) income beforereclassifications                  | (35)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
|Amounts reclassified from Accumulated othercomprehensive net (loss) income | —                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
|Income tax benefit (expense)                                               | (1)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
|Net current period other comprehensive (loss) income                       | (36)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
|Balance June 30, 2020                                                      | $                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

X- DefinitionTabular disclosure of information related to dividends declared, including paid and unpaid dividends.
+ ReferencesNo definition available.
+ Details**Name:**
us-gaap_DividendsDeclaredTableTextBlock**Namespace Prefix:**
us-gaap_**Data Type:**
nonnum:textBlockItemType**Balance Type:**
na**Period Type:**
duration X- DefinitionTabular disclosure of the components of accumulated other comprehensive income (loss).
+ ReferencesReference 1: http://www.xbrl.org/2009/role/commonPracticeRef -Publisher FASB -Name Accounting Standards Codification -Topic 830 -SubTopic 30 -Section 50 -Paragraph 1 -URI http://asc.fasb.org/extlink&oid=6450520&loc=d3e32583-110901Reference 2: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 220 -SubTopic 10 -Section 45 -Paragraph 14A -URI http://asc.fasb.org/extlink&oid=121641772&loc=SL7669686-108580Reference 3: http://www.xbrl.org/2009/role/commonPracticeRef -Publisher FASB -Name Accounting Standards Codification -Topic 830 -SubTopic 30 -Section 45 -Paragraph 20 -URI http://asc.fasb.org/extlink&oid=118261656&loc=d3e32211-110900
+ Details**Name:**
us-gaap_ScheduleOfAccumulatedOtherComprehensiveIncomeLossTableTextBlock**Namespace Prefix:**
us-gaap_**Data Type:**
nonnum:textBlockItemType**Balance Type:**
na**Period Type:**
duration X- DefinitionTabular disclosure of treasury stock, including, but not limited to, average cost per share, description of share repurchase program, shares repurchased, shares held for each class of treasury stock.
+ ReferencesReference 1: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 505 -SubTopic 30 -Section 50 -Paragraph 3 -URI http://asc.fasb.org/extlink&oid=6405834&loc=d3e23309-112656Reference 2: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 505 -SubTopic 30 -Section 45 -Paragraph 1 -URI http://asc.fasb.org/extlink&oid=6405813&loc=d3e23239-112655Reference 3: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 505 -SubTopic 30 -Section 50 -Paragraph 4 -URI http://asc.fasb.org/extlink&oid=6405834&loc=d3e23315-112656Reference 4: http://fasb.org/us-gaap/role/ref/legacyRef -Publisher FASB -Name Accounting Standards Codification -Topic 505 -SubTopic 30 -Section 50 -Paragraph 2 -URI http://asc.fasb.org/extlink&oid=6405834&loc=d3e23285-112656
+ Details**Name:**
us-gaap_ScheduleOfTreasuryStockByClassTextBlock**Namespace Prefix:**
us-gaap_**Data Type:**
nonnum:textBlockItemType**Balance Type:**
na**Period Type:**
duration X- ReferencesNo definition available.
+ Details**Name:**
us-gaap_StockholdersEquityNoteAbstract**Namespace Prefix:**
us-gaap_**Data Type:**
xbrli:stringItemType**Balance Type:**
na**Period Type:**
duration