on 01-16-2007 4:08 AM
Hi Gurus,
I am creating a webdynpro in that I created a couple of tables when I am running the application it is indisable mode. I want it to be in enable mode to enter some data. Please help me as this is very urgent.
Thanks
Venu
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kodalivenu,
Check the enable property of Table is set to true or not.By default it is true.
Regards,
Jhansi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unless u add elements to the context node ur table fields wont enabled for input.
Bind table source to a context node.
Bind value property of input field (table column cell editor) to a value attribute inside the node.
Create and add elements to the context node.
IPrivate<ViewName>.I<context node name>Element e=wdContext.node<context node name>().create<context node name>Element();
wdContext.node<context node name>().addElement(e);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I completed these 3 steps
1)Unless u add elements to the context node ur table fields wont enabled for input.
2)Bind table source to a context node.
3)Bind value property of input field (table column cell editor) to a value attribute inside the node.
Unable to get this below one. Can u explain me?
IPrivate<ViewName>.I<context node name>Element e=wdContext.node<context node name>().create<context node name>Element();
wdContext.node<context node name>().addElement(e);
Thanks
Venu
Hi Venu,
Fiest check the table bibding oce again.I mean in your case you want to enter some data in the table and then after clicking on "Save" button it should excute the BAPI.So you should bind the input node to the table.
Try to set some attributes on the input node.
Ztc_Rfc_Save_Input input = new Ztc_Rfc_Save_Input();
input.setXXX("");
input.setYYY("");
wdContext.nodeZtc_Rfc_Save_Input().bind(input);
Now when you run the application you should able to see a row with above data.
Regards, Anilkumar
Hi All,
Finally i got it. I added below code in Custom Control wdDoInit
input.addIt_Acc(new Zsm_Tcacc());
input.addIt_Con(new Zsm_Tccon());
input.addIt_Da(new Zsm_Tcda());
input.addIt_Exp(new Zsm_Tcexp());
input.addIt_Misc(new Zsm_Tcmisc());
// For Displaying input field in table we have to use addIt_<table name>.
// For structure then use setit_<table Name>
Thank u everybody in helping me a lot.
Thanks
Venu
Hi
Make your context node cardinality as 1..n.
Regards
Suresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hai venu,
Make the table cells to textedit from text views.
open the view and select lay out tab, goto out line expand your table. expand you tble column delete the cell editor. and right click and select add table cell editor the choose textedit . the you can modify whatever you.
other wise when you binding your data to table you can chenge the cell editor proprty over there.
regards,
Naga Raju
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Venu,
Please check if the Cardinality of the context node is set to 0..n and the singleton proprerty is set to True.
If your Table UI Element is properly mapped with the considered context then atleast it should show you a blank but active table with the default 5 rows.
If you can briefly explain the procedure you followed then it would be easy for us to tell what step you actually missing.
Regards,
Amol
Hi
Actually this is a travel Claim Form in which we have tables like expenses, accommodation, Conveyance and so on. Now we have to enter data in these tables and press the save button then it will store in database table. I created a RFC for this.
Model is created
custom controller is created
Binding is done for model
Context mapping is done for View
I did table binding.
Cardinality: 0..n
Singleton: True
Selection: 0..1
Thanks
Venu
Hi KodaliVenu,
I will explain u with an example.
Let ur view name be ' MyView '
Let ur table have 2 columns: First Name and Last Name
Let ur Context node be ' Root ' (cardinality 0..N) and ' firstname ' and ' lastname ' be two attributes of type string under ' Root'.
Do the following
1. Create a table with two columns, each column with tablecele editor as InputField
2. Bind the DataSource property of table with node ' Root '
3. Bind fistname input field with context variable ' firstname '
4. Bind lastname input field with context variable ' lastname '
5. in wdDoIni(), do the following
IPrivateMyview.IRootNode root=wdContext.nodeRoot();
IPrivateMyview.IRootElement rootEl;
for(int i=0;i<5;i++)
{
rootEl=root.createRootElement();
root.addElement(rootEl);
}
The above code will create 5 rows in table, with two columns, which willl be editable
Till now every thing seems okay, the only thing we haven't yet discussed is the method and the code inside component controller.
So make sure the method "callBAPI" has the basic code and also the wdDoInit() is properly calling this method.
If you have already done this, please let us know, then we will look for some other possible causes.
Amol
Hi
By default it has to come for single row later on we have to write for increment code. The below code i used in Controller
Controller
//@@begin wdDoInit()
Ztc_Rfc_Save_Input input = new Ztc_Rfc_Save_Input();
wdContext.nodeZtc_Rfc_Save_Input().bind(input);
//@@end
//@@begin javadoc:executeZ_RFC_SAVE()
/** Declared method. */
//@@end
public void executeZ_RFC_SAVE( )
{
//@@begin executeZ_RFC_SAVE()
try {
wdContext.currentZtc_Rfc_Save_InputElement().modelObject().execute();
}
catch(Exception e) {
}
//@@end
View Code
//@@begin onActionSave(ServerEvent)
wdThis.wdGetTravelClaimControllerController().executeZ_RFC_SAVE();
//@@end
Hi Venu,
First of all you need to create a Context in the Component Controller and then needs to map it with the considered View in which you want to show the Table data.
You also have to specify the data file or a backend database from where you want to retrieve data to the table.
This is a step by step procedure to create a Table with data.
please follow the tutorial/example <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/bad3e990-0201-0010-3985-fa0936d901b4">working with Tables in Web Dynpro</a>
Happy Learning
Regards,
Amol
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.