‎2007 Feb 27 10:23 AM
my subroutine is written in one program.
I m using it in another program.
i checked with the breakpoint...
The control goes to the subroutine fetches the data in the structure but when the control returns to the main program the structure is empty.
Now wat should i do either write the routine in the same program or have to use import & export memory which is best based on performance.
‎2007 Feb 27 10:25 AM
Hi Ram,
Do you call the subroutine with PERFORM (.....) CHANGING <output-structure>? IF the structure is only used locally in the other program it will never get into the calling program.
Regards,
John.
‎2007 Feb 27 10:26 AM
Why not have the Changing addition to the subroutine?
as in:
perform add using num1 num2 changing sum.
Regards,
Ravi
‎2007 Feb 27 12:21 PM
hi
let us also the location of the subroutine..i mean in differnt client no or in the same. If the subroutine is in the same client no..then you can use the Perform statement in the sapscript to call the extra functionality from the print program or in any location but with in the same system(client).
In case of external subroutine, i think you need to use the client-specified statement in the print program while selecting the data.
eg.
select f1
f2
f3
from zzkna1
into i_tab
cleint-specified where mandt = <client no from where you are fetching the data>
this may work.
regards,
shamim.