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

Return structure in function module

Former Member
0 Likes
707

Hi Experts,

How to add message or comments for return structure in a function module. I dont have any idea about this. Can you please suggest how to do this.

It would be great if you could help me out in this regard.

POINTS PROMISED

Regards,

Buvana

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
544

Hi

If you observe any fun module after the exceptions

there will be check for

if sy-subrc <> 0

message with Message fields f1 f2 f3 f4 ...

else.

<do processing>

endif.

so you have to format this message fields into a string and to display the text

Reward points for useful Answers

Regards

Anji

3 REPLIES 3
Read only

Former Member
0 Likes
545

Hi

If you observe any fun module after the exceptions

there will be check for

if sy-subrc <> 0

message with Message fields f1 f2 f3 f4 ...

else.

<do processing>

endif.

so you have to format this message fields into a string and to display the text

Reward points for useful Answers

Regards

Anji

Read only

Former Member
0 Likes
544

do you mean you have a custom Z function module to which you want to add a return structure with a message?

can you clarify what you want to do?

Read only

0 Likes
544

Yes, its a custom function module only. I have to update a custom table which maintains the return deliveries from the customers using this function module. So i need to return errors when irrelevant data are passed into the function module.