Quantcast
Channel: SCN : Popular Discussions - Java Development
Viewing all 518 articles
Browse latest View live

Options in RFC_READ_TABLE

$
0
0

Hi all,

 

In RFC_TABLE_READ as I can put in an option like? when the field type like * XXXX *.

 

It's more if someone could tell which are the operators that exist in the where clause.

 

Thank you very much


BAPIs available for CCMS

$
0
0

HI

I am currently developing a java application which reads actual values from the CCMS Monitoring using the JCo, In this regard I wanted to know the BAPIs available for CCMS that I can use.

When will SAP Java AS for EE 6 see the light?

$
0
0

Hi all,

As far as I know, SAP's bleeding edge AS (NW73 AS) is based on EE5.

As several java AS vendors are releasing EE6 compliant products, I would like to know whether any deadline has been set for SAP's EE6 app server release.

 

Thanks in advance

regards

 

Vincenzo

How to open a new JSP as a Popup

$
0
0

Hello everybody,

 

I have quite some experience working with java web dynpros, however I now have a requirement to work on an existing JSP page to add some new functionality, and I'm  a little bit lost since this is the first time I work with JSPs in SAP portal.

 

What I need to do is that when an user clicks on a button on page1.jsp, a new jsp (that didn't exist before, since I've just created it) called page2.jsp has to open as a popup with a selection list. After the user selects a value from this list, this value has to be sent to an input field in page1.jsp.

 

I've can do this in regular JSPs running on tomcat, with no problems ;).... However, when I try to do this in SAP portal, I get an error and the following exception in the logs, when I click on the button in page1.jsp:

 

com.sapportals.portal.prt.runtime.PortalRuntimeException: iView not found: page2.jsp

at com.sapportals.portal.prt.deployment.DeploymentManager.getPropertyContentProvider(DeploymentManager.java:1937)

at com.sapportals.portal.prt.core.broker.PortalComponentContextItem.refresh(PortalComponentContextItem.java:222)

at com.sapportals.portal.prt.core.broker.PortalComponentContextItem.getContext(PortalComponentContextItem.java:316)

at com.sapportals.portal.prt.component.PortalComponentRequest.getComponentContext(PortalComponentRequest.java:387)

......

 

I'm not sure what I have to do to fix this... do I need to ask the portal guys to create a new iview for the new jsp and treat it as a new app? Or is there a simplier solution?

Any help will be greatly appreciated, and of course points awarded accordingly

 

Cheers!

How to connect to SAP AS JAVA?

$
0
0

Hi,

 

I am developing an JAVA application, which will connect to SAP AS Java dataSource. My environment don't have ABAP installed. So, I believe use of JCo connector is not an option.

 

Is ther any other connector API jar available to connect to SAP AS JAVA Datasource?

Could anyone please help me with a detail guide to connect to SAP AS Java Datasource using any APIs provided by SAP?

 

Thanks

Alingan

Options in RFC_READ_TABLE

$
0
0

Hi all,

 

In RFC_TABLE_READ as I can put in an option like? when the field type like * XXXX *.

 

It's more if someone could tell which are the operators that exist in the where clause.

 

Thank you very much

BAPIs available for CCMS

$
0
0

HI

I am currently developing a java application which reads actual values from the CCMS Monitoring using the JCo, In this regard I wanted to know the BAPIs available for CCMS that I can use.

LDAP acces via SSL - javax.net.ssl.SSLHandshakeException

$
0
0

Hello All

 

I'm trying to fing reason for non-working SSL connection from java app (EJB) to LDAP server.

 

Code is:

 

env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
System.setProperty("ssl.ServerSocketFactory.provider","oracle.security.ssl.OracleSSLServerSocketFactoryimpl");
env.put(Context.PROVIDER_URL, urlLdapServer + baseDN);
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, "user");
env.put(Context.SECURITY_CREDENTIALS, "password");

 

And while trying to connect exception is thrown:

 

Exception while getting data from LDAP:

javax.naming.CommunicationException: simple bind failed: server_address:636 [Root exception is javax.net.ssl.SSLHandshakeException:

sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException:

unable to find valid certification path to requested target]

 

In portal's configuration there is key storage named TrustedCAs containing valid certificate for this LDAP server.

 

I'm bit stuck, so any help would be highly appreciated.

 

Thanks in advance

Best Regards

Maciej Gottfried


How to connect to SAP AS JAVA?

$
0
0

Hi,

 

I am developing an JAVA application, which will connect to SAP AS Java dataSource. My environment don't have ABAP installed. So, I believe use of JCo connector is not an option.

 

