cancel
Showing results for 
Search instead for 
Did you mean: 

I am getting only one record from table data

former_member188831
Contributor
0 Kudos

Hi Experts,

I am using interacive forms to bring the table data i used GET_STATIC_ATTRIBUTES_TABLE

method. initially the table is empty when i fill some records more than one it is giving me only one record.

where as i fill the table in wddoinit more than one record and try to retreived it, showing all the records more than one. waht is the reason.. if i fill manually why it is not bringing all the reocrds.

i have used the cardinatly as follows

1. parent node(no tables/structure used)

Dictionary structure empty not used

Cardinality 1..1

Selection 0..1

Initialization Lead Selection Checked

Singleton Not checked

Supply Function not used

2. table node(i used table type)

Dictionary structure SFLIGHT_LIGHT

Cardinality 1..n

Selection 0..n

Initialization Lead Selection Checked

Singleton Not checked

Supply Function not used

Pleae help me out...

Thanks,

Mahesh.Gattu

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member188831
Contributor
0 Kudos

By taking a dummy colun and bind the table with the no.of rows required to be open in input mode.

Former Member
0 Kudos

hi,

Use the following code for making the rows editable for a table UI element.

.

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.

-> cn_try is the node which is binded with the Table UI element.

What all this is called as initialization of table. This code will make 5 rows editable, If u want more rows editable then run the loop according to the requirement.

U can write this code in the WDDOINIT.

Thanks,

Pankaj Aggarwal.

former_member188831
Contributor
0 Kudos

Hi Pankaj,

Thanks for your reply, i have done the same way took one dummy column like slno and added the count and bind the table.

But i expected that table will open in input mode if we are not checking the readonly attribute.

Thanks,

Mahesh.Gattu

Former Member
0 Kudos

Hi

before getting the table data, call method GET_ELEMENT_COUNT of interface if_wd_context_node just to check if you have multiple elements in your context node. the result should be more than 1.

if you are getting more than 1 elements then other way out to get data is:

call method GET_ELEMENTS. and pass 1 to FROM and value received above in TO .

loop on to the table of elements and call method get_static_attribute inside the loop.

append returned data into ur final internal table

If u are getting 1 element then issue is while uploading the data.

above said is just a workaround. ideally ur solution should work fine.

Thanks

Vishal Kapoor

former_member188831
Contributor
0 Kudos

i am trying with a table on wd view instead of pdf.

but the table is allowed me to input only first row...

the next rows are in display only why...

Thanks,

Mahesh

Former Member
0 Kudos

in the table uielement, is the property read only is checked, if yes then uncheck it.