Section: 5.7.10.4 Actions for the Random Access report determination
Content: Upon successfully performing random-access procedure initialized with 4-step or 2-step RA type, or upon failed or successfully completed on-demand system information acquisition procedure in RRC_IDLE or RRC_INACTIVE state, or upon failed or successfully completed RA-SDT operation as specified in clause 5.3.13.5, the UE shall: 1> if the RPLMN or the PLMN selected by upper layers (see TS24.501[ Non-Access-Stratum (NAS) protocol for 5G System (5GS); Stage 3 ]  [23]) from the PLMN(s) included in the plmn-IdentityList in SIB1 is not included in plmn-IdentityList stored in a non-empty VarRA-Report; or 1> if the registered SNPN or the SNPN selected by upper layers (see TS24.501[ Non-Access-Stratum (NAS) protocol for 5G System (5GS); Stage 3 ]  [23]) from the list of SNPN(s) included in the NPN-IdentityInfoList in SIB1is not included in plmn-IdentityList stored in a non-empty VarRA-Report: 2> clear the information included in VarRA-Report; 1> if the UE is not in SNPN access mode and if the number of RA-Report entries stored in the ra-ReportList in VarRA-Report is less than maxRAReport: 2> if the number of PLMN entries in plmn-IdentityList stored in VarRA-Report is less than maxPLMN; or 2> if the number of PLMN entries in plmn-IdentityList stored in VarRA-Report is equal to maxPLMN and the list of EPLMNs is subset of or equal to the plmn-IdentityList stored in VarRA-Report: 3> append the following contents associated to the successfully completed random-access procedure or the failed or successfully completed on-demand system information acquisition procedure as a new entry in the VarRA-Report: 4> if the list of EPLMNs has been stored by the UE: 5> set the plmn-IdentityList to include the list of EPLMNs stored by the UE (i.e. includes the RPLMN) without exceeding the limit of maxPLMN; 4> else: 5> set the plmn-Identity, in plmn-IdentityList, to the PLMN selected by upper layers (see TS 24.501[ Non-Access-Stratum (NAS) protocol for 5G System (5GS); Stage 3 ]  [23]) from the PLMN(s) included in the plmn-IdentityInfoList in SIB1; 4> set the cellId to the global cell identity and the tracking area code, if available, otherwise to the physical cell identity and carrier frequency of the cell in which the corresponding random-access preamble was transmitted; 4> if the UE supports spCell ID indication: 5> if the corresponding random-access procedure was performed on an SCell of MCG: 6> set the spCellId to the global cell identity of the PCell; 5> if the corresponding random-access procedure was performed on an SCell of SCG: 6> set the spCellId to the global cell identity of the PSCell, if available, otherwise, set the spCellId to the global cell identity of the PCell; 5> if the corresponding random-access procedure was performed on PSCell: 6> if the cellId is not set to the global cell identity of the PSCell, set the spCellId to the global cell identity of the PCell; 4> set the raPurpose to include the purpose of triggering the random-access procedure; 4> set the ra-InformationCommon as specified in clause 5.7.10.5. 1> if the UE is in SNPN access mode and if the number of RA-Report entries stored in the ra-ReportList in VarRA-Report is less than maxRAReport: 2> if the number of SNPN identity entries in snpn-IdentityList stored in VarRA-Report is less than maxNPN; or 2> if the number of SNPN identity entries in snpn-IdentityList stored in VarRA-Report is equal to maxNPN and the list of equivalent SNPN(s) is subset of or equal to the snpn-IdentityList stored in VarRA-Report: 3> append the following contents associated to the successfully completed random-access procedure or the failed or successfully completed on-demand system information acquisition procedure as a new entry in the VarRA-Report: 4> if the list of equivalent SNPN(s) has been stored by the UE: 5> set the snpn-IdentityList to include the list of equivalent SNPN(s) stored by the UE (i.e. includes the registered SNPN) without exceeding the limit of maxNPN; 4> else: 5> set the snpn-Identity, in snpn-IdentityList, to the SNPN identity selected by upper layers (see TS 24.501[ Non-Access-Stratum (NAS) protocol for 5G System (5GS); Stage 3 ]  [23]) from the SNPN identities included in the NPN-IdentityInfoList in SIB1; 4> set the cellId to the global cell identity and the tracking area code, if available, otherwise to the physical cell identity and carrier frequency of the cell in which the corresponding random-access preamble was transmitted; 4> if the UE supports spCell ID indication: 5> if the corresponding random-access procedure was performed on an SCell of MCG: 6> set the spCellId to the global cell identity of the PCell; 5> if the corresponding random-access procedure was performed on an SCell of SCG: 6> set the spCellId to the global cell identity of the PSCell, if available, otherwise, set the spCellId to the global cell identity of the PCell; 5> if the corresponding random-access procedure was performed on PSCell: 6> if the cellId is not set to the global cell identity of the PSCell, set the spCellId to the global cell identity of the PCell; 4> set the raPurpose to include the purpose of triggering the random-access procedure; 4> set the ra-InformationCommon as specified in clause 5.7.10.5. The UE may discard the random access report information, i.e. release the UE variable VarRA-Report, 48 hours after the last successful random access procedure or the failed or successfully completed on-demand system information acquisition procedure or the failed or successfully completed RA-SDT procedure related information is added to the VarRA-Report. NOTE 1: Void.