cancel
Showing results for 
Search instead for 
Did you mean: 

table input entry format

Former Member
0 Kudos

hi,

i have a requirement like there would be a table that contains the checkboxes in the rows. but when i go for a table and do the same and bind the individual checkboxes individually i am unable to do so. i am able to bind only to the first row of the table.

pls help me out to bind the checkboxes individually with the individual boolean values.

my requirement is like the one shown below.and the text will be in one column and the checkbox will be in another column. since i was not able to draw it like a table i have done this.

Employee no. Permanent emp. Contract emp. Salary>1000

One Checkbox Checkbox Checkbox

Two Checkbox Checkbox Checkbox

Three Checkbox Checkbox Checkbox

pls try to analyse the requirement and give me a solution to bing the checkboxes individually with the context nodes that i define as the boolean values for the individual checkboxes.

regards

ibrahim.md

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Ibrahim,

First of all you need a context node e.g. NODE_EMP with four attributes. It will be something similar to

NODE_EMP

|__EMPNO

|__PERMANENT

|__CONTRACT

|__SAL_GT_1000

Note that the last three attributes should have the type wdy_boolean.

Now, create a Table UI Element, with the dataSource bound to NODE_EMP. In that have four columns. The cell-editor of first column should be a TextView, bound to attribute EMPNO. The cell-editors of the next three columns should be CheckBox, with checked property bound to the last three attributes in NODE_EMP respectively.

You can achieve the same by using the Wizard on the View Layout, then selecting Table UI Element, having the Context as NODE_EMP and then for the last three attributes, just change the 'Cell Editor of Column' to CheckBox.

Hope this helps.

Regards,

Neha

Former Member
0 Kudos

hi neha,

thank you for your reply. my requirement is not exactly the same as you think.

pls go through with the transaction CC31 there give the change type as 001 or 002 and press enter, in the next screen give the description and change status as 01 or 02 and then press the button object types there you get the table like thing that i was asking for in which we have so many checkboxes individually bound to the individual boolean attributes like things.

pls go through the example transaction that i mentioned and then suggest me.

regards,

ibrahim

Former Member
0 Kudos

Hi Ibrahim,

I got what you need. This can be done exactly as I suggested.

Just have your node like NODE_ECR and the other inside it attributes.

Now you need to create all the elements corresponding to the rows of the table (In the transaction, I see 10 rows - Bill of Material, Task List etc.) The element should have the decsription field filled in. You can do that very easily using a supply function for your node NODE_ECR.

Now since you have inserted 10 elements in the node, you will see 10 rows with check boxes in all the columns. You do not have to bind each cell individually. To find out the value in 3rd row, 7th column (Document,LOCK), just find out the 3rd element (using method get_element and passing index as 3), then find out the attribute LOCK (using method get_static_attributes and passing name as 'LOCK'). This will give you the required value.

There's however only one restriction. You cannot choose to display check boxes in some rows and no checkboxes in some other rows (like in the column Object).

Hope this helps.

Regards,

Neha

S-H
Active Participant
0 Kudos

Hi ibrahim,

In CC31 some of the columns have the checkbox and some of the columns does not have the checkbox. I have also observed that some of the checkboxes are read only and some are editable.

If want to achive such a requirement then, for the table control cell editor(for checkbox) set the read only and visibility property to a node context and set the context based on the requiremenrt.

For that declare the read only and visibility context attributes in the context.

Context

|_NODE_EMP (cardinality 0..n or 1..n)

|__EMPNO

|__PERMANENT

|__CONTRACT

|__PERMANENT_visibility

|__CONTRACT_visibility

|__PERMANENT_read_only

|__CONTRACT_read_only

In table, associate the read only and visibility propererties to the Cell Edittrot like checkbox.

During the init method where you populate the data to the table set the visibility and read only data for each record.

The logic is that we will also have the read only and visibility properties in the context as the table content (for each row).

Best regards,

Suresh

S-H
Active Participant
0 Kudos

Hi Ibrahim,

As per your description, i understand that you are able to achieve the (checkboxes for the columns) in one row.

In table control when we create the column (Cell Edit) as checkbox by default all the rows will be of same UI element for the same column. But we need to have the records/elements must be present in the context to see the UI elements.

Create the blank records or have the create row button on the table and associate an element to the context when you click on this button.

Hope this helps.

Best regards,

Suresh