cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple records to RFC

Former Member
0 Kudos

Hi ...

i need to do one scenario like,

mapping multiple records to RFC and the response from RFCshould pass to the request of the webservice and the response from the webservice should be the multiple records.

Could you please tell the sceanrio, how to proceed. I have done this scenario, using BPM. But i am not geting the correct output. Please suggest how to do the scenario?

Regards,

Leela

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Please Create a custom RFC such way that it accepts the mulitple records. Call the desired RFC inside the custom RFC

and populate all the response into a single RFC call.

Send the resposne from the Custom RFC.

I hope if you follow this approach you don't BPM to do the scenario.

Please revert if anything is not clear

Thnz

Former Member
0 Kudos

Hi Mohamed,

For the sceanrio, i have mentioned, i should use the BPM surely. Y because there are many condition. If the condition is true. i have to use one RFC, or else i have to use another Webservice.

and morover i donno exactly what is custom RFC. could you please tell how to do that? Can i use custom RFC in BPM scenario?

Former Member
0 Kudos

Hi,

An RFC is a function module, with the TYPE selected as REMOTE Function call. You can create this just as a normal function module...and pass the data through tables parameter since u prefer to send multiple lines of data.

But I would suggest you to populate an internal table with ur required data in a SE38 program and then push the call teh RFC and push the data through the tables parameter.

This is a good process, as i faced a lot of problem in coding within the source code tab of the RFC!

See the sample code, this might help!!

report zrfc_adapter.

data: it_final1 type standard table of zrfc_str with header line .

it_final1-name = 'ARNAB'.

it_final1-address = 'XXXXXXX'.

it_final1-email = 'XXXXXXX'.

it_final1-id = 'XXXXXXX'.

append it_final1.

it_final1-name = 'Rudra'.

it_final1-address = 'Dabur'.

it_final1-email = 'XXXXXXX'.

it_final1-id = 'RFC adapter 1'.

append it_final1.

it_final1-name = 'Soni'.

it_final1-address = 'Jaipur'.

it_final1-email = 'XXXXXXX'.

it_final1-id = 'XXXXXXX'.

append it_final1.

call function 'ZRFC_XI'

in background task destination

'R32XIRFC'

exporting

username = sy-uname

tables

it_final = it_final1

.

clear it_final1.

refresh : it_final1.

commit work.

Reward Points if relevant.

Arnab

Edited by: Arnab Mondal on Sep 26, 2008 7:21 AM

Former Member
0 Kudos

Hi Arnab,

Thanks for your reply. Is it necessary to use complusary the custom RFC in my scenario. Without that cant we do that?

Former Member
0 Kudos

For example , you want to create a material using RFC .

There is standard RFC called :" BAPI_MATERIAL_SAVEDATA " . Once calling the RFC , we can create only one material at execution.

Suppose the scenario is created muliple materials in single execution , we need a another RFC called

" ZMaterial_create " and call the BAPI_MATERIAL_SAVEDATA with in loop and get all response in the return internal table of " ZMaterial_create " .

so now you will have all the response in outcome of the ZMaterial_create " . so you send the response in single instance.

Thnz

Answers (0)