cancel
Showing results for 
Search instead for 
Did you mean: 

Table is not enable mode

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Thanks

Former Member
0 Kudos

Hi Kodalivenu,

Check the enable property of Table is set to true or not.By default it is true.

Regards,

Jhansi

monalisa_biswal
Contributor
0 Kudos

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);

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi,

Assuming there is data..

Invalidate the output node.

wdContext.node<bapi output node name>().invalidate();

Former Member
0 Kudos

Hi All

Table enable property is true.

I already written this below code .

wdContext.nodeOutput().invalidate();

Is there any other way to correct this. please help me. As this is very urgent.

Thanks

Venu

Former Member
0 Kudos

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

Former Member
0 Kudos

Can u print the size of output nodebefore invalidate() in custom controller by

wdComponentAPI().getMessageManager().reportSuccess("SIZE OF O/P IS "+wdContext.nodeOutput().size());

Regards

Fahad Hamsa

Former Member
0 Kudos

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

Former Member
0 Kudos

WoW so u finally made it. Congrats

Former Member
0 Kudos

Hi

Make your context node cardinality as 1..n.

Regards

Suresh

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi All

I heve already done the steps specified by both of you but still table is in disable mode.Do i need to set any other properties to make it enable.

Thanks

Venu

Former Member
0 Kudos

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

Former Member
0 Kudos

hai,

have you binded textedit property to any context variable?

reagrds,

naga raju

Former Member
0 Kudos

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

Former Member
0 Kudos

Make sure the JCO Connection is working fine

Did you tested your JCO in WebDynpro Content Administrator ? First make sure you Ping and Test the JCO Connection.

Regards,

Amol

Former Member
0 Kudos

Yes, JCO Connection is ok.

Thanks

Venu

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Just give it a try, am not very sure if this is causing any problem but catch need to have following.

catch(Exception e) {

e.printStackTrace();

}

Former Member
0 Kudos

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