07-18-2007 10:59 AM
07-18-2007 11:04 AM
Hi,
Harcoded means that constant values have been used.
E.g
you have a report where you have hardcoded in the select statement that the compnay code is 1000. The result will be : The data would be fetched for only company code 1000. Next time you want to run the same report for another company code you will have to change the report.
Regards,
Narayani
07-18-2007 11:04 AM
Hi,
<b>hardcoded means -
> put the value of any field in 'Code' not taken as user input.
Fixing of value of field in the code.</b>eg.
data type i value '5'.
<i>
reward point for helpful answer
debjani lahiri</i>
07-18-2007 11:07 AM
Hi,
Hard coded value is like a constant.
Data: v_num type i value 12.
Data: v_num1 type i.
v_num1 = v_num.
So v_num has value 12 which is hard coded.
and v_num1 is a variable and which is not hard coded.
07-18-2007 11:10 AM
Hi,
See this
SELECT SINGLE menge meins FROM mara
INTO wrk_matnr
WHERE matnr = 'abc-0001'.
Here we are hardcoding the value of matnr in the where condition. This is apoor programming practice.
see this also.
if wk_matnr = 'abc-001'.
*Code
*code
endif.
Here also we are hardcoding the value. Instead of this we can use text elements and use it there. For creating text symbols, in menu GOto->text elements->text symbols.
In this case if we want any change later after years in this program we don't need to change the code again, We just only need to change the text symbols only.
<b>Please don't forget to reward if found helpfull</b>
Regards,
Rakesh.
07-18-2007 11:19 AM
Hardcode means writing values in the code and not geting them dynamically in runtime.
most of the cases u should avoid if since if you want to change teh value u need to touch the code.
clear?
give points if it is useful. also dont forget to close the call if u get what you want.