2006 Dec 12 6:29 PM
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
2006 Dec 12 6:31 PM
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
2006 Dec 12 6:34 PM
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
2006 Dec 12 6:38 PM
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.
2006 Dec 12 6:56 PM
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.
2006 Dec 12 7:03 PM
Hi,
Create a table type in SE11 ...
And use that table type in the changing parameter to make it as internal table.
Thanks,
Naren
2006 Dec 12 7:24 PM
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?
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |