11-28-2007 1:08 PM
Hi all,
I'm looking for a FM to know if the running system is dev, qa or Prod ??
Thanks
11-28-2007 1:44 PM
Check the table T000 field CCCATEGORY to see if the system is PROD etc.
run program in test system only
SELECT SINGLE cccategory FROM t000
INTO t000-cccategory
WHERE mandt EQ sy-mandt.
IF t000-cccategory EQ 'P'.
MESSAGE e637.
ENDIF.
Hope this helps.
Cheers
A
11-28-2007 1:13 PM
CASE sy-sysid.
WHEN 'DEV'.
-
WHEN 'QAS'.
-
WHEN 'PRD'.
-
ENDCASE.
11-28-2007 1:16 PM
11-28-2007 1:21 PM
Hi,
thanks for the answers but both this methods check SY-SYSID which is the system name. If my system name is "AAA" i cannot know if this is a prd or a dev system... I cannot rely on the fact that the system names are hardcoded...
11-28-2007 1:35 PM
Hi Dany,
Check with your basis person. They must have created a framework for the different servers and their clients. Generally a bespoke table is maintained to store such details.
If they have not maintained any such table, in that case there is no other option apart from hardcoding.
Lokesh
Pls. reward if it helps.
11-28-2007 1:39 PM
what is so hard to remember if the system with the name "AAA" is a dev, test or prod system? system names dont change a lot, so you really can try to learn those 3 abbreviations.
11-28-2007 1:42 PM
Hi Florian,
this is because I want to be able to execute my program within different installations, not only at one SAP customer. "AAA" could be dev for 1 installation and prod for another customer.
Thanks.
11-28-2007 1:44 PM
Check the table T000 field CCCATEGORY to see if the system is PROD etc.
run program in test system only
SELECT SINGLE cccategory FROM t000
INTO t000-cccategory
WHERE mandt EQ sy-mandt.
IF t000-cccategory EQ 'P'.
MESSAGE e637.
ENDIF.
Hope this helps.
Cheers
A
11-28-2007 1:54 PM