Is ther any other connector API jar available to connect to SAP AS JAVA Datasource?

Could anyone please help me with a detail guide to connect to SAP AS Java Datasource using any APIs provided by SAP?

 

Thanks

Alingan

IWAB0014E Unexpected exception - Exposing Portal Services as Web Services

$
0
0

Hi!

 

I try to expose a Portal Service as a Web Service:

 

[Exposing Portal Services as Web Services |http://help.sap.com/saphelp_nw72/helpdata/en/49/e44e702784751be10000000a42189b/frameset.htm]

 

While using the wizard the following exception is rising:

 

IWAB0014E Unexpected exception occurred.      java.lang.IllegalArgumentException      at org.eclipse.wst.server.core.internal.facets.FacetUtil.getRuntime(FacetUtil.java:89)      at org.eclipse.jst.server.core.FacetUtil.getRuntime(FacetUtil.java:59)      at org.eclipse.jst.ws.internal.consumption.command.common.CreateFacetedProjectCommand.setFacetRuntime(CreateFacetedProjectCommand.java:283)      at org.eclipse.jst.ws.internal.consumption.command.common.CreateFacetedProjectCommand.getFacetsToAdd(CreateFacetedProjectCommand.java:219)      at org.eclipse.jst.ws.internal.consumption.command.common.CreateFacetedProjectCommand.execute(CreateFacetedProjectCommand.java:115)      at org.eclipse.jst.ws.internal.creation.ui.extension.PreServiceDevelopCommand.execute(PreServiceDevelopCommand.java:191)      at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.runCommand(CommandFragmentEngine.java:419)      at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.visitTop(CommandFragmentEngine.java:359)      at org.eclipse.wst.command.internal.env.core.fragment.CommandFragmentEngine.moveForwardToNextStop(CommandFragmentEngine.java:254)      at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager$6.run(SimpleCommandEngineManager.java:294)      at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)      at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)      at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:934)      at org.eclipse.wst.command.internal.env.ui.widgets.SimpleCommandEngineManager.runForwardToNextStop(SimpleCommandEngineManager.java:264)      at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.runForwardToNextStop(WizardPageManager.java:91)      at org.eclipse.wst.command.internal.env.ui.widgets.WizardPageManager.getNextPage(WizardPageManager.java:154)      at org.eclipse.wst.command.internal.env.ui.widgets.SimpleWizardPage.getNextPage(SimpleWizardPage.java:136)      at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:813)      at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:369)      at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)      at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)      at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)      at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)      at org.eclipse.jface.window.Window.open(Window.java:801)      at org.eclipse.wst.command.internal.env.ui.widgets.popup.DynamicPopupWizard.run(DynamicPopupWizard.java:130)      at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)      at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:583)      at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:500)      at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)      at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)      at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2384)      at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)      at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200)      at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)      at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:490)      at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)      at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)      at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)      at java.lang.reflect.Method.invoke(Method.java:597)      at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)      at org.eclipse.equinox.launcher.Main.run(Main.java:1236)

 

Has anybody an idea, or can tell me another way to do for NW 7.2?

 

Thanks Daniel

Getting error with UMWebservice WSDL file

$
0
0

When I am trying to create the client file from the WSDL file of UMWebservice from below link, I am getting error saying name=attribute missing in <fault> tag of WSDL file.

 

http://<host_name>:<port>/irj/servlet/prt/soap/UMWebService?Wsdl

 

ERROR Message: cvc-complex-type.4: Attribute 'name' must appear on element 'wsdl:fault'.


When I am verifying the UMWebservice in SOAP UI, I am getting error saying Authorization ID.


Thanks

Alingan Patra

Java EE concepts for Portals custom development

$
0
0

Hi Gurus,

 

Which concepts of Java EE are helpful/required for custom development of Netweaver Portals?

 

What I am trying to find is the list of Java EE topics that are redundant as far as Netweaver Portals are concerned. In that case, I can only concentrate on relevant topics.

 

Or should I take an EE book and read from start to finish?

 

Thank you.

 

Rama

SAP JCo 3 -> Can a server side connection be done WITHOUT logon parms?

$
0
0

Hi All,

 

I'm trying to do a server side connection to SAP R/3 without using client logon parms such as user and password, application host, etc. with SAP Java Connector 3.  Here is an example of what I'm trying to do:

 

 

Properties connectProperties = new Properties();
connectProperties.setProperty(DestinationDataProvider.JCO_CODEPAGE, "2");
createDataFile(DESTINATION_NAME1, "jcoDestination", connectProperties);

