Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Generate no from sequence in table control

Former Member
0 Likes
386

Hi,

I have a table control which contains some columns.One of the columns is of Sequence no.The requirement is that when the user enters the data in one row and presses enter , next no should generate itself in the sequence column.Suppose he has entered 1 in the first row of the column sequence No. and presses enter 2 should appear in the next row.Please suggest the solution.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
365

Hi.

Is your hope this?

*PBO.

loop at it_data .....

.....

endloop.

*PAI.

case okcode.

when 'enter'.

v_cnt = lines( it_data ).

read table it_data into wa_data index v_cnt.

if not wa_data-data is initial.

clear wa_data.

wa_data-cnt = v_cnt + 1.

append wa_data to it_data.

endif.

when 'back'.

when others.

endcase.

Hi,

I have a table control which contains some columns.One of the columns is of Sequence no.The requirement is that when the user enters the data in one row and presses enter , next no should generate itself in the sequence column.Suppose he has entered 1 in the first row of the column sequence No. and presses enter 2 should appear in the next row.Please suggest the solution.

1 REPLY 1
Read only

Former Member
0 Likes
366

Hi.

Is your hope this?

*PBO.

loop at it_data .....

.....

endloop.

*PAI.

case okcode.

when 'enter'.

v_cnt = lines( it_data ).

read table it_data into wa_data index v_cnt.

if not wa_data-data is initial.

clear wa_data.

wa_data-cnt = v_cnt + 1.

append wa_data to it_data.

endif.

when 'back'.

when others.

endcase.