To create a java class in Web dynpro
Hi,
I want to create a java class which can be used in multiple views. Where will i create it and how will i access it?
Can i create the class in Comp controller's imeplementation between "begin others"----
"end"?
Any help?
regards,
Sujesh
Hi,
If you create the class within the begin others"----
"end" section, this class will not be accessible by any other class.
You can create a class in
Project/src/packages/<namespace>/<your component>/<create a new subdirectory>/Test.java.
This will be accessible to all other classes. Just make sure the first line of your java file is the proper package declaration. So in this case the 1st line dhould be:
package <namespace>.<your component>.<subdirectory name>;
Regards,
Satyajit.
Similar Messages
-
hello all,
i am new to web dynpro for java.i have already done an application
"Creating a Web Dynpro Application Accessing ABAP Functions" this application
have good document on sdn.
this application is working fine .
Now i got an requiremnt for creating a purchase order in web dynpro for java.
in normal report when i call the bapi the parameter are the header, headerx,item, itemx is an internal table.
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
POHEADER = HEADER
POHEADERX = HEADERX
POADDRVENDOR =
TESTRUN =
IMPORTING
EXPPURCHASEORDER =
EXPHEADER =
EXPPOEXPIMPHEADER =
TABLES
RETURN = RETURN
POITEM = ITEM
POITEMX = ITEMX.
i just want to know how can i fill these internal table in web dynpro
for java to create an application accessing "Bapi_po_create" .
ThanksHi Gopal,
I'm not sure what is your issue, it seems you're not really understanding how the Model structure works in WDP.
I'll assume few things here, like you know how to Import the Model into the WDP, and you know a little bit about what Java Classes will represent this Model in the Project.
Try these steps:
1. Import your Model into the Project;
2. Open your Component Modeler, create a Data Link between your Model / Component (Or Custom Controller, as you prefer)
- You can also use the "Apply Template -> Service Controler"
3. Map the Input of your Model as the Main Node, check the Input Tables (you prob. will have two, POITEM = ITEM - POITEMX = ITEMX)
4. Also, check the Return box, since this is BAPI return (You can use to display Backend messages)
Now you have the Model mapped into your Controller, you need to develop the Java function to execute it.
1. Create a new Input class, like
BAPI_PO_CREATE1_Input purchaseOrderCreateInput = new BAPI_PO_CREATE1_Input();
2. Bind your Input Node, in the Controller, with your Input Class;
wdContext.nodeBAPI_PO_CREATE1().bind(purchaseOrderCreateInput);
3. Set any Import parameters you need:
purchaseOrderCreateInput.setEXPPURCHASEORDER(XXXX);
4. To Add references to the Table, you will perform something like:
First, you need to know what "Structure" you need to add (POItem Structure) - You have a Java class that represents that Structure..
POITEM_Element poItemElement = new POITEM_Element();
poItemElement.setPROPERTY(); /// Set your Properties
purchaseOrderCreateInput.getPOITEM().add(poItemElement);
5. Execute your Input,
purchaseOrderCreateInput .execute();
Hope it helps,
Regards,
Daniel -
Create a Table Dynamically in WEB Dynpro Java with diferent type of column
Hi everyone, I have a question if is possible to create a table dynamically in Web Dynpro Java?, depending of the RFC consults create the rows dynamically, ,this table must have diferent type of columns, for example link column (when the user click this link execute an action and show a adobe interactive form in another view), image column (show an image depending of the information)
Thank you everyone
Atte IsraelHello,Israel.
Yes , it is possible through dynamic programming in wdModify of the View.
You can do this ,for example, using cell variants.
IWDTable tab = (IWDTable) view.getElement("TABLE_NAME");
IWDTableStandardCell cellV= (IWDTableStandardCell) view.createElement(IWDTableStandardCell.class,"TableStandardCell"+i);
cellV.setVariantKey("NotEditableVariant");
cellV.setCellDesign((WDTableCellDesign)wdContext.nodeTableDaysTitle().currentTableDaysTitleElement().getAttributeValue("CellDesign"+i));
IWDTextView textViewi= (IWDTextView) view.createElement(IWDTextView.class,"TextView"+i); // -- here you control the type of the object that is displayed in the cell
textViewi.bindText(dayAttrib);
cellV.setEditor(textViewi);
tabColumn.addCellVariant(cellV);
tab.addGroupedColumn(tabColumn,tab.numberOfGroupedColumns());
Using this code you can control even specific cells in the table and not only columns.
Hope this helps you,
Constantine -
How can I call a java object from Web dynpro ABAP application?
I made Web dynpro ABAP application and posted it to SAP EP.
For certain business purpose, we need to call external 3rd party java object using 3rd party's java api in Web dynpro application.
Is there anybody who experienced this kind of java interface issue?
I know Web dynpro Java environment can fully support this kind of requirement. but regarding Web dynpro ABAP, I couldn't find any clue for this.
Any comment or suggestion would be greatly appreciated.
Thanks,
Raymond, ABAP Consultantif you have jco configured, then you can make calls to java api from ABAP .
check out this weblog.
/people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
Raja -
Creating a Sales Order using Web Dynpro
Hi SDN,
I want to create a Sales Order using Web Dynpro application. For that i have used "Bapi_Salesorder_Createfromdat2" as a adaptive RFC model. Every thing is fine and i could able to create a sales order for a single line item. But my intension is to create a sales order for multiple line items. So in the "Intialview" i have used a "Table" UI element to pass multiple line items. When i execute this application i could pass only single line item from this table. The table UI contol is not allowing to enter the second line item in the second row of the table. Can any one suggest me to solve this problem.
Thanks in advance.
Regards
BashaHi Basha,
You need to create new element for the model node manually. For example: Create button "New item" and in action handler put someting like described here:
Add row to table
How to add more values in a Table in WD appl
How to add a row to table dynamically?
How to add a column to a table dynamically.
add row to table bound to rfc model
Best regards, Maksim Rashchynski. -
How to create a OTR Text in Web Dynpro ?
Hi All,
Please help, How to create a OTR Text in Web Dynpro ?
Urgent.
Thanks in advance.
Kaleem.Hi Kaleemullah,
To create OTR Text, T-Code is SOTR_EDIT. If you run this transaction then one screen will appear. There you can choose Long Text or Short Text based on your
Text. You can choose language also. In Text field you can enter your text. You can put WDYV in your Object Type field. In Text block Length can be increased to 25 as it may be problem if language conversion of Text happens. You must fill your package field and save the OTR.
I hope you can be able to create OTR Text now.
Best Regards,
bansidhar -
Web Dynpro Java timesheet to Web Dynpro ABAP timesheet what changes needs to be done from EP side
Hi All,
We are moving Web Dynpro Java timesheet to Web Dynpro ABAP timesheet.
what changes needs to be done from EP side?
I have made Web Dynpro ABAP iView calling Web Dynpro ABAP timesheet and linked it with page.
But It is showing an error 'Web Dynpro Application CATDATARECORD does not exist'.
Please suggest what other changes needs to be done.Hi Anurag,
I have added new Web Dynpro ABAP iView to the same page in which Web Dynpro JAVA iview was added and made ABAP iview visible.
And this page is already assigned to role.
How should I link this ABAP iview so that it get replace by the Web Dynpro JAVA iview.
And the application name (CATDATARECORD) is correct and Web Dynpro JAVA is using the same application.
But now we want new time timesheet for that what changes needs to be done?
Please suggest. -
Jav Developer role = Web Dynpro Content Explorer
Hi,
When i navigate to Java Developer role => Web Dynpro Content Explorer(Detailed Navigation) in portal I am getting following error. I am getting the same error in ESS and MSS pages also...
<b>
Portal Runtime Error
An exception occurred while processing a request for :
iView : N/A
Component Name : N/A
com/sapportals/portal/pb/utils/RedirectData.
Exception id: 10:45_30/01/06_0023_2755950
See the details for the exception ID in the log file
</b>
When i look at log files ... I am getting the stack trace.
<b>
<< item 0 : >>#1.5#0002553A11CD00520000002D000A316000040B9554A2BD58#1138635904826#com.sap.portal.portal#sap.com/irj#com.sap.portal.portal#SMANCHAL#1017##nadcp949_LPD_2755950#SMANCHAL#107dd96091a711da84b30002553a11cd#SAPEngine_Application_Thread[impl:3]_0##0#0#Error#1#/System/Server#Java###Exception ID:10:45_30/01/06_0023_2755950
[EXCEPTION]
#1#com.sapportals.portal.prt.runtime.PortalRuntimeException: PortalRuntimeException
at com.sapportals.portal.prt.core.PortalRequestManager.handleRequestException(PortalRequestManager.java:921)
at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:803)
at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522)
at java.security.AccessController.doPrivileged1(Native Method)
at java.security.AccessController.doPrivileged(AccessController.java(Compiled Code))
at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java(Compiled Code))
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java(Compiled Code))
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java(Inlined Compiled Code))
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java(Compiled Code))
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java(Compiled Code))
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java(Compiled Code))
at com.sap.engine.services.httpserver.server.Client.handle(Client.java(Inlined Compiled Code))
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java(Compiled Code))
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java(Compiled Code))
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java(Compiled Code))
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java(Compiled Code))
at java.security.AccessController.doPrivileged1(Native Method)
at java.security.AccessController.doPrivileged(AccessController.java(Compiled Code))
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java(Compiled Code))
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java(Compiled Code))
Caused by: java.lang.NoClassDefFoundError: com/sapportals/portal/pb/utils/RedirectData
at com.sapportals.portal.appintegrator.layer.HTTPRenderLayer.getPageRedirectObject(HTTPRenderLayer.java:282)
at com.sapportals.portal.appintegrator.layer.HTTPRenderLayer.processLayer(HTTPRenderLayer.java:101)
at com.sapportals.portal.appintegrator.LayerProcessor.processActionPass(LayerProcessor.java:173)
at com.sapportals.portal.appintegrator.AbstractIntegratorComponent.doOnPOMReady(AbstractIntegratorComponent.java:71)
at com.sapportals.portal.prt.component.AbstractPortalComponent.handleEvent(AbstractPortalComponent.java(Compiled Code))
at com.sapportals.portal.prt.pom.ComponentNode.handleEvent(ComponentNode.java(Compiled Code))
at com.sapportals.portal.prt.pom.PortalNode.fireEventOnNode(PortalNode.java(Compiled Code))
at com.sapportals.portal.prt.pom.PortalNode.processEventQueue(PortalNode.java(Compiled Code))
at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:652)
... 23 more
</b>
Can you please help me with this...Hi Gary,
> Now do I put this back in original directory
Rrrighty.
> do I need to add back .bak or leave as .par?
Leave as PAR. If the server starts, all .par files within this directory get deployed and in the case of success, .bak gets added. So .par.bak files are not deployed again on the next startup.
> do I need to delete original
> then add my updated version?
I think you don't need to delete the original, but just do it. If your changed .par file get deployed successfully, it will overwrite the old .par.bak anyhow.
But make a security copy of the orginal file for the case that you have changed the original PAR in some strange way
Hope it helps
Detlev -
Exposing java class as web service
Hi All,
I have a requirement where I have to Expose a java class as web service u2013 In NWDS 7.0, we have a web service perspective where we can do this. But in 7.2, I could not find this perspective.
And second requirement is to Consume web service in java class.
Please help me ASAP.
Thanks.Hi All,
Waiting for some suggestions.
Regards,
Nishant -
Create utility class in Web Dynpro project
How do I create my own utility java class but keep it in the Web Dynpro project?
Do I have to create a separate java project and have the WebDynpro classes import it or can I keep it in the Web Dynrpo project?
I tried adding my own java class to the Web Dynpro project and when I did a rebuild all, the generator erased it.
Ideally, I would like to keep everything in the same project if possible as this utility class will only be used by the WebDynpro project.Open Eclipse "Navigator" or "Package Explorer" view and put your class under folder src/packages.
Armin -
How to Pass Java Objects between Web Dynpro and Java SAP iViews
Basically I have an SAP web dynpro iView that I do stuff with and I want to pass an object to another iView which is just a regular Java iView. From what I've read and tried, I can't just stick something in the session object and hope that the Java iView can pull it down the other end. I had a dream that it was possible (seriously).
Anyway, are there any possible solutions around? Please advice and share you throughts. I will try to dream about it again tonight and see if its really gonna work this time.
thanks for your help in advanceThere is no easy way you can pass objects other than those supported by express such as String, map, list etc.
Though not advised, you can create a class with static variables to handle the storage of such java objects during transition between form and workflow. You will need to somehow identify the objects uniquely . -
How to create a custom property for web dynpro iView - please respond
Hi,
I have to create a custom iView property for a web dynpro Java Application. I am searching forums and sap help and not able to find any documentation on this. Please post your thoughts here...
Thanks
Srini
Edited by: Srinibapati on Sep 5, 2009 3:56 PMNo One replied and closing this thread...........I still don't have answer for this.
Thanks.
Srini -
Using Java Model In Web Dynpro
Hi
I have a Java Bean. I have created a JAR file for this DC. A public Part si created for this DC and the JAr file has been added to it.
In the Web Dynpro DC, i add it in the used DCs. But when i go for Add Used Components, iam not able to see it there. And also when i am creating a model by selecting Import JavaBean Model, and selecting the Public Parts of the USed DCs Option, it gives "No Java Beans available for Import" message.
Can anyone please help in this regard, as to how the java bena model is to be used.
Thanks & regards,
Anupreethi,
just check out some of these links, i guess they points to your problem,
Doubt in creating a java Bean Model
/people/anilkumar.vippagunta2/blog/2005/09/02/java-bean-model-importer-in-web-dynpro
Importing a java bean model from another DC
Expose EJB through Java Bean model importer in Web Dynpro
hope it helps
regards -
Assistance class in Web dynpro ABAP
step 1: Create WEB DYNPRO component. Example: Zwd_assist_class_test.
-save.
-Active.
step 2: Assistance class on component(Zwd_assist_class_test) screenwriter assist class name Example:Asistance_class.
step3: Select the Assistance class name click on pop up new window .
step4:Assistance class window methods give method name
step5: Select parameters of the methods giving importing exporting table ,objects.
step6:Select Attributes button given the attribute name Example:ET_MAR.
For example methods READ_ONLY.
coding for method: select * from <db_table> into table <ET_tab> where matnr between im_matnr1 and im_matnr2.
I want using MARA,VBAK,VBAP tables data display in single table,creating two search fields .these are VBELN, MATNR
how to write READ_ONLY method ?Hi Rajasekhar,
The exporting parameters which you have declared can take only one record as its declared as work area. Instead you need to identify the table type and use like
for MARA... MARA_TT
for VBAK... VBAK_T
for VBAP... VBAP_T
but, for your requirement, you need not required to pass mara, vbak, vbap table data, instead you need to put into final internal table ET_result.
I suggest you to create a table type ZTT_RESULT in SE11 which contains all your fields in the output.
Now, inside READ_DATA( ) method you can do as below ( just an example)
loop at lt_mara into ls_mara.
move-corresponding ls_mara to ls_result.
loop at lt_vbap into ls_vbap where matnr = ls_mara-vbeln.
move-corresponding ls_vbap to ls_result.
read table lt_vbak into ls_vbak with key vbeln = ls_vbap-vbeln.
if sy-subrc is initial.
move-corresponding ls_vbak to ls_result.
endif.
endloop.
append ls_result to ET_RESULT.
endloop.
Hope this helps you.
Regards,
Rama -
Calling Remote-Enabled JAVA Module from Web Dynpro Java
Anyone have a clue how I can call a Remote-Enabled JAVA Module in ECC from a Web Dynpro Java app? I'm on Portal 7.0. When I try and create an Adaptive RFC model in NWDS and put in the Function Module name (CFG_API_FIND_KNOWLEDGEBASES) or its Function group, that RFC is not returned for me to import. Can I not use this method to get at this function?
(I CAN call this function module and run it from the old SAP Business Connector software. That, however, does not help me get it into my Web Dynpro app.)If anyone stumbles upon this thread, the long and short answer is you can't call a Remote-Enabled JAVA module in SAP from Web Dynpro Java.....using Adaptive RFC.
You can, however, if you create your own session and function call directly in Java code and give up on being able to use Adaptive RFC.
Maybe you are looking for
-
I can't seem to find it in Purchases as other threads have suggested.
-
Mail sending from wrong gmail address
I have multiple gmail addresses that I send from: one for work and one for personal. The email addresses are very similar, but for an additional ".am" suffix on the username of the work account. When I want to send an email from my work account I swi
-
After installing Yosemite, the Mail required an upgrade. the upgrade was completed but resulted in a message: The upgrade failed. error occurred during the upgrade, check continue to launch Mail Import Assistant. This resulted in an instruction: Your
-
Objects and Counters not available?
Hello, I am trying to get some performance information for a web site. I tried http://blogs.technet.com/b/operationsmgr/archive/2009/04/28/how-to-generate-web-application-response-time-reports-in-opsmgr-2007.aspx but for the counters I could have Tot
-
Itunes installation problem I get the error IXP577 file could not be found.
I keep getting this error, I get it if I try to install the new version of Itunes, or if I try and delete the version already on my computer. This is my personal laptop and have administative access to everything on here thru windows The feature you