Properties servertProperties = new Properties();
servertProperties.setProperty(ServerDataProvider.JCO_GWHOST,gw_host);
servertProperties.setProperty(ServerDataProvider.JCO_GWSERV,gw_serv);
servertProperties.setProperty(ServerDataProvider.JCO_PROGID,prog_id);
servertProperties.setProperty(ServerDataProvider.JCO_REP_DEST, DESTINATION_NAME1);
servertProperties.setProperty(ServerDataProvider.JCO_CONNECTION_COUNT, "1");
createDataFile(SERVER_NAME1, "jcoServer", servertProperties);

 

 

Upon doing that I get the following exception:

Exception in thread "main" com.sap.conn.jco.JCoRuntimeException: (101) JCO_ERROR_CONFIGURATION: Invalid configuration on ABAP_AS_WITHOUT_POOL. User identity unknown: neither user nor logon ticket nor certificate is specified.

     at com.sap.conn.jco.rt.DefaultDestinationManager.getUserId(DefaultDestinationManager.java:742)

     at com.sap.conn.jco.rt.RfcDestination.initialize(RfcDestination.java:495)

     at com.sap.conn.jco.rt.RfcDestination.getSystemID(RfcDestination.java:533)

     at com.sap.conn.jco.rt.RepositoryManager.getRepository(RepositoryManager.java:30)

     at com.sap.conn.jco.rt.RfcDestination.getRepository(RfcDestination.java:603)

 

 

Doing a server side connection without using log on parms on and just using the program ID, gateway service, and gateway host was possible in SAP JCo 2.  Is this still possible in SAP JCo 3?  By the exception it seems that I must give the user id and possibly password.

Sap System is very slow.

$
0
0

Hi,

 

We are using IDES system on windows NT and sql server as database.

 

But the system is very slow ....

 

I increased the dialog processes from 7 to 12 but there is no use.

 

Also tried st02 and saw some red alerts so increased the coressponding profile parameters.

 

Still The system is slow.

 

 

Please suggest your ideas.

 

 

Thanks,

Sagar.

How to open a new JSP as a Popup

$
0
0

Hello everybody,

 

I have quite some experience working with java web dynpros, however I now have a requirement to work on an existing JSP page to add some new functionality, and I'm  a little bit lost since this is the first time I work with JSPs in SAP portal.

 

What I need to do is that when an user clicks on a button on page1.jsp, a new jsp (that didn't exist before, since I've just created it) called page2.jsp has to open as a popup with a selection list. After the user selects a value from this list, this value has to be sent to an input field in page1.jsp.

 

I've can do this in regular JSPs running on tomcat, with no problems ;).... However, when I try to do this in SAP portal, I get an error and the following exception in the logs, when I click on the button in page1.jsp:

 

com.sapportals.portal.prt.runtime.PortalRuntimeException: iView not found: page2.jsp

at com.sapportals.portal.prt.deployment.DeploymentManager.getPropertyContentProvider(DeploymentManager.java:1937)

at com.sapportals.portal.prt.core.broker.PortalComponentContextItem.refresh(PortalComponentContextItem.java:222)

at com.sapportals.portal.prt.core.broker.PortalComponentContextItem.getContext(PortalComponentContextItem.java:316)

at com.sapportals.portal.prt.component.PortalComponentRequest.getComponentContext(PortalComponentRequest.java:387)

......

 

I'm not sure what I have to do to fix this... do I need to ask the portal guys to create a new iview for the new jsp and treat it as a new app? Or is there a simplier solution?

Any help will be greatly appreciated, and of course points awarded accordingly

 

Cheers!


Java RFC Connection: Step by step

$
0
0

Hi folks,

 

my first goal is to achieve a remote function call from Java to SAP or the other way.

My first attempt is a Java application which does a RFC to a SAP ABAP function that returns me some database data, but more about that later.

The first thing where i already fail is to build up a simple connection between Java and SAP.

I tried it with JCo v2.1.x and JCo v3.x (Which version should i prefer? are there advantages, disadvantages?)

Here are the two approaches:

{JCO v2.1.x}:

 

          
JCO.Client myConnection = JCO.createClient("001",                                                               "***",                                                                "****",                                                                "DE",                                                                "***",                                                                "00");
myConnection.connect();
...
...

 

 

I get a "(103) RFC_ERROR_LOGON_FAILURE: Userid or password incorrect". I put in my normal SAP GUI account. Its not an admin account but i can create reports etc in the ABAP Editor.

