Hi Srikant,
apart from my above written code snippet, you have to implement two perform statement
like shown below. This will show error and success messages accordingly.
*Report for success
PERFORM success_text.
* Report for Error
PERFORM error_text.
Before fetching BDC data , declare these perform statements, and after
call transaction method, use both perform statement as .
FORM success_text.
*****write logic for success text***
ENDFORM.
FORM error_text.
****logic for error text****
ENDFORM.
Then you will get your error and success text accordingly.