Edited, with duplicable code.
I have two RFC function modules:
FUNCTION Z_MATT_TEST1.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"----------------------------------------------------------------------
ENDFUNCTION.
and
FUNCTION Z_MATT_TEST2.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(I_REASON) TYPE STRING
*"----------------------------------------------------------------------
ENDFUNCTION.
REPORT ymabitest2.
CALL FUNCTION 'Z_MATT_TEST1'
DESTINATION 'OTHER_SYSTEM'.
CALL FUNCTION 'Z_MATT_TEST2'
DESTINATION 'OTHER_SYSTEM'
EXPORTING
i_reason = 'The reason'.
These FM exist in OTHER_SYSTEM but Z_MATT_TEST2 has an endless loop so I can debug
DATA x.
WHILE x IS INITIAL.
ENDWHILE.
When I run ymabitest2, in debug on OTHER_SYSTEM, I can see that i_reason contains 'T'.
If I comment out the call to Z_MATT_TEST1, in debug on OTHER_SYSTEM , I can see that i_reason contains 'The reason'.
This only happens if
a) Both FM are called
b) i_reason is supplied with a type C variable or literal. If it is supplied with a string literal or variable, it's fine.