Application Development 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: 

Message statement in RFC FMs

Former Member
0 Kudos

hi all,

When we create any RFC enabled function modules, generally its a good practice that we shd not use "Message" statement in ABAP code. we need to use Return parameter to give messages to calling system. IF we use "message" statment of abap then will it give any dump ?

IS there any specific reason for it?

please help me asap.

Helpful ans will be rewarded.

thanks,

jigs

1 ACCEPTED SOLUTION

Former Member
0 Kudos

if u call message with type A/X it will gives u dump , So receiving system unable to identify whats going on the sending systems , In tht cases we uses RETURNS table as a Results of the FM call.

Regards

Prabhu

5 REPLIES 5

Former Member
0 Kudos

if u call message with type A/X it will gives u dump , So receiving system unable to identify whats going on the sending systems , In tht cases we uses RETURNS table as a Results of the FM call.

Regards

Prabhu

Former Member
0 Kudos

Hi Jigs,

Whenever we call an RFC the system fields SY-SUBRC and SY-MSG.. variables are initialized in the calling program.

If an error message or Termination message is sent, the exception SYSTEM_FAILURE is triggered by Remote FM and is received in the calling program. Hence if we want to capture the message in the calling program we have to use the return parameter.

Kindly let me know if further details are required.

Thanks & Regards,

Goutham.

Former Member
0 Kudos

Hi ,

Thanks for the ans.

I also wanted to know about information message. If messge type is 'I' then will target system give dump?

Thanks,

jigs

0 Kudos

Hi,

For message type S,I, you will get dump in the target system.

Cheers..

Santosh

Former Member
0 Kudos

hi all,

As per the std SAP documentation,

http://help.sap.com/saphelp_erp2005vp/helpdata/en/5f/8b2e16880111d194cb0000e8353423/frameset.htm

Catching Messages in the Calling Program

If messages are sent in function modules without the addition RAISING of the MESSAGEstatement, it is possible to influence message handling through specification of the implicit exception error_message in the EXCEPTION list of the statement CALL FUNCTION. If error_message is specified, the following conditions apply:

· Type S, I, and W messages are ignored (but logged during background processing)

· Type E and A messages trigger the exception error_message

· Type X messages trigger the usual runtime error and short dump.

But this is for the "error_message" exception.

what will be there for "information message " in RFC...

Helpful ans will be rewarded..

thanks,

jigs