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 parameter in RFC

Former Member
0 Likes
1,916

Hi All,

I want to maintain return parameter in RFC.

Means i fetch some data using select statment.

i need add a return parameter subrc to retun the value 0 when successfully retrieved the records and 4 no records found.

how to do it.

Please let me know its urgemt.

Thanks,

Subbu.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,102

Hi,

You need to maintain the Exporting parameter in the Function module so it will become importing parameter while running this function module, this Paramnter is like SUBRC like SY-SUBRC. and pass the Return paramer of the select statment to this SUBRC field then this field will be avilable in the RFC

Regards

Sudheer

3 REPLIES 3
Read only

Former Member
0 Likes
1,103

Hi,

You need to maintain the Exporting parameter in the Function module so it will become importing parameter while running this function module, this Paramnter is like SUBRC like SY-SUBRC. and pass the Return paramer of the select statment to this SUBRC field then this field will be avilable in the RFC

Regards

Sudheer

Read only

0 Likes
1,102

HI Sudheer,

Thanks for your help.

What i was done. I created one export parameters with name SUBRC like SY-SUBRC.

I send sy-subrc value to this parameter like below.

After select statment.

IF SY-SUBRC = 0.

SUBRC = 0.

ELSE.

SUBRC = 4.

ENDIF.

Please correct me if i am wrong.

Thanks,

Subbu.

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
1,102

Hi,

Ad one exporting paramter ex_subrc of type sy-subrc.

also

You need to have an export paramter RETURN of TYPE BAIPRET2 to retun any messages.

You can use this FM to fill the return strucutre.

BALW_BAPIRETURN_GET2.

Regards,

Sesh

Message was edited by:

Seshatalpasai Madala