‎2006 Apr 06 11:04 AM
Hi Friends,
Can any body tell me is there any FM avilable to extract the data from any datbase table? Or shall we have to create a new FM..?
Thanks in Advance.
‎2006 Apr 06 11:10 AM
‎2006 Apr 06 11:13 AM
It all depend upon requrement, For standard like material,sales orders there are functon modules and BAPI.
Otherwise u have to use select statement in that funcion module.
regards
vinod
‎2006 Apr 06 11:14 AM
Hello Jak,
Usually SAP has developed FM for extracting data from the data bas tables like MARA_SINGLE_READ and so on.. U need to find them. If however they are not there then alternatively u can use SELECT stmt.
‎2006 Apr 06 11:18 AM
Hi,
you can do it with the help of FM <b>RFC_READ_TABLE</b>
Regards
vijay
‎2006 Apr 06 11:24 AM
you can use the following FMs as well
RFC_GET_TABLE_ENTRIES
TABLE_ENTRIES_GET_VIA_RFC
Regards
Raja
‎2006 Apr 06 11:27 AM
Jak,
I think you are asking related to the custom tables in CRM question.
You can use RFC_READ_TABLE and specify the table name.
Regards,
Ravi
‎2006 Apr 06 11:30 AM
‎2006 Apr 06 11:33 AM
Hi jak,
did you check my post,
don't forget to reward for helpful answers.
Regards
vijay
‎2006 Apr 06 11:36 AM
Hi Vijay,
I checked your post .Thank You.
I al ready given reward points.
‎2006 Apr 06 11:44 AM
Hi Frineds,
I am little confuse in the FM RFC_CREATE_TABLE.
How to give the import paramaters?..Can any body give example..for those parameters..
QUERY_TABLE:
DELIMITER :
NO_DATA :
ROWSKIPS :
ROWCOUNT :
Thanks in Advance
‎2006 Apr 06 11:49 AM
call function 'RFC_READ_TABLE'
destination rfc_sys
exporting
query_table = 'DOKHL'
* DELIMITER = ' '
* NO_DATA = ' '
* ROWSKIPS = 0
* ROWCOUNT = 0
tables
options = options1
fields = nametab1
data = stmp_dokhl
exceptions
table_not_available = 1
table_without_data = 2
option_not_valid = 3
field_not_valid = 4
not_authorized = 5
data_buffer_exceeded = 6
others = 7 .Check it...
‎2006 Apr 06 11:53 AM
Hi,
check this report<b> GETSU22TRACEDATA</b>, and in this it is used to read the data of table.
Regards
vijay
‎2006 Apr 06 11:55 AM
check out this code sample, it may be of interest to you
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/abap-code-sam... code sample using rfc_read_table for webas.pdf
Regards
Raja
‎2006 Apr 06 12:32 PM
HI,
in FM RFC_READ_TABLE can i give a z-table in the query_table parameter?
Actually my requirement is reading data from z-tables.
whn given MARA table in query_table parameter it showing structure i mean fields of table but not showing data of table.can any body give solution?If i want to fetch data from morethan 30 or 40 z-tables , how ths FM will be help full?
Thanks in Advance.
‎2006 Apr 06 12:42 PM
Jak,
I think you can read only one table at one time using this. So, you will have to call this function so many times.
Rather, write a RFC on the CRM side, get all the data you want and call that from the R/3 side.
Regards,
Ravi
‎2006 Apr 06 12:49 PM
Hi Ravi,
Can you give some hints for writing RFC.
Bcoz..I don't know how to write RFC's
My requirement is: i have to fetch all the data from 40 z-tables in R/3 and i have to send to CRM system.
For this whre i have to wrire RFC , in R/3 or CRM?
Thanks in Advance.
‎2006 Apr 06 12:57 PM
Jak,
Depends on where you want to fetch the data from and where do you want to call it from. Please refer to the yesterday's thread where we discussed the same thing.
Here I am assuming that the data is in CRM and you want to pull that into R/3. If that is the case, code your RFC in CRM and call that from R/3.
However, given that we are talking about 40 Z tables, performance might be a concern here.
Writing a RFC is nothing but writing a function module with apprporiate parameters of tables that you want to fetch. SELECT the data and dump into the internal tables defined as parameters of the RFC.
Regards,
Ravi
‎2006 Apr 06 1:00 PM
Hi Jak,
there will not be much difference in FM and RFC.
you can do the it similar to FM. and if you want more tables then you should call so many times.
you need to check the option Remote enable.
Regards
vijay
‎2006 Apr 06 1:21 PM
Hi Ravi Kumar,
As per my uderstanding..the scenario is like this:
I have to fetch the data from z-tables in R/3 only.And i have create RFC in R/3 only.and i have to call that RFC from CRM.So i have to ftech the data from all z-tables and put in 40 internal tables separately and i have to pass all these internal tables in tables parameter of RFC.After that i have to call this RFC from CRM.
Am i right?...If any thig wrong in this pls clarify me..
Becoz..this solution i need little urgent.
Thanks & Regards
‎2006 Apr 06 1:42 PM
Hi,
Yes you can pass Z tables also to FM
RFC_READ_TABLE.
Regards,
Shashank
‎2006 Apr 06 5:00 PM
Jak,
Yes, I guess you are in the right direction.
But fetching 40 tables in one shot if you are expecting log of data in each of these tables, take a decision depending on the data. You might want to split this into two or more RFC and logically separate the tables.
Regards,
Ravi
Note : Please mark the helpful answers
‎2006 Apr 06 5:14 PM
Hi Ravi,
Yes ..first i will try with 4 or 5 tables.But i what i want to know is it the right way ..ie writting select queries and storing into work areas and ppasing to tables parameters?..Or shall i write code in the source code block of FM?..
Points al ready given,I don't find any radio button enable.
Thanks in Advance.
‎2006 Apr 06 5:32 PM
Jak,
Assume ZTABLE1 is one of the parameters of the functions.
Then your code inside the function could be as simple as
SELECT * FROM ZTABLE1 INTO TABLE ZTABLE1 WHERE .....
similarly for the other tables.
Regards,
Ravi