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 help creating an RFC

Former Member
0 Likes
759

I'm new to SAP and ABAP world. I want to create a sample RFC which inserts data into my test table which i created in CRM. So the RFC should take 5 simple parameters like FirstName, LastName, City, State, Country and inserts them into the test table created. Could any one sends me sample code for this?

Do I need to define parameters in import/export or table parameters? I dont understand when should i use import/export and when should i use table parameters.

I tried creating those five input fields are import parameters but its giving some reference errors.

I would appreciate any help regarding this.

Thanks,

Sheetal

I'm new to SAP and ABAP world. I want to create a sample RFC which inserts data into my test table which i created in CRM. So the RFC should take 5 simple parameters like FirstName, LastName, City, State, Country and inserts them into the test table created. Could any one sends me sample code for this?

Do I need to define parameters in import/export or table parameters? I dont understand when should i use import/export and when should i use table parameters.

I tried creating those five input fields are import parameters but its giving some reference errors.

I would appreciate any help regarding this.

Thanks,

Sheetal

6 REPLIES 6
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
733

It appears that you need to know the basic fundimentals of function modules and function groups. Please have a look here.

http://help.sap.com/saphelp_nw2004s/helpdata/en/d1/801f02454211d189710000e8322d00/frameset.htm

Regards,

RIch Heilman

Read only

Former Member
0 Likes
733

Incase you are just trying to update/insert one record you could go for IMPORT/ EXPORT parameters . When you are planning to update/insert more than 1 record then in that case you can use a table parameter. And the coding would just be a INSERT/UPDATE/MODIFY statement accordingly.

Regards

Kathirvel

Read only

LucianoBentiveg
Active Contributor
0 Likes
733

You are getting some reference errors becose RFC parameters should have the "Pass value" flag checked. These is becose you can't pass reference that function can't access.

Regards.

Read only

Former Member
0 Likes
733

Since I'm expecting multiple records. I tried creating the table parameters but its showing error saying that "TABLES parameters are obsolete". Should I be creating in CHANGING parameters?

And when i changed the function module attributes to "Remote enabled fucntion"

its giving me the error saying that RFC is not allowed to use reference parameters.

I defined CHANGING Parameters and checked pass by value option.

Read only

Former Member
0 Likes
733

Hi,

Create a table type in SE11 ...

And use that table type in the changing parameter to make it as internal table.

Thanks,

Naren

Read only

0 Likes
733

Narendra -- I tried creating a table in SE11. For the test purposes all my fields are of string type. When I define fields of type string which references a data element its giving this error

"Table contains more than 3 long string fields"

Is there any restriction on how many string fields we define or is it something because I'm referencing some data element which is of string type?