<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: JCo, BAPI (RFC) and Eclipse Plugins in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/jco-bapi-rfc-and-eclipse-plugins/qaa-p/12177425#M4554101</link>
    <description>&lt;P&gt;You can get the destination ID from the project using&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;String destinationId = com.sap.adt.project.AdtCoreProjectServiceFactory.createCoreProjectService().getDestinationId(project);
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then you should be able to work directly with the underlying JCo destination&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;JCoDestination destination = JCoDestinationManager.getDestination(destinationId);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 18 May 2020 09:04:19 GMT</pubDate>
    <dc:creator>sratz</dc:creator>
    <dc:date>2020-05-18T09:04:19Z</dc:date>
    <item>
      <title>JCo, BAPI (RFC) and Eclipse Plugins</title>
      <link>https://community.sap.com/t5/technology-q-a/jco-bapi-rfc-and-eclipse-plugins/qaq-p/12177420</link>
      <description>&lt;P&gt;I'm working on a 731 SP15 SAP system, with the Eclipse 2020-03 and the last ABAP Core Development Tools etc. The goal is to create an Eclipse plug-in, that can call an RFC FM on the backend. I can't use the BADI as showcased by &lt;SPAN class="mention-scrubbed"&gt;christian.drumm&lt;/SPAN&gt; &lt;A href="https://github.com/ceedee666/adt_transport_utils_plugin/"&gt;here&lt;/A&gt; as I'm not on a high enough release.&lt;/P&gt;
  &lt;P&gt;To get started, I've used the HelloWorld template, and replaced the text to be displayed in the popup with information retrieved from the backend via RFC. I've followed the example JCo in &lt;A href="https://help.sap.com/doc/saphelp_nwes72/7.2.3/en-US/48/634503d4e9501ae10000000a42189b/content.htm?no_cache=true" target="_blank"&gt;the JCo SAP Help&lt;/A&gt; but I'm having trouble getting it working.&lt;/P&gt;
  &lt;P&gt;In the example, we create the destinations by defining them in the file system. Alternatively, we can create our own implementation of DestinationDataProvider and register that. The problem I seem to be having is that in the Eclipse environment, the ADT have already registered a data provider. I've dug around, but can't find how I can get a list of the destinations that ADT uses/creates when an ABAP Project is created.&lt;/P&gt;
  &lt;P&gt;I don't know how to get from the project to the name of the destination that ADT &lt;STRONG&gt;must&lt;/STRONG&gt; be using for all its work. &lt;/P&gt;
  &lt;OL&gt; 
   &lt;LI&gt;Is it possible to get the destination (to use with JCoDestinationManager.getDestination) from the ABAP project&lt;/LI&gt; 
   &lt;LI&gt;Is it possible to see the registered destinations in the current DestinationDataProvider?&lt;/LI&gt; 
   &lt;LI&gt;Is it possible to add a new destination to the current DestinationDataProvider?&lt;/LI&gt; 
  &lt;/OL&gt;
  &lt;P&gt;What I'd like ideally is something like:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;IProject project = ProjectUtil.getActiveAdtCoreProject(selection, null, null,
				IAdtCoreProject.ABAP_PROJECT_NATURE);
