on 07-22-2008 12:38 PM
Hi,
For preparing a Sales report we need to fetch Excise, Tax and
Education cess.
While doing the programming condition types of excise, tax and education cess were given to technical consultants.
It is like hard coding the programming. In future if a new condition type is created then it wont be calculated.
What are the ways to avoid hard coding?
regards,
sathya
Hi Sathya,
You can use Control Break Statements in the ABAP program to avoid these kind of hard codings Like at new condition type, At last, On change of, at first etc. I will be good if you paste a piece of code so that verybody can analyze the same.
May be you can check with your programmer regarding this.
Hope it helps.
Thanks & Regards,
Nagaraj Kalbavi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can create a Z-Table that you are using for referencing your data e.g. condition type. This way this is customizable.
In a project I worked before we even had a more sophisticated way for avoiding hardcoding. We had one generic table including Program name, "Function to be exextued" (e.g. determination of condition) and the key value. And we had a function module reading these parameters from the gerneric table. Everytime you would need a specific value from this table you called this table via the function module.This way you had a customizable table and no more hardcoding was needed, the function module provided you with the values.
Hello,
This can be effectively discuss with your technical consultnats. Because they might have hard coded because of some specific reasons, check with them. They can give you the alternative more specifically.
Prase
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You dont need a Z table. You can fetch data from standard table.
To avoid hard coding you would have to use defaulted variables. I mean you can give default values for variables when you define them. However, you would have to update your program once you have a new condition type. Since you want to check the condition.
This way you no longer have to do hard-coding. But, define the variables for the same.
Regards,
Srilatha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
8 | |
7 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.