Hi Experrts ,
I am doing an function module to get an data with Import parameters to get an oiutput parameters .
Here, If data saved in table ( will display the output in ET_return_04) , but If data NOT saved in table 'Error message as NO DATA RECORD' .Here i am getting both output parameters.
My requirement was 'If Success need to show ET_return_04(data) only and if Error message show the 'Message' only
How to achieve it..

IF foreign_country IS NOT INITIAL.
SELECT zm_country_name FROM zmm_foreign_cou INTO TABLE @DATA(lt_foreign)
WHERE zm_country_code EQ @foreign_country-zm_country_code.
IF lt_foreign IS NOT INITIAL .
MOVE-CORRESPONDING lt_foreign TO et_return_04.
ELSEIF lt_foreign IS INITIAL.
MESSAGE 'No data found' TYPE 'E'.
ENDIF.
ENDIF.<br>