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

Need to Create RFC Functional Module

Former Member
0 Likes
1,202

I have no experience on RFC creation forget about setting RFC

To create RFC enabled for third party communication

Requirement:  Input Parameter: PERNR & WORK DATE from third party system.

I have to club 3 to 4 tables based on certain condition and how can i declare Table type in RFC cause when i club 3 to four tables structure would be changing.

Give me logic on clubbing 3 or 4 tables passing into RFC table area.

Moderator Message: Spoon-feeding is not encouraged in the forums. Show your efforts 'til then the thread remains locked.

Message was edited by: Suhas Saha

8 REPLIES 8
Read only

Phillip_Morgan
Contributor
0 Likes
1,155

I would like to help but what is clubbing?

Read only

Former Member
0 Likes
1,155

we have to read out matching record from four table

Read only

0 Likes
1,155

There would be 4 four tables and which has to pass into internal table area of RFC.

Read only

madhu_vadlamani
Active Contributor
0 Likes
1,155

Hi Neha,

You can use the tables and keep like normal selection statement.Keep messages and return statement.Then keep that fm as a bapi as rfc .

Regards,

Madhu.

Read only

0 Likes
1,155

I have to pull from a custom table and few standard tables checking certain conditon

Read only

0 Likes
1,155

is there any standard RFC would support for all criteria?

Read only

0 Likes
1,155

Hi Neha,

Keep normal select entries and get data into final table and display.You start and post if need any help.

Regards,

Madhu.

Read only

kiran_k8
Active Contributor
0 Likes
1,155

Neha,

1.Get the RFC destinations of type 3 created in SE59 with the help of Basis Guys.
2.Create the RFC enabled Function module in the source as well as the target system ie if you are running the program in system X and intend to get the data from System Y back to system X then the RFC Fm should be present in both the systems ie X and Y (source and target)
3.To pass a range of selections as an input to the RFC FM you declare an internal table in TABLES tab of the RFC FM with associated type as RFC_DB_OPT.(input)
4.To get back the data from the target to Source declare one internal table of the desired structure(output) in TABLES tab of the RFC FM.
5.call ZFM_FM destination DEV010 (DEV010 is an example RFC destination which needs to be replaced by the actual RFC Destination that the Basis guys had created )
6.Handle the exceptions.
7.How to debug an RFC FM.
Add a piece of code in the FM as below.Comment it in the source system but in the target system uncomment it whenever you want to debug the RFC FM in the target system.

{code}

  DATA:c_x TYPE c.
  DO.
    IF c_x = 'X'.
      EXIT.
    ENDIF.
  ENDDO.

{code}

a) Put a break point in the source system at the RFC FM and execute it.This will make the program in the source system run in endless loop.
b) Go to the target system and get into SM50.Here you will find an entry with your RFC FM.
C) select it and choose the PROGRAM/MODE>>PROGRAM>>DEBUGGING.
d) you will get a pop up whether you want to debug.Click on YES and it will take you into the debugging screen for the RFC FM.Make the variable C_X as X and continue your debugging.

Thanks,
K.Kiran.