cancel
Showing results for 
Search instead for 
Did you mean: 

Get System ID

former_member186783
Participant
0 Kudos

Hi everyone,

THere is a webdynpro application which display some "sensitive data" , so in the test system, it should not display any kind of data, except some test users (stored in exception table)

To do this, I have some questions:

How can I determine, which system is currently used (How can I get the system ID in java webdynpro)?

What do you think? what is the best way to hide the sensitive data? My idea is to write some modification to the code where the program reads the data from the application, and if he system ID is the test system, then simply don't read anything from the database.

Thanks.

N.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Even I had a similar requirement. I used System Id to distinguish the functionality.

Assuming System Id of Test system is PC and production is BC, then use the following code.


try{
     File file = new File(".");
     String filePath [] = file.getCanonicalPath().split("/");
     if(filePath[3].equalsIgnoreCase("PC")){
          //do Test system related functionality
      }
      else if(filePath[3].equalsIgnoreCase("BC")){
           //do production system related functionlity
       }
       // Generic code follows
}
 

The fourth element in the above mentioned array(filePath[]) always contains the system Id.

Hope this will help you.

Regards,

Vishweshwara P.K.M

former_member186783
Participant
0 Kudos

Hi,

Thanks for the help. You solved my problem.

Bye

N.

Answers (0)