on 08-28-2008 8:20 PM
Can you provide an example of how to call a bapi or rfc from a custom logon module? (used to authenticate in portal)
Hi,
you can use JCO to call ABAP function module from your logon page.
to do that you need to modify your logon page.
process of modifying the logon page is wel described in the following link:
[https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/371e9d90-0201-0010-c39c-fd2956154ab3]
the following link will give you the required code example for calling bapi using JCO.
[http://www.sapdevelopment.co.uk/java/jco/jco_callfunc.htm]
Regards,
Sahidur
please give points if it helps you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
From your EJB / JAVA Module you can call directly SAP BAPI (Which is not recommanded - ) or you can call a RFC Destination from JAVA Module. RFC Destination needs to be created in Visual Admin.
Here you see the code, how to connect to RFC.
http://help.sap.com/saphelp_nw2004s/helpdata/en/17/d609b48ea5f748b47c0f32be265935/content.htm
JCO RFC Destinations
http://help.sap.com/saphelp_nwce10/helpdata/en/44/3bd73865524903e10000000a1553f7/content.htm
Thanks,
Sridhar
Hello all,
Is it possible to use SAP JRA instead?
We have a Connector deployed on the WebAS 6.40. From an EJB (Webservice) it is possible to lookup the connector, but if i try to lookup the connector from a custom LoginModule, i get the following error:
Path to object does not exist at java:comp, the whole lookup name is java:comp/env/eis/SAPJRA_CRMDC.#
The whole lookup in LoginModule looks
try
{
initialcontext = new InitialContext();
connectionFactory = (ConnectionFactory) initialcontext.lookup("java:comp/env/eis/SAPJRA_CRM");
} catch (Exception ex)
{
location.errorT(ex.getMessage());
}
Regards Oliver
oliver,
Are you saying something like this won't work?
private void getJCOfromDestinationService()
{
try
{
ctx = new InitialContext();
dstService = (DestinationService) ctx.lookup(DestinationService.JNDI_KEY_LOCAL);
if (dstService == null)
throw new NamingException("Destination Service not available");
dst = (RFCDestination) dstService.getDestination("RFC", "ECCAUTH");
}
catch (DestinationException e)
{
e.printStackTrace();
}
catch (RemoteException e)
{
e.printStackTrace();
}
catch (NamingException e)
{
e.printStackTrace();
}
jcoProperties = dst.getJCoProperties();
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
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.