‎2006 Jan 04 11:36 AM
Anyone know if there is a way to replace a value in debug of a data item declared as a constant ?
‎2006 Jan 04 11:40 AM
Hi Paul,
I don't think there is any way to do that.
Thats is one of the major differences between a variable and a Constant.
Regards,
Ravi
‎2006 Jan 04 11:42 AM
Paul,
It is not possible to change the constant value in the debugging mode. Instead you can modify the value after assigned to some other variable.
Thanks,
Ramakrishna
‎2006 Jan 04 11:45 AM
Hi Paul,
There is no way of replacing a value assigned to a constant in debug mode.
There is a work around only for testing:
If you are debugging a Zprogram, then you can create a variable and assign the constant to a variable and use this variable wherever you want to change the value in debug mode.
Hope it helps...
Lokesh
Pls. reward appropriate points
‎2006 Jan 04 11:46 AM
hey Paul,
Instead of changing that constant value
U can change the value of the variable to which Ur comparing with that constant
for Ex : x = 5 is ur constant
compare the value of the variable .
‎2006 Jan 04 11:47 AM
change the value of the variable to which U want to compare with that constant
‎2006 Jan 04 11:56 AM
The problem is, I have a submit of another abap in the debugged program, one of the parameters for this submit is the user which is being set with a constant value. The user in the constant value, does not have appropriate authorisation to perform the task in the submitted program, so I wanted to be able to change it in debug.
SUBMIT ZBXXXXXXXX
USER C_USER <--- constant value containing user
VIA JOB P_JOBNAME
NUMBER P_JOBNUM
WITH P_KEY IN INDEXKEY
WITH P_JOB EQ P_JOBNUM
AND RETURN.
If I can't change the value of C_USER then I don't think I can easily change the user being used to call the submit without changing the program.
any suggestions ?
‎2006 Jan 04 12:03 PM
SUBMIT ZBXXXXXXXX
USER V_USER <--- constant value containing user
VIA JOB P_JOBNAME
NUMBER P_JOBNUM
WITH P_KEY IN INDEXKEY
WITH P_JOB EQ P_JOBNUM
AND RETURN.change it to variable that is the only option.
there is no meaning if you change the constant value.(they are final variables)
thanks
vijay
‎2006 Jan 04 12:22 PM
Hi,
May be u can debug the program that submits the user value to your program.
If the user value is not constant there, then u can change the user value there in debug mode and this value should get submitted later on to the next program.
Thanks
Rashmi