Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

stop function module error

Former Member
0 Likes
910

Hi,

I am using one standard function module in that function module one more function module is there in that 2nd function module we got an error but we need to stop displaying the error and need to display our custom message after comming out to our first function module in the main program

could any one please help in resolving this

4 REPLIES 4
Read only

Former Member
0 Likes
684

Hi Sachin,

Try creating your own exception to create your own custom message.

Or else try using messages like this.

message 'Error' type 'I'.

Much Regards,

Amuktha.

Read only

Former Member
0 Likes
684

Are you catching the exceptions form Main FM in your program if not it will throw hard core error.

You catch the exception and after calling FM check the sy-subrc and based on that you return custom message.

Read only

Former Member
0 Likes
684

HI Sachin,

You can do one thing..

take that error from the exporting parameters of that function modle and try to modify or delete the same message and add your custom meesage to that table parameter .

Regards!

Read only

Former Member
0 Likes
684

Hi

As u r using standard function module use Implicit enhancement. Before the 2nd funtion module u check for the condition ( either Database selection or Copying the 2nd FM as ZFM) and if its not true exit from the 2nd function module with your custome messege else let it go through the 2nd FM. Rlpy back if u need any other clarification.

Regards,

Kaushik.