03-31-2006 6:31 AM
Hi all,
I have a subroutine and it is passed a structure
This subroutine is calling a FM which is an exit .
Can i access and change the value of field in the structure ( which is passed to subroutine ) in the exit.
Currently , that structure is out of scope in the exit.
Please help me .
Thanks and Regards
Gurpreet Singh
03-31-2006 6:40 AM
Hi gurpreet,
1. we can access like this
( try in debug mode, inside the exit fm)
2. (programname)variablename
also use the BRACKETS.
the variable name should be global
to the calling program.
regards,
amit m.
03-31-2006 6:42 AM
Gurpreet,
You cannot modify unless its being passed as a changing parameter to the function module.
Through the back door, you can see if that structure is active in the memory in debug mode and if yes, assign it to a field symbol and change the value.
However, it is not recommended that you do this as it might cause some inconsistency.
Regards,
Ravi
Note : Please mark the helpful answers.
03-31-2006 7:04 AM
Hello Gurpreet,
U can access and change the structure in the exit even though it is not passed to the exit.
Main program ZABC_MAIN
structure zabc is passed to subroutine
within this subroutine call to exit..
FM exit_zbc...
data: fld(50) value '(ZABC_MAIN)zabc'.
field-symbols: <fs1>.
assign (fld) to <fs1>.
Now this fields symbol is pointing to the structure. U can try in debub mode also before coding this. When in exit type (ZABC_MAIN)zabc in the fields and c if it shows value.