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

Table Control

Former Member
0 Likes
695

My data from the top of the table control are disappearing when i press the horizontal scroll down.

Can someone help me?

1 ACCEPTED SOLUTION
Read only

sarbajitm
Contributor
0 Likes
669

Whenever you carry on a scrollbar movement(horizontal/vertical) ,the PBO of the respective screen get executed followed by a PAI execution.So check your code setting proper breakpoint at PBO module.

Thanks

6 REPLIES 6
Read only

Former Member
0 Likes
669

You might have written some code for scroll bar, please check that once by mistake if you are doing something or Check in the properties of table control

Read only

sarbajitm
Contributor
0 Likes
670

Whenever you carry on a scrollbar movement(horizontal/vertical) ,the PBO of the respective screen get executed followed by a PAI execution.So check your code setting proper breakpoint at PBO module.

Thanks

Read only

Former Member
0 Likes
669

Now check the PBO and PAI and i have not seen anything. There must be some code to this.

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
669

Hi

All you need to dos is to read the internal table into the table control in PBO of the screen.

Refer the below code:-

In PBO, you read internal table to table control on screen.

In PAI, you modify internal table from the table control on screen.

it_zekpo is my internal table w/o header line,

wa_zekpo is work area.

Name of input/output fields on screen are:-

wa_zekpo-field1,

wa_zekpo-field2, and so on...

Use code:-

At screen logic:-


PROCESS BEFORE OUTPUT.
*  MODULE status_8003.
 
  LOOP WITH CONTROL po_tab. "po_tab is table control on screen 8003
    MODULE read_data.
  ENDLOOP.
 
PROCESS AFTER INPUT.
*  MODULE user_command_8003.
 
  LOOP WITH CONTROL po_tab.
    MODULE modify_data.
  ENDLOOP.

In PBO:-


*&---------------------------------------------------------------------*
*&      Module  READ_DATA  OUTPUT
*&---------------------------------------------------------------------*
MODULE read_data OUTPUT.
  READ TABLE it_zekpo INTO wa_zekpo INDEX po_tab-current_line. "po_tab is table control name
  " read the record from internal table to table control
  data : line_count type i.
 
  describe it_zekpo
  lines line_count.
 
  po_tab-lines = line_count + 10.
  "to increase the number of lines in table control dynamically
 
ENDMODULE.                 " READ_DATA  OUTPUT

In PAI:-


*&---------------------------------------------------------------------*
*&      Module  MODIFY_DATA  INPUT
*&---------------------------------------------------------------------*
MODULE MODIFY_DATA INPUT.
  MODIFY IT_ZEKPO FROM WA_ZEKPO INDEX po_tab-currentline.
  "this will modify the contents of existing line
ENDMODULE.                 " MODIFY_DATA  INPUT

Hope this solves your problem.

Thanks & Regards,

Tarun Gambhir

Read only

Former Member
0 Likes
669

hello carlos,

kindly check the case,where u have written the code for table control data or scroll bar.

It is always good to use table control wizard,bcz there is one option for scroll bar in wizard.

Regards

Read only

Former Member
0 Likes
669

create a module and write down the code :

DESCRIBE TABLE it_table LINES tabcntrl-lines.

Note: don't put the module in the loop and place it in such a way that before executing this statement it_table should be filledup with the data.

regards,

Nilay