Getting Editable Table in Webdynpro Applications
Hi All,
I am developing an ABAP webdynpro application where an employee can claim their medical claims through this application. In the application I need to add one Table with all the fields editable through which the usercan claim n number of claims at a time.
I have already added 1 table with 10 columns each with Input Field attribute and also the read only flag is not ticked for them. But I am not getting the fields as editable.
Please suggest me how we can get a table with all the rows editable.
Regards,
Pravesh.
Hi,
For getting the table in editable mode u need to first initialize the table.
Following is the code for initializing the code.
DATA lo_nd_cn_try TYPE REF TO if_wd_context_node.
DATA lo_el_cn_try TYPE REF TO if_wd_context_element.
DATA ls_cn_try TYPE wd_this->element_cn_try.
DATA ls_cn_try1 TYPE wd_this->elements_cn_try.
navigate from <CONTEXT> to <CN_TRY> via lead selection
lo_nd_cn_try = wd_context->get_child_node( name = wd_this->wdctx_cn_try ).
do 5 times.
clear ls_cn_try.
append ls_cn_try to ls_cn_try1.
lo_nd_cn_try->bind_table( ls_cn_try1 ).
enddo.
Here cn_try is the node which is binded with the table.
For making more rows Editable run the above DO loop for more times.
e.g. if u want 10 rows editable then run the loop for 10 times.
Regards
Pankaj Aggarwal
Similar Messages
-
Unable to fetch database table from webdynpro application
Hello,
I have a Webdynpro application trying to fetch data from the database table. I have used the following code to get the connection to the database and execute the sql statement.
InitialContext dbInitContext = new InitialContext();
Properties sysProperties = System.getProperties();
String sysname = sysProperties.getProperty("SAPSYSTEMNAME");
String dbName = "jdbc/" + "SAP" + sysname + "DB";
DataSource dataSource = (DataSource) dbInitContext.lookup(dbName);
Connection conn = dataSource.getConnection();
String SelectStmt = "Select * from INV_CUSTOMER";
PreparedStatement stmt = conn.prepareStatement(SelectStmt);
ResultSet resultSet = stmt.executeQuery();
I logged into the database using user superdba in sqlcli, and created the table "INV_CUSTOMER". I am trying to run this application in my sneak preview java installation which comes with maxdb 7.6. But when I run the app, it always throws up the error:
The SQL statement "SELECT * FROM "INV_CUSTOMER"" contains the semantics error[s]: - 1:15 - the table or view >>INV_CUSTOMER<< does not exist
I am new to this concept, so any help would be appreciated.
Thanks,
Ajay>
Ajay Singh wrote:
> Hi Isaias,
>
> I created a dictionary project with the same structure, and used it in my app. Right now, everytime I run my app, the old data I entered is lost. I need to store data in the table, and reuse those records the next time I run the app. How do I do this?
> Another question I have is, I have created Database Tables inside Local Dictionary of my dictionary project. Does this create a table in the actual database?
> Forgive me, but I am new to this topic.
>
> Thanks,
> Ajay
Hi,
It seems to me like there is more than one issue here. Let me try and help you out with some details.
1.) If you have created the Dictionary project and the code in your original post is not giving you problems then it's good. However, the problem of the data disappearing from your Java Dictionary seems little bit wierd. You need to ensure that you are not running any "delete" command and ensure that the select statement (of it has and conditions) is correct.
2.) As far as where the tables actually reside: When you create the Dictionary tables in a Dictionary Project- this will actually create a script that will be run on the server that has an installed database (like Oracle, MSSQL Server or MaxDB, UDB). This means that the dictionary tables are just an abstraction of actual database tables.
In order to ensure that you are not deleting the data - debug your Web Dynpro Application or EJB so that you can go through it step by step and see whether all the database statements are correct. Sometimes you may not get an SQL error due to a NullPointer in the dynamic queries as well - so keep a check on that as well.
If you require a more detailed solution - please give us a small piece of code that we can analyse.
Hope that helps.
Thanks.,
p256960. -
Getting nullpointer Exception in Webdynpro application.
hi All,
I am getting one NullPointerException in the screen, .
This message is only coming only when the form is loading first time. So when i put the debugg statments to trace the error where it is coming, i come to know that it is coming before calling the init() method.
So when i click on the any of the button or firing the event in the screen, , i am not getting that error in the screen. Can u please tell me anybody , what would be the problem.s
for your reference i have added that screen shot in the in the following path. Please look at the same. It is production. i am not able to find the problem, could any body help to find what is the problem.
My Home > Web Dynpro Java > Main > Attachments
file name is > NullPointerException Easy.GIF
Is this error coming any of the life cycle methods creating internally by webdynpro framework.?
What is the lifecycle process of the webdynpro application.
Regards
VijayHi Luciano ,
thanks for the reply
I have put the debugg statments also in the component contoller and custom controller init methods.
After that when i run the application it is throwing the exception in the component controller inbetween init() and wdDoBeforeNavigation() methods.
For your reference i have attached screen shot in the following path. under wiki
My Home > Web Dynpro Java > Main > Attachments
Filename is > NullPointerException Easy1.GIF
Acutally i was not able to provide the stract trace bcz , when i went the log files i am not finding any exception or error.
Regards
Vijay -
Getting error while deploying WebDynpro Application.
Hi, There
After creating an application for a WebDynpro project, when I execute the project (Deploy New Archive and Run) the application I am receiving then following error message.
"This file does not have a program associated with it for performing this action. Create an association in folder options in control panel."
This message is reflacted for the following file.
"http://......../localhost/prjHello/AppHello?SAPtestId=5"
I am not getting what is the file type of AppHello.xxx file and which file type I have to associate with which program in control panel.
Please give me some idea on which file type I have to associate with which program?Hi Vikranth,
After creating an application for a WebDynpro project, when I execute the project (Deploy New Archive and Run) the application I am receiving then following error message.
"This file does not have a program associated with it for performing this action. Create an association in folder options in control panel."
I think previously u faced the same problem.
Please provide me solution.
Regards
Ravi -
How to create an editable table in webdynpro for ABAP? Help!
Hi Experts,
I have a requirement where I have to create a webdynpro for ABAP table for new row/rows entry, delete row/rows and update row/rows data. This is something like table control in normal ABAP.
how can I achieve this? Is there any such feature in ALV component?
Any code sample will be really helpfull.
Please help!
Thanks
GopalHi,
yes, the ALV is integrated into WDA, have a look at this: http://help.sap.com/saphelp_nw2004s/helpdata/en/74/fd4142646ab46be10000000a155106/frameset.htm
Regards, Heidi
PS: look at the WDA Knowledge Center under https://www.sdn.sap.com/irj/sdn/developerareas/abap?rid=/library/uuid/02e1fa45-0801-0010-10a0-f1cf47e8c943, there you can find several ALV tutorials
Message was edited by: Heidi von Geisau -
How to make a table input enabled, that is user should be able to enter data in the table just like a input field.
Thanks,
Pritam.For making a table editable, Use Input Field in the Table Column istead of TextView.
In the Wd doinit() method , write the following code to make table editable :
DATA lo_nd_cn_try TYPE REF TO if_wd_context_node.
DATA lo_el_cn_try TYPE REF TO if_wd_context_element.
DATA ls_cn_try TYPE wd_this->element_cn_try. <CN_TRY is my context Node>
DATA ls_cn_try1 TYPE wd_this->elements_cn_try.
<navigate from <CONTEXT> to <CN_TRY> via lead selection >
lo_nd_cn_try = wd_context->get_child_node( name = wd_this->wdctx_cn_try ).
do 5 times.
clear ls_cn_try.
append ls_cn_try to ls_cn_try1.
lo_nd_cn_try->bind_table( ls_cn_try1 ).
enddo.
Here , your 5 rows will be in editable mode. You can change it as per your requirement.
Refer this Thread : Getting Editable Table in Webdynpro Applications
editing a table
Thanks.
Saurav. -
Editing Standard ESS Travel Abap Webdynpro Application
Hi All,
We used to edit ESS Java webdynpro applications by taking a copy of the standard application
with the help of Track created in Enterprise Portal.
Now we have switched Travel Application from Java Webdynpro to Abap Webdynpro.
and there is a requirement come up which requires the modification of standard WDA Application
for Travel Request.
Please let me know the procedure.
Can we take the copy of that Entire package and do the necessary changes in the copied Application
or can we proceed by editing the standard code ?
If we are taking the copy of the Entire package does the configuration will affect on copied Application?
Warm Regards
Hari Sankar MHi Hari Sankar,
I have done this in my last project. You can enhance the WD Component only if you are adding functionality. Be careful to find the right component and methods. You usually do not make the change on the application itself.
If you want to tweak what the standard code does, that is a modification. If that, then I would advise you look into the configuration capabilities and the personalization if that meets the requirement.
Copying the component is going to be very hard. I would definitely not get into that at all costs since the Travel WDA uses the FPM framework as well. The links between the components are very complicated to simply copy and edit the z compoenent. It does not work like that.
Another thing: The specific challenge for the travel request is that the component you will need to change is being shared by the Expense report. It is the general data visual component. Be careful with that as you will have to differentiate in the code that you are calling it for the travel request. -
Access Dictionary Tables in Webdynpro
Hi
I have created a database table in Dictionary Perspective.
Also i have created a dc for webdynpro. I need to access the data and insert the data in the database tables from webdynpro application.
How can i do that. Pls help.
Regards
Sonal ManglaHi Sonal,
Check this
<a href="http://help.sap.com/saphelp_nw70/helpdata/en/69/f9bc3d52f39d33e10000000a11405a/frameset.htm">http://help.sap.com/saphelp_nw70/helpdata/en/69/f9bc3d52f39d33e10000000a11405a/frameset.htm</a>
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ded11778-0801-0010-258f-ac3b9408a194">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ded11778-0801-0010-258f-ac3b9408a194</a>
regards
Sumit -
Table as Input parameter for BAPI in Webdynpro Application
I am creating webdynpro JAVA application to create RFQ, for which ABAP guy written a Custom BAPI called Z_BAPI_INQUIRY_CREATE. I tested this BAPI in SAPGUI it is working fine. From my webdynpro application when I passes header and item parameter, my header getting inserted but my item data is not. It is giving me error like "Table input parameter not found". I am passing table to this bapi. When I tried my code to standard BAPI's (NOT CUSTOM), I am able to insert both HEADER and ITEM data.
In above scenario I have few questions,
1. Is there anything extra we have to do with custom BAPI's? (my BAPIs are in BOR).
2. What is the datatype in webdynpro parallal to table parameter?
3. is there any tutorial available for table parameter? (except FLIGHT examle).
Thanks and regards,
NitinHi Vijayakhanna Raman,
Thanks much for your reply.
Yes I did the same as you mentioned, but still I am getting an error "Table parameter not avaliable is empty".
I am not getting were is the bug. And this is happening only with ZBapi's not with Standard Bapi's.
I am really stucted becouse of this, answer will really get all 10 points.
Here is my code,
1. First create an instance for bapi and bind the instance to the bapi node.
Z_Bapi_Inquiry_Change_Input input = new Z_Bapi_Inquiry_Change_Input();
Zbapirfqitem item =new Zbapirfqitem();
wdContext.nodeBapi_RFQ_OnHold_Update_Input().bind(input);
2. Then if u have the import parameter u have to set them by using
input.setRfq_Number("6");
input.setCreated_By("NLNS0000");
//wdContext.currentBapi_RFQ_OnHold_Update_InputElement().modelObject().setRfq_Number("6");
//wdContext.currentBapi_RFQ_OnHold_Update_InputElement().modelObject().setCreated_By("NLNS0000");
3. If the bapi has a table parameters then the structure for the table parameters will also be imported In the model class.
DONE!
4. Set the table parameters by creating the instance for that structure and using this instance set it.
item.setUpdateflag("I");
item.setItm_Number("000030");
item.setMaterial("MAT-NITIN");
item.setMatl_Desc("Inserted by Nitin");
item.setQuantity(new BigDecimal(4));
item.setBase_Uom("PCE");
item.setReq_Qty(new BigDecimal(4));
item.setBase_Uom1("PCE");
item.setList_Price(new BigDecimal(3));
item.setList_Curr("");
item.setReq_Price(new BigDecimal(4));
item.setCurrency("EUR");
item.setIndirect_Price(new BigDecimal(4));
item.setCurrency_2("EUR");
item.setFinal_Price(new BigDecimal(4));
item.setCurrency_3("EUR");
item.setText_Line("");
item.setReq_Date_H(new Date(12-05-06));
item.setDirect_Dis(new BigDecimal(4));
item.setIndirect_Dis(new BigDecimal(4));
item.setFinal_Dis(new BigDecimal(4));
item.setProfit_Margin1(new BigDecimal(4));
item.setProfit_Margin2(new BigDecimal(4));
item.setBrand1("");
item.setModel1("");
item.setVal_Loccurr1(new BigDecimal(4));
item.setCurrency1("");
item.setBrand2("");
item.setModel2("");
item.setVal_Loccurr2(new BigDecimal(4));
item.setCurrency2("");
5. Then add the structure instance to the bapi instance.
input.addItem(item);
6. Then Execute the bapi after setting the import parameters.
//wdThis.wdGetContext().currentBapi_RFQ_OnHold_Update_InputElement().modelObject().execute();
input.execute();
Message was edited by: Nitin Kamble -
To get login details of portal into webdynpro application
Hi All,
How to get the portal login details(user name) into my webdynpro application.
Thank you,
Harsha P.Hi,
If you want to have portal login details from backend system (with ABAP) you should ask this question in some portal forum and ask if it is possible. This has nothing to do with workflow or UWL. Even if you get the portal user ID to the backend system, then what? Do you want to manipulate the portal roles etc. from your ABAP WD application? Then you will have even more complicated requirements to achieve with ABAP. It is not that straightforward to call different portal functionalities from backend system. You might need to do some "portal development". And eventually your ABAP WD application might come just an unnecessary wrapper component for calling some web services or whatever in portal.
Regards,
Karri -
How To Get GP Process Parameters in a Webdynpro Application runtime
Hi ,
Iu2019 ll hope you can help me to solve my problem with GP process.
Iu2019 m trying to get GP process parameters from a Webdynpro application.
I have to get parameters during the process runtime in every step of the process using
a webdynpro application with the following code:
IGPRuntimeManager rtm = GPProcessFactory.getRuntimeManager();
try {
IGPProcessInstance processInst = rtm.getProcessInstance(processId,userContext);
IGPProcessInstanceInfo procInfo = rtm.getProcessInstanceInformation(processInst.getID(),
userContext.getSAPUser());
IGPStructureInfo inputstructInfo = processInst.getTemplate().getInputParameters();
IGPStructure inputparams = GPStructureFactory.getStructure(inputstructInfo);
} catch (GPEngineException e) {
// TODO Auto-generated catch block
// e.printStackTrace();
manager.reportException("GPEngineException:"+getStackTrace(e), false);
} catch (GPInvocationException e) {
// TODO Auto-generated catch block
// e.printStackTrace();
manager.reportException("GPInvocationException:"+getStackTrace(e), false);
But printing the values of attributes with u201Cinputparams.getAttributeAs... ("param name")u201C the value returned is always 0. On the contrary if I check the same parameters structure in the runtime
GP view of the portal, the values are those that I have set in the start process wizard.
Have you a solution for this question?
Thanks in advance
Lucahi Abhimanyu
I believe originally access to session was deliberately not made available inside WDA.
Growing security concerns due to misuse of session information and
perhaps other reasons as well.
X.509 is considered a better approach.
This may not help you in your problem.
But you may see a trend in WDA pushing more robust and client independent
approaches.
Full x.509 access should remove the need for session fiddling.
Also when developers access such session info directly, there is a possiblity
when they dont understand the technology exactly that they create a security hole.
You may know how to do safely, it is however discouraged.
Im not aware of a way to get at the session info inside the WDA framework.
Well not without a mod to the framework.
It may be possible without a mod, but I dont know the trick.
If someone has a little trick... please post.
You may need to use BSP, if your only solution requires access to the session info.
regards
Phil -
How to get Request/Session objects in a Webdynpro application
Hi
I am working in Enterprise Portal 7.0.
in one of the iViews which displays a JSP page, i have set a parameter in request and session objects.
How can i get it in my Webdynpro ABAP Application?
Thanks & Regards
Abhimanyu Lhi Abhimanyu
I believe originally access to session was deliberately not made available inside WDA.
Growing security concerns due to misuse of session information and
perhaps other reasons as well.
X.509 is considered a better approach.
This may not help you in your problem.
But you may see a trend in WDA pushing more robust and client independent
approaches.
Full x.509 access should remove the need for session fiddling.
Also when developers access such session info directly, there is a possiblity
when they dont understand the technology exactly that they create a security hole.
You may know how to do safely, it is however discouraged.
Im not aware of a way to get at the session info inside the WDA framework.
Well not without a mod to the framework.
It may be possible without a mod, but I dont know the trick.
If someone has a little trick... please post.
You may need to use BSP, if your only solution requires access to the session info.
regards
Phil -
Creation of tables using JDBC or SQLJ in webdynpro application
Hi,
I am trying to create tables in javadictionary(MaxDB)using my WebDynpro application.I tried creating tables using SQLJ and JDBC.But I was not able to do it.I can select and insert data into already created tables.
Whwn I tried creating a table using JDBC I encountered the following exception.
com.sap.sql.log.OpenSQLException: The SQL statement "CREATE TABLE TMP_DEPID (DEPID varchar(10) NOT NULL,DEPNAME VARCHAR(25))" contains the syntax error[s]: Open SQL syntax error: CREATE ... TABLE is not supported
SQL syntax error: "VARCHAR" is a reserved keyword and cannot be used as an unquoted identifier
Does this mean that creating tables is not supported?
Can anyone help me in this matter?
Thanks in advance,
regards
~Pradeep ShettyHi Pradeep,
Yes, OpenSQL does not support creation of tables. But why would you need to create tables at runtime?! The natural way is to create the model at design time of your application, i.e. with the Java DataDictionary.
However, if for any reason you really need to create database tables at runtime, you can achieve this by using a non-OpenSQL datasource, e.g. you could create a VendorSQL one and use it to obtain JDBC connections in your app. See also http://help.sap.com/saphelp_nw04/helpdata/en/c0/3ad4d5cdc66447a188b582aad537d3/frameset.htm.
Hope that helps!
Vladimir -
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
Maybe you are looking for
-
How do I get SWF files to open in Flash Player?
Currently they have no program associated to the extension. When I try 'Open With...' I cannot find Flash Player at all and opening in IE causes a loop between opening an IE window and the 'Open File, Save File, ect' window. I'm currently running Win
-
Cant connect Iphone/ipad to E1500 help!
i got my ps3 & xbox to connect it was easy but when i go to connect my iphone it doesnt even let me put my password in it just says"cant connect"? PLEASE HELP.
-
How do i change or hide the dialogue box that pops when i mouse over a link?
i'm using adobe acrobat standard. i'm editing a document and adding links into the PDF to my website. i prefer only to show the "hand/pointer" when you mouse over the link. is there a way to: a. hide the dialogue that pops up when you mouse over a li
-
SQL DEVELOPER cut and paste does not work, slow and cannot work fast.
I have lots of difficulties using SQL Developer, the cut/paste does not work properly, when I type search in he code editor it just paste or type the test in the source code not in the serach box. Very hectic I'm pallning to swicth to TOAD until they
-
How to process only certain subtype through ALE?
Hi All, I need to process IT0009 only for subtype 0 and i dont need any other subtype to come across. Please help to guide. Thanks.