| 
         GOODWILL AND PURCHASED INTANGIBLE ASSETS - Amortization Expense for Purchased Intangible Assets (Details) - USD ($) $ in Thousands | 12 Months Ended | |
|---|---|---|
| 
         Jun. 30, 2020 | 
         Jun. 30, 2019 | |
| Finite-Lived Intangible Assets [Line Items] | ||
| Amortization expense | $ 220,579 | $ 87,392 | 
| Costs of revenues | ||
| Finite-Lived Intangible Assets [Line Items] | ||
| Amortization expense | 145,823 | 52,387 | 
| Selling, general and administrative | ||
| Finite-Lived Intangible Assets [Line Items] | ||
| Amortization expense | 74,532 | 34,992 | 
| Research and development | ||
| Finite-Lived Intangible Assets [Line Items] | ||
| Amortization expense | $ 224 | $ 13 | 
| X | ||||||||||
| 
          - Definition
           The aggregate expense charged against earnings to allocate the cost of intangible assets (nonphysical assets not used in production) in a systematic and rational manner to the periods expected to benefit from such assets. As a noncash expense, this element is added back to net income when calculating cash provided by or used in operations using the indirect method. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
          - Definition
           Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table. No definition available. 
 | 
| X | ||||||||||
| 
          - Details
           
 | 
| X | ||||||||||
| 
          - Details
           
 | 
| X | ||||||||||
| 
          - Details
           
 |