cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to know if current system is Production System, in S/4HANA Cloud Public Edition?

diego_valentino
Explorer
0 Kudos
150

Hi everyone,

For one of my developments in S/4HANA Cloud Public Edition, I need to build some logic depending if the current system is Production System or not.

In On-Premise systems I used to use table T000 or class CL_ABAP_SYST to do so, but I cannot use them in Cloud Public since they are not released for Cloud Development (Contract C1).

Does anyone know if there's another way to get such information? I took a look at all classes released for cloud, including the XCO libraries, but couldn't find anything suitable.

Thanks.

View Entire Topic
Pooja_Hadagali
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi

CL_ABAP_SYST was removed from SAP S/4HANA CLOUD 1811 since it wasn't suitable for cloud deployments.

As alternative you may use CL_ABAP_CONTEXT_INFO.

And also you can use SY-SYSID is a system field which gives the system ID

For more info, Refer the below doc

ABAP Keyword Documentation

Best Regards,

Pooja

diego_valentino
Explorer
0 Kudos

Hi  @Pooja_Hadagali  

I was expecting to have some flag like the one on table T000 which shows "P" when we work on a production system, but that's ok. I think I'll go with a SY-SYSID validation.

Thanks for the information

EDIT: When I tried to release my transport, Eclipse showed the ATC error "The use of the hard-coded system ID can present a security risk". I'll have to go for the URL option.

It's a shame that SAP put all this stoppers everywhere we go, even for simple things.