Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Changing calling programs field's value in called exit/program

Former Member
0 Kudos

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

3 REPLIES 3

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.