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 2 messages in function module

Former Member
0 Likes
579

i have 3 function modules.

zfun1,zfun2,zfun3.

all are having the export parameters as return like bapireturn.

now i am calling another two function modules (zfun2 and zfun3) in one function module zfun1.

example

My z program calls the zfun1 with the input parametes and expects the return message.

report zprogram.

call function 'zfun1'.

call function 'ZFUN2'.

do all the processing inside the function and return the message.

call funtion 'ZFUN3'.

do all the processing inside the function and return the message.

and finally after this znfun1 returns the message to zprogram.

now the problem is that how to handle two messgaes comming from 2 function modules in zfun1.

generally we will get one message and we will pass that , but here i am getting two

3 REPLIES 3
Read only

Former Member
0 Likes
506

Hi,

Just have a field type string and and move the first function module message to that string,then concatenate with the second function module message with that first and display the two messages.

Read only

Sm1tje
Active Contributor
0 Likes
506

So why not create a table of BAPIRET2 structure. This way you can add all messages into this table.

Read only

Former Member
0 Likes
506

how to populate the bapiret2, please give one sample code