Skip to Content
0
Former Member
Oct 12, 2006 at 06:18 AM

Dynamic access of fields

74 Views

Hi,

Can anyone tell me how I can dynamically access a field existing in a FM from another FM called from this FM without passing it through parameters.

Example.

FUNCTION LEVEL1_FUNCTION.

data: var1 type i.

var1 = 10.

CALL FUNCTION 'LEVEL2_FUNCTION'.

ENDFUNCTION.

FUNCTION LEVEL2_FUNCTION.

  • " Here I want to access var1 of LEVEL1_FUNCTION.

  • I don't have a way to pass var1 as a parameter.

ENDFUNCTION.

Is this possible, if so please let me know.

Give me your solutions for two possibilities:

1. If both FMs belongs to same Function group.

2. If both FMs belongs to different Function groups.

Pleae Note: I don't want to use IMPORT/EXPORT statements.

Thanks,

Surendra