You'll need some sort of Data/Service technology to do this. In Flex, this can be BlazeDS, ColdFusion, HTTP, LCDS, PHP, or a Web Service. I'm assuming you want to "talk" to a remote function in SAP. A surefire way to do this is to use SAP MII. However, there are other ways of doing so. ColdFusion is able to talk to RFCs via a third party package. You can also do the same using WebAS. The important thing to know is that Flex itself does not communicate with SAP directly. You'll need to make SAP available using one of the available methods above.
Could you send me sample to access the R3 Server using webservices.
Thanks & Regards,
Sorry, I do not have specifics. But, using SAP ( I think transaction SE80), you can generate the WSDL for the web service. Once you have that you can use the Web Service wizard from within Flex Builder to do the rest.