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

creating a RFC function module to retreive data from multiple tables.

Former Member
0 Likes
681

hello friends,

i have a requirement to create a RFC function module.where i need to fetch the data from multiple tables and when i give material no. as input and if that doesnt exist then i need to get a error message.

I m not sure about the PARAMETRES to be passed so i am giving a sample code below which i will be using .

So pls provide me the detail steps according to the code below.

Your efforts will be greatly appreciated.

thx

simraan.

2 REPLIES 2
Read only

piyush_mathur
Active Participant
0 Likes
440

HI Simran,

First create an Structure in R/3 for the fields which u will return from RFC.

Create one Import parameter for Material No.

Add one Export parameter for the message.

If Material does not exits in system, return the error message and if everything is find populate the Table with the require result.

Please let me know if you have any doubt.

Thanks

Piyush

Rewards points, if helpfull....

Read only

Former Member
0 Likes
440

Assuming you need to read material data in RFC:

Check FM: CRS_MATERIAL_READ_ALL

Try to do as below:


1. Declare parameters and tables as above FM
2. Give an additional parameter for Return Message
3. Within the FM, first check the material existence. If not populate error mesg in your RETURN mesg parameters.
4. Call above FM with the same parameters.
5. Output is same as above.

Kind Regards

Eswar