‎2012 May 07 2:18 PM
Hi all.
I have an FM exit, where it is an importing parameter say e_tq32.
after the exit call, first it calls FM X. where in the beginning of the FM the value to e_tq32 is filled. so, now e_tq32 has some value.
in the furthur code there is an exception raised due to some code, then once the call come out FM to the main the exit call,
the value e_tq32 is getting clear. but it should not. is'not it??
can you please advise what could be the reason.
Regards,
Venkat
‎2012 May 07 2:59 PM
If the above question is not clear, below is the short explanation about prob.
call function 'XYZ'
EXPORTING
i_matnr = i_matnr
i_werks = i_werks
i_tq32 = i_tq32
IMPORTING
e_tq32 = l_tq32
EXCEPTIONS
no_insptype = 1
OTHERS = 2.
Function XYZ.
MOVE-CORRESPONDING i_tq32 TO e_tq32.
IF 1 = 1.
RAISE no_insptype.
ENDIF:
ENDFUNCTION.
Now my question is l_tq32 is getting clear, even it is assigned value.
‎2012 May 07 2:59 PM
If the above question is not clear, below is the short explanation about prob.
call function 'XYZ'
EXPORTING
i_matnr = i_matnr
i_werks = i_werks
i_tq32 = i_tq32
IMPORTING
e_tq32 = l_tq32
EXCEPTIONS
no_insptype = 1
OTHERS = 2.
Function XYZ.
MOVE-CORRESPONDING i_tq32 TO e_tq32.
IF 1 = 1.
RAISE no_insptype.
ENDIF:
ENDFUNCTION.
Now my question is l_tq32 is getting clear, even it is assigned value.
‎2012 May 07 3:09 PM
When the raise statement is executed, control returns immediately to the call function statement and a value is assigned to sy-subrc based on the exceptions you have listed there. Values assigned to export parameters are not copied back to the calling program.
‎2012 May 07 3:15 PM
Hi all,
I got the answer. i forgot to uncheck the 'Pass Value' .
Regards,
Venkat