on 04-13-2006 5:42 AM - last edited on 02-04-2024 4:25 AM by postmig_api_4
Hi Friends,
Please help me in finding a Function Module which should bring the data from multiple tables in R/3 server. I need to update this data to the CRM server. So the FM should be remote enabled. I am able do it for single table. But i need to fetch data from multiple tables and then i have to update it in the CRM server.
your help is appreciable.
Thanks
Radhika.
Hi Radhika,
Create a Function Module.
1. Tab "Tables" .
Here you declare all the tables which have to be populated. In the column "Type spec" enter "Like".
2. Source code tab
Write select querys to populate all the tables declared before.
3. Attribute tab
There is a radio button Remote-enabled module select it
After activating you can call this FM from CRM
Hope this is helpful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Radhika,
It doesn't make any sense to retrieve data for 100 tables at a time, Probably you can divide into groups logically and get the data. Again it depends on how much data each of these tables have.
For a moderate amount of data, I don't suggest more than 10 tables.
Regards,
Ravi
Note : Please mark the helpful answers
aa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Radhika
Try this out RFC_READ_TABLE, not sure this is for multiple table ...
regards
Alok Pathak
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Rahika,
I think you are referring to the same question that Jak Kumar has posted.
Do you want to get all the tables in the same function module, then you can do something like this.
Declare as many paramters as the no. of tables you want to retrieve in one SHOT. This parameter can refer to DD02L-TABNAME. Now, also declare as many TABLE paramters by referring to TYPE REF TO DATA so that you are not tied to a specific table.
Now, the code for your FM
Parameter - TABLE_NAME
Table - TABLE TYPE REF TO DATA.
SELECT * FROM (table_name) INTO TABLE table.
This statement will have to be repeated for all the tables you want to retrieve.
Hope this helps you.
Regards,
Ravi
Note : Please mark the helpful posts.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Radhika,
By referring to DATA, it can take any internal table. I am sure you would have REUSE_ALV_gRID_DISPLAY. Look at the way the data table parameter has been declared in this function.
You should do exactly the same way. Only thing you will multiple parameters of that type.
Regards,
Ravi
Note : Please mark the helpful answers
Hi Radhika,
DD02l id the table which contains all the tables name and their attributes.
when you get the name of the tables you need to declare you can do the following
DATA: tab TYPE REF TO DATA
* para1 is one of the importing parameter of type dd02l-tabname.
parameters : para1 type dd02l-tabname.
DATA tabref TYPE ref to data.
FIELD-SYMBOLS <fs_table> type TABLE.
tabref = para1.
ASSIGN tabref->* TO <fs_table>.
SELECT * FROM (tabname) INTO TABlE <fs_table> .
but i feel this approach will work only when the data in you tables in the remote system is less, when the data is huge you will have a problem of RFC timeout.
regards,
Kinshuk Saxena
Is this a one time deal or you need this to be an ongoing interface? If it is one time deal and if you have similar Z tables on the CRM side defined, then take help from your basis team to transport the entries. If it is an ongoing one, then I strongly recommend you to design it very carefully. Transferring 100 tables at one time is not a simple task and also not a recommended one. May be if you have table name as one of the parameters to your function module, then it is possible.
Which tables? What data? Without knowing that it is impossible to tell you which function module can do that for you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.