RE:Creating Table in Webdynpro Java
Dear all,
We are creating a medical claim in which we have to enter multiple values as input into a table.We have created a function module and imported into model,binding to context is done .
We are have to things in the application
1.cltyp(dropdown box)
2. Table
i am writing the following code to initilize the dropdown as
input.setCltyp(wdContext.currentZhrg_Ep_Med_InputElement().getCltyp());
but when we are trying to initilize the table its giving as error.
we are not able to give inputs as the table is in disable mode.
Please treat as Urget and reply asap
ravi.s
hi Ravi,
I was faced the same problem previously, the solution for this problem is
1. first check the Cardinality of context binding
2. and then check the Object intialization(like create object for that particular BAPI elements(root nodes and sub nodes) in COmponent controller init() mentod)
for Example find out the below code:
" Bapi_Catimesheetmgr_Insert_Input in = new Bapi_Catimesheetmgr_Insert_Input();
wdContext.nodeBapi_Catimesheetmgr_Insert_Input().bind(in);
in.addCatsrecords_In(new Bapicats1()); "
in the above code
Bapi_Catimesheetmgr_Insert_Input is root node and sub node is "Catsrecords_In is a sructure for the Bapicats1".
then only ur table will be in enable mode.
try above code once using ur BAPIs
I hope it will helpful to u
"Please award points for helpful answers"
Thanks
Anu
Similar Messages
-
Binding and displaying data to table in webdynpro java
hi all,
i want to know how to bind the output values to table in webdynpro java.
i know how to bind values in context to table,but if we want to display the values from database(back end ) and display in table present in the view.
eg: i have table in view and want to get values from backend(SQL server) and display it in that table.
plz help me to know ..
thanks
sirishaHi Saisirisha,
Try this.
1> Take a Value Node(Employee) cardinality 0..n.
Employee Structure
Employee
|------Surname(Attribute)
|------FirstName(Attribute)
|------Category(Attribute)
2> Bind this value node(Employee) in the View datasource of table.
3> Try the code inside wdDoInit method.
try {
// Load the JDBC-ODBC bridge
Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
// specify the ODBC data source's URL
String url = "jdbc:odbc:SSPer";
// connect
Connection con = DriverManager.getConnection(url,"North","Ken");
// create and execute a SELECT
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery
("SELECT Surname,FirstName,Category FROM Per");
while (rs.next()) {
// get current row values
String Surname = rs.getString(1);
String FirstName = rs.getString(2);
int Category = rs.getInt(3);
//create table row and add the value in the table
IPrivate<Put View Name>.IEmployeeElement empElm = wdContext.createEmployeeElement();
empElm.setSurname(Surname);
empElm.setFirstName(FirstName);
empElm.setCategory(Category);
wdContext.nodeEmployee().addElement(empElm);
// close statement and connection
stmt.close();
con.close();
} catch (java.lang.Exception ex) {
wdComponentAPI.getMessageManager().reportException("Exception : "ex.getMessage()+,true);
http://www.developer.com/java/data/article.php/3417381
Regards,
Mithu -
Can we access PI tables from WebDynpro Java via PI 7.1?
Hi Experts
Is it possible to fetch PI Tables (to display monitoring and alerts as dashboard on portal) from Java Stack. I got some javadocs API SAP Netweaver for PI 7.1 but i don't know how far it can help me in solving my purpose of fetching and displaying the PI monitoring data on Portal.
https://www.sdn.sap.com/irj/sdn/javadocs
Please advise if J2EE access to PI Tables is possible or RFC is the suggested solution to fetch PI Monitoring data.
Thanks
NehaHi Neha,
You can access PI tables from Webdynpro Java application using RFC or Webservices. Create RFC or Webservices which will fetch data from the PI tables.Create the required JCO's and the Webdynpro java application which uses the Adaptive RFC model or Adaptive Webservice Model to connect to the ECC system.
I found a document that speaks about fetching data from SXMB_MONI Standard Table https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b050ff4f-84c3-2b10-3d99-8f9c44f57a17
Hope this is useful.
Regards,
Seema Rane. -
How to insert a button on the column header of a table in webdynpro java
Hi
Can anyone tell me how to insert a button on the column header of a table in webdynpro java?
regards
sunitHi sunit,
Instead of adding button in the column header , in the column
add a fixed top cell.
right click on the column
Insert FixedTopCell
Right click on the fixedTopCell
insert Editor.
select button.
then button will be only in the top most row.
Hope it will satisfy ur requirement
Regards
Smitha -
Providing sorting filters for a table in webdynpro java application
ho to provide sorting , filters , for a table in webdynpro java application .
Hi Pradeep,
Please go through the following article on implementation of filtering and sorting:
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f024364b-3086-2b10-b2be-c0ed7d33fe65
The article contains a link to a sample application using the TableSorter and TableFilter Class.
The same classes can be used by any other web dynpro application. Download the sample application and copy the classes. In case of a specific requirement, modify the TableSorter and TableFilter classes.
Regards,
Kartikaye -
Access ABAP table in Webdynpro Java application
Hi All
Is it possible to access ABAP table in Webdynpro Java application
Please provide your input
Thanks
Karthi D.Hi you will connect to the remote SAP system, the
backend, using an Adaptive RFC MOdel. To access database tables, you can make use of existing functions in terms of RFC function modules. For each function module you need, the system generates a corresponding Java proxy class. All the generated proxy classes and interface are bundled together in the RFC model and treated as part
of your Web Dynpro project
In WebDynpro java you RFC by using Model :
Adaptive RFC Model
1. automatically adapts to changes in function module signature
2 provides support for data types and extensibility
3.support for different structure definitions in different backend
systems (release dependent structures, custom adaptation)
Basic principles and guidelines
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/11c3b051-0401-0010-fe9a-9eabd9c216de
See this blog
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/wdjava/faq%2b-%2bmodels%2b-%2badaptive%2brfc
http://help.sap.com/saphelp_nw04s/helpdata/en/6a/11f1f29526944e8580c5e59333d96d/frameset.htm
Thanks,
Tulasi -
Has anybody created Iview from "Webdynpro Java" component in CE7.1 ?
Hi All,
Has anyone created Iview from Webdynpro Java component in CE7.1.
Because the wizard that appears for creation of Iview has only "Webdynpro ABAP"
component.There is no option to create iview from "Webdynpro Java" component.
Althought in portal content--->Template folder i can see there is also
another template for "SAP Webdynpro iview" which i think is for the Java scenario.
But issue is, its not coming in the wizard.Can anyone tell me how to make it appear in the wizard ? It will be of great help to me.
Thanks and Regards
AshisHi Ashis,
your deployed webdynpros are published under "web dynpro applications". just copy the webdynpro from there and paste it into the portal content section.
http://help.sap.com/saphelp_nwce10/helpdata/en/ce/e0d6f54ae641fc9566501cffaa8c6c/frameset.htm
Hope that helps you.
Best wishes, Jens -
Hi All,
there are some examples "Creating Table Data in Java" in the Oracle ADF UIX Developer's Guide Chapter 9 - Creating Tables in ADF UIX.
Especially the directory listing is interesting. It works fine in my testproject.
But how can I pass parameters to this class dynamically. (e.g. path of the directory). If I add a new parameter to the method
public static DataObject getDirectoryData(RenderingContext context,String namespace, String name, String myPara)
I get the following error message:
Warning(124,58): test.uix: Parsing error, line 124, column 58: Could not find method getDirectoryData in test.MyTable:Method getDirectoryData does not have the correct signature.
Thanks for any tips or idea
RogerThank you for answering.
May I use this example in a data provider with a dynamic variable for the path?
If I use my own class inside an INVOKE element the problem is as follows: I'm not able to format the return stream. It contains a StringArray.
In a servlet I can use the following simple syntax for a HTML choicebox:
-------------------snipp-----------------------------------
buffer = buffer + "<select name=\"p_file\" size=\"1\">";
for (int i=0 ;i<p_length ; i++ ) {
buffer = buffer + "<option value=\"" +lines[i]+"\">" + lines;
buffer = buffer + "</select>";
-------------------snapp-----------------------------------
I don't find a solution to use a for-loop in uix. The JSTL syntax doesn't work there.
Any ideas?
THX Roger -
Enhancing Tables in WebDynpro Java using Table Utilities
hi all,
I want to export table date into excel2003.I go through a blog
/people/sap.user72/blog/2006/05/04/enhancing-tables-in-webdynpro-java-150-custom-built-table-utilities
but I am export my table data into excel.Can anybody send tutorial of this project.?
Thanks&Regards
Suresh Kumar T.Hi Suresh,
You can download the project from the following link
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#58
Hope it helps.
Regards
Nikhil -
How to create webservice in Webdynpro java
Hi Experts,
I need to develop one application in Visual Composer.Since VC doesn't support coding so i need to create Webservice in webdynpro java and use that webservice in VC.Can any one of you please suggest how to create Webservice in Webdynpro Java.
Regards,
Prasanna.Hi prasanna,
Refer this links.
/people/sridhar.k2/blog/2006/09/12/creating-and-exposing-bapi-as-web-service-and-using-it-in-web-dynpro
BAPI Exposed as Web Service
Connect R/3 from Java web application
Web Dynpro integration with R/3
http://help.sap.com/saphelp_nw04s/helpdata/en/82/6a0e7bbe744276bf393654b9b576ed/frameset.htm
Regards,
karthik. -
Dynamic table in Webdynpro Java
Hi Colleagues,
I need to develop a table dynamically in webdynpro(Java), the table should not contain scrollbar, header, lines and border...Actual requirement is to group 12 elements in the from of a table
could anyone please help me here?
Thanks & Regards
SwethaHi Armin,
In a window i have to develop a part of window which looks like this
Image URL Description
Image URL Description
Image URL Description
Image URL Description
I have tried doing this using Flow layout for each line
But when i follwed that the last column "description" is not alligned in a straight line(for all rows)
structure is not even as shown above
(varying depending upon the length of the URL)
Here i have attached the piece of code i used
IWDTransparentContainer MainContainer1 = (IWDTransparentContainer)view.createElement(IWDTransparentContainer.class);
IWDFlowLayout flowlayout1 = (IWDFlowLayout)MainContainer1.createLayout(IWDFlowLayout.class);
////For adding Image
IWDImage image = (IWDImage)view.createElement(IWDImage.class);
image.createLayoutData(IWDFlowData.class);
image.setSource("~sapicons/s_b_alet.gif");
/////for Adding URL
IWDLinkToAction link1 = (IWDLinkToAction)view.createElement(IWDLinkToAction.class);
IWDTextAccessor link1text = wdComponentAPI.getTextAccessor();
link1.setText("Collaboration Window");
IWDAction Action1 = (IWDAction)view.getAction("Openlink");
link1.setOnAction(Action1);
IWDFlowData linkdata1 = link1.createLayoutData(IWDFlowData.class);
WDLayoutCellDesign rightpad = WDLayoutCellDesign.R_PAD;
WDLayoutCellSeparator seperator = WDLayoutCellSeparator.LARGE;
linkdata1.setCellDesign(rightpad);
linkdata1.setVGutter(seperator);
///for adding description
IWDTextView text1 = (IWDTextView)view.createElement(IWDTextView.class);
text1.setText("Testing");
IWDFlowData textdata1 = text1.createLayoutData(IWDFlowData.class);
textdata1.setCellDesign(rightpad);
textdata1.setVGutter(seperator);
MainContainer1.addChild(image);
MainContainer1.addChild(link1);
MainContainer1.addChild(text1);
IWDGridData maincont1 = MainContainer1.createLayoutData(IWDGridData.class);
maincont1.setPaddingLeft("10px");
maincont1.setPaddingTop("20px");
I found that this static way of adding rows is not the right way( Keeping in mind the future enhancements)
So thought of trying it through table
i have used IWDtable ...but the look does'nt meets the requirement at all(it has header....border..scrollbar..rows and colums are seperated by lines---> which are not needed)
Could you please let me know is there a approach to do this?
Thanks & Regards
Swetha
Edited by: Swetha Nellore on Feb 18, 2009 12:32 PM
Edited by: Swetha Nellore on Feb 18, 2009 12:33 PM
Edited by: Swetha Nellore on Feb 18, 2009 12:34 PM -
Build gui for existing oracle database tables with webdynpro java?
hi
i want to build a GUI to maintain existing oracle tables
so far we used oracleFORMS to do so
is there a good approach for webdynpro java? or do you recommend other sap tools?
can we generate the gui with a wizard based on the fields in the table?
do we have to generate sql statements or type in manually?
regards
joergHi Joerg,
generally that is possible, but you'll have to implement the data access by yourself, by means of EJB or another Java persistance framework such as JDO, SQLMaps, Hibernate, whatever...
Web Dynpro allows to build a GUI based upon a model - in this case this could be some POJOs (DTOs) representing your database tables, which are communicated to the GUI by your data access layer. Consider a model as a simple Java bean representing database data.
This approach would require to build a data access layer which incorporates manually generated sql statements, so you'll have to have expert database and java knowledge.
There might be other approaches, this is just to demonstrate one working possibility.
regards,
Christian -
Formatting dates in a table in webdynpro java for mutliple entries.
Hi all,
I have a requirement to format date values in a table for multiple entries to dd/MM/yyyy format in webdynpro java for mutiple line items in that table.
Please help me out with the technique for the same.
Thanks and Regards,
Soumyadeep.Hi,
here is the code for changing the formatting the date.
Date currentDate = new Date ();
DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT);
String today = df.format(currentDate);
SimpleDateFormat sdfInput = new SimpleDateFormat("dd/mm/yyyy");
SimpleDateFormat sdfOutput = new SimpleDateFormat ("mm/dd/yyyy");
try {
String dateft = sdfOutput.format((Date) sdfInput.parse(df.format(currentDate)));
} catch (ParseException e) { -
Creating webservice using webdynpro java calling bapi from r/3
hi all,
as i am new to this area can anyone provide me a guide to create a simple webservice using webdynpro java to call bapi's from r/3?
i want to consume the created webservice on a .net client.
Thanks in advance,
RaghunandanYou can use the SAP .NET Connector to do it.
Download from [http://service.sap.com/connectors|http://service.sap.com/connectors]. -
Create table dinamically using java sql types?
Hi! I've an application that reads an XML file. This file contains de definitions of some tables, using java sql types. For example:
<dbtable>
<dbtablename>Name of table</dbtablename>
<dbtablefield>
<name>Name of table field</name>
<type>java.sql.Types.VARCHAR</type>
<length>10</lenght>
<canNull>0</canNull>
<isPK>1</isPK>
</dbtablefield>
</dbtable>That's a little example of one table, with one field. Is a java.sql.Types.VARCHAR (or is equivalent in int), which has a size of 10, it cannot be null and is a primary key for the table.
Now, the lenght, null, and primary keys are not problem at all. What I want to know, is how do I create de table using the java.sql.Types. I mean, I don't want to hard code:
String s = "CREATE TABLE name (COLUMN VARCHAR(10)...";Instead, I want to use some "wild cards", as are used in PreparedStatement. The idea of this is that no matter what DB I'm using, I must always be capable of creating the tables not worrying for the DB. I mean, I must be able to create the table in Oracle, SQL Server, DB2, etc., using the same XML and the same java class.
Something like:
String s = "CREATE TABLE name (COLUMN ? (10)...";
someobject.setObject(1,java.sql.Types.VARCHAR);
someobject.execute(); //create tableIs this possible? Or do I have to make a map for each DB?
Thanks a lot for your help! Dukes available!you can provide some fields at runtime..
for example
"CREATE TABLE name (COLUMN" + arg[1] +"(10)..."
here arg is the string array passed into the main.
Maybe you are looking for
-
How to know the size of bad sector block after zero out erase?
I found some problems on my USB external harddisk recently. After I backup all the files, I erased the whole volume by choosing "zero out data" option. According to some web articles, "zero out" detects and marks those bad sectors to avoid further re
-
Does anybody know any software for the Mac that I can run round robin, single and double elimination tournaments? I help run tournaments but using excel for pool play and the web for bracket play, but if wifi is not available I have no way of runnin
-
No service problem in iPhone 3GS after upgrading to i.o.s 6.
I updated my iPhone 3GS to i.o.s 6 and now i cant activate it. Showing NO SERVICE even with a valid sim card. Is there a solutio to get rid of this problem and get my phone working back?
-
Emptying iPhoto trash causes iP crash
and it rhymes! Using latest version of iPhoto, I was deleting a number of photos a week ago or so when iPhoto crashed. When I re-opened iP after a restart, everything seemed okay, so I proceeded to add more photos to the trash folder and tried again.
-
Why did iCloud delete my contacts? How do I restore them?
I logged into my iCloud account. After a little while, my phone blinked on and off and now all my contacts are gone. Can you help?