Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8581

Re: Subroutine Using.. not working as expected

$
0
0

Hi Noa,

 

Thanks for your reply.

 

I have made changes to my code accordingly for Pass by value.

 

DATA p TYPE char20 VALUE '990'.

DATA r TYPE char20.

 

PERFORM cat IN PROGRAM ztest_02 USING p

                                                               CHANGING r.

 

WRITE: / p , r.

 

 

FORM cat USING          value(p_p) TYPE char20

                    CHANGING value(p_r) TYPE char20.

 

   p_p = 100.

   p_r = p_r + 20.


ENDFORM.           


But still the output is "100  20", as per your answer the changes to the formal parameters  should not effect actual parameter right.


Pls correct me if I am wrong.


Regards

Raghu


Viewing all articles
Browse latest Browse all 8581

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>