cancel
Showing results for 
Search instead for 
Did you mean: 

Where do you store Hard coding values?

Former Member
0 Kudos

Hi All,

We have a requirement to call a 3rd party web service from SAP for which there are 12 - 13 attributes which are constant values and are not going to change. These can be hard coded inside the implementation methods but I do not want to do it. Say after 3 months there is a additional attribute that need to be added then in that case I need not touch the code back.

We can store it Z tables which is one option. I would like to get ideas from experts here in the forum what would you do in this type of a scenario instead of hard coding?

Please post in your feedback from the maintenance perspective across landscapes.

Thanks,

Nagarajan.

Accepted Solutions (1)

Accepted Solutions (1)

saravanan_narayanan
Active Contributor
0 Kudos

Hello Nagarajan,

you can create the constants in the Assistance class or create a separate interface for storing the constant values.

If there is any change in the constant value, then you have to change the class/interface. this can't be avoided.

BR, Saravanan

Answers (1)

Answers (1)

Former Member
0 Kudos

As you have already hinted , i would consider ztables,constants in Singleton OO class. However i would prefer ztables in this case.