cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing SAP R/3 from Mappings program

Former Member
0 Kudos
110

Hello

In the map I need to connect to backend R/3 system. I performed a test to connect SAP R/3 using JCO and it worked.But the main concern is in the test i hard-coded the connection parameters (username,passwd,host etc) in Simple User Defined function.

can anyone tell me how these connection parameters can be stored? Should we maintain a config file at OS level in XI or can SLD be used for the same?

Thanks in advance..

Regards

Rajeev

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Rajeev,

According to the release documentation of SAP NetWeaver 2004 (XI 3.0), it is now possible to access R/3 systems via a new API during runtime in XI.

<i>Data enrichment: A lookup API is provided to do synchronous lookup-calls during the mapping process via the JDBC and RFC adapter; this API can be used for message, Java and XSLT mappings.</i>

As mentioned before by someone here, to avoid hardcoding your connection parameters etc in your mappings, you could put all this information on a properties file which can be accessed by the message/Java/XSLT mappings during runtime.

In order to make the maintenance of this file (one on each XI environment i.e. DEV, PROD) an easy task, you could also implement a administrator program in R/3 which can be used by the system administrator to maintain the entries in the properties file. This Z program in turn will generate the properties file and make it accesible to the JVM/J2EE engine at OS level.

In the properties file you can for instance have default settings for each R/3 system and if required specific entries for some interfaces.

Cheers,

Roberto

Message was edited by: Roberto Viana

Former Member
0 Kudos

Robert,

Thanks for your reply.Actually in Visual Administrator there is a property called JCO RFC Provider where we can enter RFC destination.

Just wanted to ask if someone is aware of some APIs which could fetch values from that and can be used in mappings program?

Regards

Rajeev

0 Kudos

The JCo RFC Provider works the other way, as it were. It provides RFC targets into the J2EE server. In other words it exposes J2EE functionality to ABAP (other other RFC-capable) systems. The only use that I am aware of is to provide the SLD and LCR functionality to R/3 systems as part of the standard XI and partner system configuration.

- Thorsten

Former Member
0 Kudos

Thorsten,

Do you mean to say that instead of maintaining TCP/IP RFC destinations for RFC targets in J2EE server they had provided this facility.

Again it accepts SAP login parameters under a program id which I feel is can be used to login to SAP by some kind of API which will take input as program id and return its parameters.

Or you mean to say that these parameters are required to get somekind of meta-data of SAP system(just in case of Sender RFC Adapter we enter login parameters of SAP Server).

Regards

Rajeev

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Rajeev,

You can use properties file to keep the details of R3 system. we have implemented same in our project. I can mail you the document explaining the same with the steps involved.

Kind Regards,

Rahul Kumar

Former Member
0 Kudos

Rahul,

Thanks for that. You can send me an email at rajeev_patkie@hotmail.com

Waiting for your email.

Regards

Rajeev

0 Kudos

Hi Rajeev

I would not recommend using an OS file. This is very messy and difficult to manage. A simple alternative is to store the connection parameters in a value mapping table. This can then be configured differently in each of your environments.

You could in theory use the SLD. This is, in fact, what the WebDynpro ARFC runtime does with its JCo Destinations. However, I suspect this is rather more difficult.

Regards,

Thorsten