I'm calling a RFC function in an XI system:
CALL FUNCTION 'Z_HR_RFC_GEI_ENVIARLIQUIDACION' DESTINATION 'RFC_XIADAPTER_GEI'
EXPORTING
reinr = p_tripnr_sap
pernr = trip_header-pernr
landx = p_trip_landx
datv1 = p_datini
datb1 = p_datfin
uname = p_uname
auto = '1'
IMPORTING
codgei = p_codgei
desgei = p_desgei
RESULT = p_result
TABLES
expenses = t_lineas
ordenes = t_ordenes
EXCEPTIONS
system_failure = 1
OTHERS = 2.
And I get sy-subrc = 1. The curious thing is that when I send wrong data (an empty table of expenses, for example) y correctly get the error (no expenses lines) from the remote system and sy-subrc returns 0.
What can the problem be?
Thank you in advance.