1 DATA: lv_error TYPE char100. 2 3 CALL FUNCTION 'ZRFC_WM_ZEL001' DESTINATION lv_desc 4 EXPORTING 5 process_flag = lv_zclbs 6 IMPORTING 7 return_value = lv_subrc 8 return_message = lv_message 9 TABLES 10 zel_stockchange_head = lt_stockchange_head 11 zel_stockchange_item = lt_stockchange_item 12 EXCEPTIONS 13 system_failure = 1 MESSAGE lv_error 14 communication_failure = 2 MESSAGE lv_error 15 OTHERS = 3. 16 17 IF sy-subrc = 0. 18 e_subrc = lv_subrc. 19 e_message = lv_message. 20 ELSE. 21 e_subrc = sy-subrc. 22 * e_message = 'RFC连接错误'. 23 e_message = lv_error. 24 ENDIF.
lv_error 记录报错消息