Application Development 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: 

Question on table control

Former Member
0 Kudos

Hi Experts,

I have created a table control having 10 lines in it using screen painter.

the purpose of this table control is to get data from user and store that data in Database Table.

For Eg., if the user wants to add 15 rows into it..then how can the no of rows in table control increased? ANy option available?

Regars,

Greeshma

9 REPLIES 9

former_member183607
Contributor
0 Kudos

Hi,

     Their is a property in table control LINES

U can use (TBL_CNTRL is name of table control)

TBL_CNTRL-LINES = TBL_CNTRL-LINES + 15 (NO OF LINES TO BE ADDED)

Use this in PBO Module

     Update current value of LINES by using any variable like

    

     Describe table <itab> lines TBL_CNTRL-LINES or TBL_CNTRL-LINES = TBL_CNTRL-LINES + <any variable>

     and Refresh table display using REFRESH CONTROL <name> using <screen no>

    

  Regards:

Somendra 

Former Member
0 Kudos

Hi Greeshma,

As per my understanding u want to increase the size of table control..so for that

you have do it in PBO part of module programming

in PBO

Module Set_status.

          tc-lines = 15.

(here tc is name of table control)

hope it helps.

regards,

vikas

Former Member
0 Kudos

Dear Greeshma,

You can do it so easy!

Just Buld an empty Work Area,

Append it 15 times to your internal table that is for your table control

Then you will have a Table conterol with 15 empty lines!

Regards

Farzin

0 Kudos

Thank you for the replies.

Actually, the no of rows which can be dynamic. It can be 20 or either any no. Is there any option to dynamically add the no of rows?

0 Kudos

Hi Greeshma,

yes dynamic its also possible,

for that you have to describe the internal table first and based on that you have to assign.

eg.

in PBO part

describe table itab lines line.

tc-lines = Line.

hope it helps.

regards,

vikas

0 Kudos

Hi Greeshma,

You can use page down option given by SAP. You can check the table control with wizard there the code will be generated automatically.

Thanks,

Govind

thangam_perumal
Contributor
0 Kudos

Hi,

     as per Govind suggestion you can use Table control for Wizard.. it will generate coding for insert,remove,select all,deselect all, Scrolling etc..

Regards,

   Thangam.P

0 Kudos

Hi I am not using table wizard. currently the table is scrollable but when I am entering value for 11th row then it is clearing the first record and accordingly.. I am not able to solve this issue.

Thank for ur replies. Please suggest me how can I overcome this?

0 Kudos

because your always changing row 1 at the moment even if you think its 11 - you need to update the current row in your table control processing

pbo

  loop at   g_tc_bu_names_itab
       into g_tc_bu_names_wa
       with control tc_bu_names
       cursor tc_bu_names-current_line.

      g_tc_bu_names_lines = sy-loopc.

   endloop.

pai

loop at   g_tc_bu_names_itab.

" do some pai processing etc then do your modify when ready...

  modify g_tc_bu_names_itab
    from g_tc_bu_names_wa
    index tc_bu_names-current_line.

   endloop.