Accessing BAPIs in JSP Dynpage
Dear Experts,
I need to access BAPIs in my JSP Dynpage applications. As per my understanding, there are in two ways we can acheive this JCO and JCA. I would like to know the difference between these two methods ibased on performance.
Any pointers? Thanks for your help!
Ram
Hi ,
Please take a look at the below links.
http://help.sap.com/saphelp_nw2004s/helpdata/en/f5/cfa441cd47a209e10000000a155106/frameset.htm
JCA
Hope these will help.
Thanks,
Sandip
Similar Messages
-
How to have a popup in Jsp Dynpage
Hi All,
I am having a JSP dynpage project working fine.
I now need a popup on click of a button in a iview (JSP).
I created a complete new JSPDynpage component with Bean etc.
I use the below code
window.open('project.componentname') to have a popup.
and in portal. xml I define the properties ComponentType & JSP.
the window pops up but with error at all times even for a blank JSP,
your help would be well apprictiated at this stage of my project situation.
I need a popup window where that popup is not just a confirm message but a process with several events and DB access.
Thanks in advice,
blsaiueHi
Avaialable controls in JSP Dynpage technologies.
http://help.sap.com/saphelp_nw04/helpdata/en/d0/55074155bcf26fe10000000a1550b0/frameset.htm
Regards
-SS -
Hi there,
I have developed a portal application using JSP Dynpage which calls R/3 BAPI but I have a strange issue here.
This application calls BAPI and displays it using HTMLB table control.
When returned values from R/3 are small, it is OK. The problem is when large amount of data comes from R/3, data is correctly displayed but Bean seems to be cleared after displaying it. Therefore if one clicks any button on the applicaiton, NullPointerException occurs due to null bean.
Bean scope is "Application".
Do you have any experience like this? Any input is appreciated!
Regards,
KazuyaAt the moment there is a lot of ambigious information about this, and I've asked for some weblog tying it all together (see Bean scope storage confussion)
You problem is that beans in the application scope can be deleted at anytime if the SAP J2EE needs memory. Try the session scope (or search the forums, lots of people have had the same problem before) -
How to access BAPI in enterprise portal perspective?
hi,I am venkat new to the portal.can anyone plz tel me how to access BAPI in enterprise portal perspective?is done through JCo or any other database connection?I hav not seen in System Landscape about BAPI access.plz give guidance about BAPI interface in enterprise portal.Hope u will understand the question and answer the query.
thanx in advance.
Regards:
Venkataramana.Guys,
Herez how you call a BAPI:
public void buildConnection(){
try {
System.out.println("**** DI2 *****");
// Add a connection pool to the specified system
// The pool will be saved in the pool list to be used
// from other threads by JCO.getClient(SID).
// The pool must be explicitely removed by JCO.removeClientPool(SID)
com.sap.mw.jco.JCO.addClientPool( SID, // Alias for this pool
10, // Max. number of connections
"040", // SAP client
"USERNAME", // userid
"PASSWORD", // password
"EN", // language
"IPADDRESS",// host name
"40" );
// Create a new repository
// The repository caches the function and structure definitions
// to be used for all calls to the system SID. The creation of
// redundant instances cause performance and memory waste.
repository = com.sap.mw.jco.JCO.createRepository("MYRepository", SID);
JCO.Client client = null;
client = JCO.getClient(SID);
// Get a function template from the repository
//IFunctionTemplate ftemplate = repository.getFunctionTemplate("BAPI_CUSTOMER_GETDETAIL2");
IFunctionTemplate ftemplate = repository.getFunctionTemplate("YGGLB_BAPI_YGGLB9PRK_PRKDOCU");
// Create a function from the template
JCO.Function function = ftemplate.getFunction();
// Get import (of Function Module) "Parameter list"
JCO.ParameterList input = function.getImportParameterList();
// Set inputs for import parameters
//input.setValue("0000009000", "CUSTOMERNO");
//input.setValue("0248","COMPANYCODE");
// Get import (of Function Module) "Structure list".
//JCO.Structure importStructure = function.getImportParameterList().getStructure("CUSTOMERADDRESS");
JCO.Structure importStructure = function.getImportParameterList().getStructure("IM_DOCUMENTHEADER");
// Set values for import parameters (of Function Module) "Structure list"
importStructure.setValue( "SA", "DOC_TYPE" );
importStructure.setValue( "20080910", "PSTNG_DATE" );
importStructure.setValue( "20080910", "DOC_DATE");
importStructure.setValue( "BHARDWS", "USERNAME" );
importStructure.setValue( "2008", "FISC_YEAR" );
importStructure.setValue( "FRE1", "COMP_CODE" );
// Get import (of Function Module) "Table list - 1".
JCO.Table orderPartners = function.getTableParameterList().getTable("TBL_ACCOUNTGL");
// Set values for import parameters (of Function Module) "Table list - 1"
//Append Row -1
orderPartners.appendRow();
orderPartners.setValue("0000000001", "ITEMNO_ACC" );
orderPartners.setValue("0000400100", "GL_ACCOUNT" );
orderPartners.setValue("H", "DE_CRE_IND" );
orderPartners.setValue( "ANYTHING", "ITEM_TEXT" );
//orderPartners.setValue( "AG", "PROFIT_CTR" );
orderPartners.setValue( "AIG0000007", "COSTCENTER" );
//Append Row -2
orderPartners.appendRow();
orderPartners.setValue("0000000002", "ITEMNO_ACC" );
orderPartners.setValue("0000400100", "GL_ACCOUNT" );
orderPartners.setValue("S", "DE_CRE_IND" );
orderPartners.setValue( "NOTHING", "ITEM_TEXT" );
//orderPartners.setValue( "AG", "PROFIT_CTR" );
orderPartners.setValue( "AIG0000007", "COSTCENTER" );
// Get import (of Function Module) "Table list - 2".
JCO.Table orderItems = function.getTableParameterList().getTable("TBL_CURRENCYAMOUNT");
// Set values for import parameters (of Function Module) "Table list - 2"
//Append Row -1
orderItems.appendRow();
orderItems.setValue("0000000001", "ITEMNO_ACC" );
orderItems.setValue("USD", "CURRENCY" );
orderItems.setValue( "2000", "AMT_DOCCUR" );
//Append Row -2
orderItems.appendRow();
orderItems.setValue("0000000002", "ITEMNO_ACC" );
orderItems.setValue("USD", "CURRENCY" );
orderItems.setValue( "2000", "AMT_DOCCUR" );
// Execute client
client.execute(function);
//******************Start to work on fetching values now********************************
// Get export (of Function Module) "Structure list".
/*JCO.Structure returnStructure = function.getExportParameterList().getStructure("CUSTOMERADDRESS");
JCO.Structure returnStructure2 = function.getExportParameterList().getStructure("CUSTOMERGENERALDETAIL");
returnStructure.getString("NAME");
returnStructure2.getString("ENTERED_BY");*/
// Get export (of Function Module) "Table list"./// Create a new template if fetching table data from a different function module than above
//IFunctionTemplate ftemplateTable = repository.getFunctionTemplate("BAPI_CURRENCY_GETLIST");
//JCO.Function functionTable = ftemplateTable.getFunction();
//client.execute(functionTable);
JCO.Table table_return = function.getTableParameterList().getTable("RETURN");
Vector tbl = new Vector();
Vector row = new Vector();
Vector colNames = new Vector();
//Loop over all rows
do {
//Loop over all columns in the current row and add all those colums values to the current row
for (JCO.FieldIterator e = table_return.fields();
e.hasMoreElements();
JCO.Field field = e.nextField();
row.add(field.getString());
System.out.println(field.getName() + ":\t" + field.getString());
} // end for
//Add this newly built row to the table
tbl.add(row);
} while (table_return.nextRow());
table_return = null;
table_return = function.getTableParameterList().getTable("RETURN");
table_return.nextRow();
for (JCO.FieldIterator e = table_return.fields();
e.hasMoreElements();
JCO.Field field = e.nextField();
colNames.add(field.getName().toString());
//DefaultTableViewModel dtvModel = new DefaultTableViewModel(tbl, colNames);
//beanObj.setModel(dtvModel);
System.err.println("getting value for you from session in Get Data 1:-");
JCO.releaseClient(client);
// return dtvModel;
catch (JCO.Exception ex) {
System.out.println("Caught an exception: \n" + ex.getMessage());
}catch (Exception e){
System.out.println("Final Message" + e.getMessage()); -
10.1.3.4 - how to secure access on a jsp page ?
I have a simple jsp page that takes in some user values and then kicks off a workflow. I want to restrict the access on the jsp page so that only users of a certain group can use it. right now it is completely open and anyone can just go the page and start of a transaction.
found an article on this
http://www.oracle.com/technology/products/jdev/howtos/1013/adfsecurity/adfsecurity_10132.html -
How to put the trace messages in JSP DynPage
Hi,
How to put the trace messages in JSP DynPage components. What settings I need to do and where do I see the trace log.
Can I also print the values of some variables in trace. If yes, how to achieve this?
Thanks in advance,
Regards,
MadhuHi Madhu,
for NW04 see http://help.sap.com/saphelp_nw04/helpdata/en/e2/75a74046033913e10000000a155106/frameset.htm
as well as
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/using logging and tracing on the sap web as java.pdf
Hope it helps
Detlev -
Custom loading image JSP dynpage
Hello,
Wa have created a jsp dynpage, and want to show a custom loading image. I other applications (appintegrator) we have succesfully changed the loading image by exporting the theme that we are currently using, change the loading_ani.gif image and re-importing the theme. This change has no effect on the loading image of the JSP dynpage, it is still the one supplied by SAP. I checked the url of this image and got the following https://host:port/htmlb/mimes/common/loading/loading_ani.gif, so I tried changing the loeding image that is stored in the htmlb par file, but there was no visible result when loading the application, or when loding the direct url of this image. Can anyone tell me where I can change the loading image of the JSP dynpages?
Kind Regards
Timon Van SoomJuhi Bhatnagar
Greetings!!!
May i know , what is the procedure need to be followed to replace the default Loading ICON with our custom image.
2. Does our custome image should be a image file (like jpg, png) or its like a command
Kindly share the procedure for this...
Appreciate your response in advance'
Thanks -
Location of the file accessed by OA.jsp
Hi,
I have the below url
https://server.server.com/OA_HTML/OA.jsp?page=/oracle/apps/cz/cx/xxx/webui/AttributesValuesPG&retainAM=Y&enableHB=false&debugPath=&debugFile=&oas=dbJT9-mnVxU61nxwoJ5Qbw..
But, not able to locate the directory /oracle/apps/cz/cx/xxx/webui/ in the unix server. Can someone help. I am trying to obtain the file AttributesValuesPG that is being accessed by OA.jsp.
Thanks.Hi Shankar,
Under JAVA_TOP you can find the class files only.
For the .xmls we have to go for MDS.
You are trying to access a custom developed page.
All page definitions will reside under MDS.
So Please perform the following Steps in Putty or WINSCP
cd $APPL_TOP/cz/11.5.0/mds/cx/xxx/webui
Here you can find the required .xml page.
Ex:/eebsmt/orasoft/appl/cz/11.5.0/mds/cx/tso/webui
Hope this will resolve your problem.
Regards,
Palepu -
Hi,
Please tell me how to create a jspdynpage in netweaver.
Please give me detailed stepsHi,
you will get many documents if you search in sdn or help.sap.com.
here are some sample threads /applications
Application in JSP DynPage
Jsp dynpage help
tutorials of dyn pages and jsp dynpages
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0e51ec90-0201-0010-adbe-cacdbb88f3b8
http://help.sap.com/saphelp_nw70/helpdata/EN/83/4baa42cdccda11e10000000a155106/frameset.htm
http://help.sap.com/saphelp_nw70/helpdata/EN/f5/cfa441cd47a209e10000000a155106/frameset.htm
regards,
Pradeep -
I created a JSP Dynpage via NWDS.
based on the sampples at <a href="http://help.sap.com/saphelp_nw04/helpdata/en/19/4554426dd13555e10000000a1550b0/frameset.htm">SAP Help Creating the JSPDynPage</a>
When I run it, I got the error:
Error in parsing taglib 'tagLib' tag in web.xml or .tld file of the taglib library..
Any point where I can start looking? Is anyone having a better documentation to look at than this rather puristic description?Thanks for your input.
Do you have any specific links for JSPDynpages? Since most of the DevStuff is about WebDynpros, which I don't plan to use here.
I updated portal.app, but I am not sure if it is right:
<?xml version="1.0" encoding="utf-8"?>
<application>
<application-config>
<property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>
<property name="SharingReference" value="htmlb"/>
</application-config>
<components>
<component name="log2UME">
<component-config>
<property name="ClassName" value="log2UME"/>
<property name="ComponentType" value="jspnative"/>
<property name="JSP" value="pagelet/log2UME.jsp"/>
</component-config>
<component-profile>
<property name="tagLib" value="SERVICE/htmlb/taglib/htmlb.tld"/>
</component-profile>
</component>
</components>
<services/>
</application>
and the jsp page:
%-- OutputText.jsp --%>
<%@ taglib uri= "tagLib" prefix="hbj" %>
<hbj:content id="myContext" >
<hbj:page title="PageTitle">
<hbj:form id="myFormId" >
<hbj:textView
id="welcome_message"
text="May the force be with you unknown user"
design="HEADER1" />
</hbj:form>
</hbj:page>
</hbj:content> -
I wish to debug a JSP dynpage project.
For that I selected Debug perspective and then Create Manage and Run Configuarations. There I selected Remote Java application.
I get a message "Failed to connect to remote VM. Connection refused".
I entered localhost and 5000 as port. Is there any problem with it?Hello Prem,
You should start your J2EE-Server in Debug mode to be able to debug:
Steps to follow to start J2EE-Server in Debug mode
1. Run ConfigTool "configtool.bat" which is under path "C:\usr\sap\J2E\JC00\j2ee\configtool\configtool.bat"
2. In ConfigTool goto -->
cluster-data>instance_ID*****>server_ID******
then on the right details-window, goto Tab "Debug".
Select the check box "Debuggable" and Check box "Enable debug mode" and set a "Debug port" generally 50021.
Now restart server and try connecting to the remote VM with your Debug port.
Greetings,
Praveen Gudapati -
Difference between abstract portal component ,dynpages and jsp dynpage
Hi All,
I am new to the SAP world.Can you help me out in finding the difference between abstract portal component ,dynpages and jsp dynpage in Portal development.Please send me any information.Hi,
Welcome to SDN Community
This blog will brief you the differences between them,
Java development methodologies (Part II)
Regards
Srinivasan T -
Hi,
I have implemented reading an XML feed in a Java program using informa api.
In NWDS, I created a Java Project. And as required added 3 externals jar files.
I had to import the following:
import de.nava.informa.core.ChannelIF;
import de.nava.informa.core.ItemIF;
import de.nava.informa.impl.basic.ChannelBuilder;
import de.nava.informa.parsers.FeedParser;
The program works on run.
But when I creat a JSP DynPage and I add the follwoing lines:
<%@ page import = "de.nava.informa.core.* "%>
<%@ page import = "de.nava.informa.impl.basic.ChannelBuilder "%>
<%@ page import = "de.nava.informa.parsers.FeedParser "%>
I get an error: Error occurs during the rendering of jsp component. Even in this project I added external Jar files in the same way.
Any particular stuff need to reside on the server or something?
Because I one tried implementing JCO in JSPDynPage by adding the external jar in the project structure and it worked fine.Hi Prem,
Probably the jars you must have added in your last project would be available on the server or they would have been some server related jar files.
But in the case when you are inclusing some external jars, you need to inclusde it both as "<b>External Jar</b>" and also add it to the <b>lib</b> folder (ie: just copy and pate the jar files in the <b>lib</b> filder).
<b><a href="http://img142.imageshack.us/img142/8168/solution4gy.jpg">Put the .jar file here</a></b>
I hope this solves your problem.
Regards
Pravesh
PS: Please consider rewarding points if helpful and solved. -
Access BAPIs Using the SAP Java Resource Adapter
Hi experts,
Can someone tell me how to Access BAPIs Using the SAP Java Resource Adapter?hi Shweta,
Please refer the step by step procedure:
1. Start the deploy tool of the SAP J2EE Application Server with the DeployTool.bat in the directory //<SAP J2EE Engine Installation Directory/.../j2ee/deploying.
2. Choose Project → New Project and enter a name for the new project.
3. Click on the Deployer tab.
4. From the menu path, choose Deploy → EAR → Load Module and select the sapjra.rar file.
5. For the newly created node sapjra.rar, choose Server Settings → Identity Subjects and select Caller Impersonation as authentication type, so that the J2EE user data is used to log on to the ABAP system.
6. Make sure that the J2EE Application Server is running. Connect to the J2EE Application Server with Deploy → Connect.
7. Deploy the sapjra.rar using the menu Deploy → Deployment → Deploy Module.
8. Enter SAPJRADemo as application name and start the application.
9. Close the deploy tool.
10. Start the Visual Administrator again.
11. Select the Cluster tab and switch to <Server Node> → Services → Connector Container.
12. Click on the Runtime tab and choose sap.com/SAPJRADemo → eis/SAPJRADemoFactory.
13. Choose Managed Connection Factory → Properties. On this page, you need to specify the logon data for the ABAP system. There is already some dummy data visible in the property list if no real system data has been specified so far.
14. To change the value of a property, select the property in the list, change the value underneath it, and add the changes using the Add button. At the end, do not forget to save all changes by pressing the button Save Changes. The user configured for the SAP JRA must be the user authorized to read metadata of function modules. -
Hi..
I have a HTML page that refers to some javascript files to render a table view for a calendar .The html page along with the Javascript files are put together in one folder.
The HTML renders the Calender UI when run from the local system.
Now i have created a JSP Dynpage application and given proper reference to the javascript files from the JSP.
I created an iview out of this. But on preview the Calendar UI is not rendered.Its all a blank page.
Please suggest as to what could be missing in the application or any possible reasons for this not working.
Regards
SmitaChandramohan,
By JSP Page are you referring to JTF JSP page or an OA Framework page. In either case if sometimes the page is not coming up it might be related to the initialization logic/instance/data. Please check on these fronts.
Regards
Sumit
Maybe you are looking for
-
Does anyone get this to work on WinXP?
I found a bunch of threads on this topic, but none of the recommended fixes have worked for me. Here's my setup: The Mac is a Dual 867 G4 (MDD), running OS 10.4.5. Uses Airport to connect wirelessly to a Linksys 4-port WAP. The printer is an HP Laser
-
My audio for songs all sound like chipmunks...
I actually know what I did wrong...I just can't get it back. All audio on my computer is sped up. I uninstalled Microsoft Plus! Digital Media Edition, and did not know this would happen. I tried Restoring my computer to earlier dates but it will not
-
Hi All, We are using Cost center assessments to allocate costs.whenever we do cost center assessments with receiving tracing factor as "fixed percentages" then system is posting to cost center as well as PCA.but when we use cost center assessments wi
-
Formula Node - Embedded If statements
Greetings, I would like to "embed" an if statement within an if statement using a formula node. The structure is as follows: if(x == y/2) y = 0; if(a < c && a > d) a = a - 1; For some reason when I run my code and both of the criteria for my if s
-
Multi-Page full screen JSP Portlet
If one is attempting to create a portlet application that needs multiple pages in full screen mode, is the best approach to "portletise" the first page (entry point), and then have subsequent full screen pages displayed outside of the portal page? If