on 10-08-2007 6:55 AM
thru adaptive RFC model we can connect and retrieve the information from R/3.
how is it possible thru JSP Dynpage to connect to SAP system.
can any one assist me related to this.
if possible send some applications.
sekhar.c
You have to use JCA based on SAP Java Connector.
Have a look at the following code sample.
IConnection connection = null;
Object connectorService =
PortalRuntime.getRuntimeResources().
getService(IConnectorService.KEY);
IConnectorGatewayService cgService =
(IConnectorGatewayService)connectorService;
connection = cgService.getConnection("<your SAP system name>",ipcRequest);
if(connection != null)
{
IInteraction iInteraction = connection.createInteractionEx();
IInteractionSpec iInteractionSpec = iInteraction.getInteractionSpec();
iInteractionSpec.setPropertyValue("Name",functionNameStr);
RecordFactory recordFactory = iInteraction.getRecordFactory();
MappedRecord inputRecord = recordFactory.createMappedRecord("input"+personnelStr);
// Setting Import Parameters
inputRecord.put("<Your field name>",personnelStr.trim());
// Executing the FM
MappedRecord output =
(MappedRecord)iInteraction.execute(iInteractionSpec,inputRecord);
String abc = output.get("<OUTPUT PARAM NAME>");
output.clear();
iInteraction.close();
connection.close();
}
The following has to be added to the portalapp.xml in the SharingReference Part so that the program has no problems at runtime.
<b>com.sap.portal.ivs.connectorservice</b>
Try this. In the meanwhile, I shall try to dig up for more documents.
Also follow this link for more info on Connector Framework.
<a href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/36b9ac90-0201-0010-8689-ee8405649ce7">Connector Framework</a>
Pradeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.