String projectDestinationName = someMethodThatGetsDestinationFrom(project);
JCoDestination destination = JCoDestinationManager.getDestination(projectDestinationName);&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;TL:DR It would be so nice to be able to call an RFC from a plugin in Eclipse, using the credentials stored with an ABAP Project. Any suggestions?&lt;/P&gt;</description>
      <pubDate>Sat, 16 May 2020 12:27:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/jco-bapi-rfc-and-eclipse-plugins/qaq-p/12177420</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2020-05-16T12:27:17Z</dc:date>
    </item>
    <item>
      <title>Re: JCo, BAPI (RFC) and Eclipse Plugins</title>
      <link>https://community.sap.com/t5/technology-q-a/jco-bapi-rfc-and-eclipse-plugins/qaa-p/12177421#M4554097</link>
      <description>&lt;P&gt;Just a thought: ADT itself uses Web Services for every communication with the backend. Would it be an option to define a Service and call the FM within? &lt;/P&gt;</description>
      <pubDate>Sat, 16 May 2020 15:10:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/jco-bapi-rfc-and-eclipse-plugins/qaa-p/12177421#M4554097</guid>
      <dc:creator>BiberM</dc:creator>
      <dc:date>2020-05-16T15:10:52Z</dc:date>
    </item>
    <item>
      <title>Re: JCo, BAPI (RFC) and Eclipse Plugins</title>
      <link>https://community.sap.com/t5/technology-q-a/jco-bapi-rfc-and-eclipse-plugins/qaa-p/12177422#M4554098</link>
      <description>&lt;P&gt;Hmm. I'll look into that approach. &lt;/P&gt;&lt;P&gt;But something somewhere has registered an implementation of DestinationDataProvider - which implies to me that JCo is being used somewhere. &lt;/P&gt;</description>
      <pubDate>Sat, 16 May 2020 17:26:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/jco-bapi-rfc-and-eclipse-plugins/qaa-p/12177422#M4554098</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2020-05-16T17:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: JCo, BAPI (RFC) and Eclipse Plugins</title>
      <link>https://community.sap.com/t5/technology-q-a/jco-bapi-rfc-and-eclipse-plugins/qaa-p/12177423#M4554099</link>
      <description>&lt;P&gt;The backend parts of ADT are modeled as REST resources. These resources are accessed &lt;/P&gt;&lt;P&gt;- via RFC/JCo when connecting to on-premise backends&lt;BR /&gt;- via HTTPS when connecting to cloud backends&lt;/P&gt;&lt;P&gt;I asked an expert for more details on the main questions.&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2020 06:28:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/jco-bapi-rfc-and-eclipse-plugins/qaa-p/12177423#M4554099</guid>
      <dc:creator>Armin_Beil</dc:creator>
      <dc:date>2020-05-18T06:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: JCo, BAPI (RFC) and Eclipse Plugins</title>
      <link>https://community.sap.com/t5/technology-q-a/jco-bapi-rfc-and-eclipse-plugins/qaa-p/12177424#M4554100</link>
      <description>&lt;P&gt;  &lt;SPAN class="mention-scrubbed"&gt;armin.beil.2&lt;/SPAN&gt; thanks. To confirm, this is on-premise backend. &lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2020 07:32:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/jco-bapi-rfc-and-eclipse-plugins/qaa-p/12177424#M4554100</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2020-05-18T07:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: JCo, BAPI (RFC) and Eclipse Plugins</title>
      <link>https://community.sap.com/t5/technology-q-a/jco-bapi-rfc-and-eclipse-plugins/qaa-p/12177425#M4554101</link>
      <description>&lt;P&gt;You can get the destination ID from the project using&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;String destinationId = com.sap.adt.project.AdtCoreProjectServiceFactory.createCoreProjectService().getDestinationId(project);
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then you should be able to work directly with the underlying JCo destination&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;JCoDestination destination = JCoDestinationManager.getDestination(destinationId);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 18 May 2020 09:04:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/jco-bapi-rfc-and-eclipse-plugins/qaa-p/12177425#M4554101</guid>
      <dc:creator>sratz</dc:creator>
      <dc:date>2020-05-18T09:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: JCo, BAPI (RFC) and Eclipse Plugins</title>
      <link>https://community.sap.com/t5/technology-q-a/jco-bapi-rfc-and-eclipse-plugins/qaa-p/12177426#M4554102</link>
      <description>&lt;P&gt;That works lovely. Funnily enough I'd tried something similar, but couldn't get it to work. I tried your solution, and it still didn't work... until I actually opened the project within Eclipse. So it seems the destination isn't registered in JCo until it's opened.&lt;/P&gt;&lt;P&gt;In my defence, I was expecting this&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;IProject project = ProjectUtil.getActiveAdtCoreProject(selection, null, null,
		IAdtCoreProject.ABAP_PROJECT_NATURE);
if (project == null) {
	MessageDialog.openInformation(window.getShell(), "No selection", "No ABAP Project selected");
} else {
	MessageDialog.openInformation(window.getShell(), "Playground", getResult(project));
}&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;to catch that before I attempted to get the destination. &lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2020 10:19:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/jco-bapi-rfc-and-eclipse-plugins/qaa-p/12177426#M4554102</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2020-05-18T10:19:13Z</dc:date>
    </item>
  </channel>
</rss>

