Skip to Content
0
Former Member
Dec 10, 2007 at 07:33 AM

how to access the global variant inside subroutines

14 Views

Hi all,

i want to access the global variant inside subrotines. how can i achieve that. pls can some modify the code scrapt as following,

REPORT Z_XC_TEST.

data: a(10) type c.

a = 'a outside'.

WRITE : / 'before:',a.

PERFORM sub.

WRITE : / 'after:',a.

form sub .

data a(10) type c.

a = 'a inside'.

WRITE : / 'inside a:',a.

endform. " sub

the result i expect is to print like,

before: a outside.

inside a: a inside.

after:a outside.

plz can anyone help me as neeful.

thanks a lot.

Samson