I checked the spelling several time and it should be ok. Why does it say incorrect user or password?

Is this possible because of insufficient rights?

 

{JCo v3.x}:

I just tried the "StepByStepClient" example included in the sapjco3 download and i saw that every connect function begins with a "JCoDestination destination = JCoDestinationManager.getDestination(String);" line.

But what exactly does this getDestination function do? What string do i pass there? In the example is it JCoDestinationManager.getDestination("ABAP_AS_WITHOUT_POOL"); but then i get the error: ""(106) JCO_ERROR_RESOURCE: Destination ABAP_AS_WITHOUT_POOL could not be created:"..

Can anyone explain me how this works?

 

Thanks in advance!

LDAP acces via SSL - javax.net.ssl.SSLHandshakeException

$
0
0

Hello All

 

I'm trying to fing reason for non-working SSL connection from java app (EJB) to LDAP server.

 

Code is:

 

env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
System.setProperty("ssl.ServerSocketFactory.provider","oracle.security.ssl.OracleSSLServerSocketFactoryimpl");
env.put(Context.PROVIDER_URL, urlLdapServer + baseDN);
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, "user");
env.put(Context.SECURITY_CREDENTIALS, "password");

 

And while trying to connect exception is thrown:

 

Exception while getting data from LDAP:

javax.naming.CommunicationException: simple bind failed: server_address:636 [Root exception is javax.net.ssl.SSLHandshakeException:

sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException:

unable to find valid certification path to requested target]

 

In portal's configuration there is key storage named TrustedCAs containing valid certificate for this LDAP server.

 

I'm bit stuck, so any help would be highly appreciated.

 

Thanks in advance

Best Regards

Maciej Gottfried

How to open a new JSP as a Popup

$
0
0

Hello everybody,

 

I have quite some experience working with java web dynpros, however I now have a requirement to work on an existing JSP page to add some new functionality, and I'm  a little bit lost since this is the first time I work with JSPs in SAP portal.

 

What I need to do is that when an user clicks on a button on page1.jsp, a new jsp (that didn't exist before, since I've just created it) called page2.jsp has to open as a popup with a selection list. After the user selects a value from this list, this value has to be sent to an input field in page1.jsp.

 

I've can do this in regular JSPs running on tomcat, with no problems ;).... However, when I try to do this in SAP portal, I get an error and the following exception in the logs, when I click on the button in page1.jsp:

 

com.sapportals.portal.prt.runtime.PortalRuntimeException: iView not found: page2.jsp

at com.sapportals.portal.prt.deployment.DeploymentManager.getPropertyContentProvider(DeploymentManager.java:1937)

at com.sapportals.portal.prt.core.broker.PortalComponentContextItem.refresh(PortalComponentContextItem.java:222)

at com.sapportals.portal.prt.core.broker.PortalComponentContextItem.getContext(PortalComponentContextItem.java:316)

at com.sapportals.portal.prt.component.PortalComponentRequest.getComponentContext(PortalComponentRequest.java:387)

......

 

I'm not sure what I have to do to fix this... do I need to ask the portal guys to create a new iview for the new jsp and treat it as a new app? Or is there a simplier solution?

Any help will be greatly appreciated, and of course points awarded accordingly

 

Cheers!

How to convert string yyyy-mm-dd to date dd/mm/yyyy

$
0
0

Hi Experts,

 

I am getting date in the form of string 2007-06-30 from R/3. How I can convert this string into a date in the form 30/06/2007. I have to use java.sql.Date.

 

Following code is not working. As for executing the following code, I have to use java.util.date. I can not use java.util.date as the Web Dynpro program uses java.sql.Date.

 

     SimpleDateFormat sdf1 = new SimpleDateFormat("dd/mm/yyyy");     Date d = null;     d = sdf1.parse(wdContext.currentContextElement().getDateClicked());

 

Regards,

Gary

DYNPRO_SEND_IN_BACKGROUND

$
0
0

Hi All,

 

I am executing a JCO Program which triggers a RFC using JCO's <b>execute(String functionName)</b> method.

 

RFC inturn calls an SAP interface which process the goods issue files.

 

After processing few files i get a connection closed error.

 

In seeing in Transaction ST22 the error was DYNPRO_SEND_IN_BACKGROUND

 

When executed in SAP GUI the error never comes and also when the abapDebug is set to true

 

and its strange that its coming after processing some few files.

 

Any Idea

 

Thomas

Viewing all 518 articles
Browse latest View live


Latest Images