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 Problem in Module Pool

Former Member
0 Likes
890

Hi All,

Iam facing a problem with table control in Module Pool.

For Example: If i have 10 records in ITAB and my table control can display 5 records at a time , remaining records we can see by scrolling the vertical scroll bar of table control.

But when i scroll the vertical scroll bar of table control, the data inside the table control is not scrolling i mean the first 5 records can only able to see though if i scroll the table control.....

Please tell me how to rectify this..

Many Thanks in Advnace........

7 REPLIES 7
Read only

Former Member
0 Likes
851

Hi Easwar,

Please ensure that your itab contains 10 records.

Then in PBO

before the loop at itab with control tc.

endloop.

you must have a standard module.

in that module

describe table itab lines tc-lines.

regards

Ramchander Rao.K

Read only

Former Member
0 Likes
851

hi,

use this in PBO

tabdata ->table control name

tabcounter is the integer variable.

it_det is the internal table name

TABDATA-CURRENT_LINE = 1.

DESCRIBE TABLE IT_DET LINES TABCOUNTER.

IF TABCOUNTER = 0.

TABDATA-LINES = 100.

ELSE.

TABDATA-LINES = TABCOUNTER + 18.

ENDIF.

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
851

Hi Eeshwar Baddam,

If your internal table consists more records than the number of rows displayed in the table control on the screen.

The in the PBO of screen (in which you are displaying data in the table control), write this code:-

*****************************************PBO OF SCREEN 8001************************************************

MODULE STATUS_8001 OUTPUT.

SET PF-STATUS 'Z_TABCT'.

DATA : LINE_COUNT TYPE I.

DESCRIBE TABLE MOVIE_TAB "(MOVIE_TAB is the internal table)

LINES LINE_COUNT.

MOVIE-LINES = LINE_COUNT + 5. "(MOVIE is name of table control)

*increment the number of lines of the table control so that if you scroll the tabLe control, then you can

*see all the records.

ENDMODULE. " STATUS_8001 OUTPUT

************************************************************************************************************************

Hope this solve your problem.

Regards.

Tarun Gambhir.

Read only

Former Member
0 Likes
851

In PBO before LOOP and ENDLOOP

MODULE SCROLL.

" Write following code

DESCRIBE TABLE ITAB LINES TC-LINES. "where ITAB is internal table being displayed in table control name TC

Read only

Former Member
0 Likes
851

Hi,

try this code for enabling vertical scroll for your table control.

Select PBO module status & click on that.

Just you write a code after normal code as:

tablecontrolname-LINES = SY-DBCNT.(this will enable the table control vertical scroll bar.)

Normal code before above statement is(for eg.),

MOVE WA-EBELN TO EKKO-EBELN.

MOVE WA-AEDAT TO EKKO-AEDAT.

Regards,

BBR.

Read only

Former Member
0 Likes
851

Hi ,

Do the following things in your PBO and PAI event of screen .

PROCESS BEFORE OUTPUT.

module call_screen .

Module LINES .

LOOP AT IT_CIVIL WITH CONTROL TCvLAB CURSOR

TCvLAB-CURRENT_LINE .

ENDLOOP .

PROCESS AFTER INPUT.

chain .

field IT_CIVIL-CIVILIND .

field IT_CIVIL-NAME_TEXT1 .

field IT_CIVIL-SUBCONT1 .

field IT_CIVIL-NAME_TEXT2 .

field IT_CIVIL-SUNCONT2 .

module modify_civil_DATA .

endchain .

*****************************************************

modules :

IN PBO

MODULE LINE OUTPUT .

DESCRIBE TABLE IT_CIVIL LINES LIN .

TCvLAB-LINES = LIN .

ENDMODULE .

IN PAI :

MODULE MODIFY_CIVIL_DATA INPUT.

clear : wa_civ .

move-corresponding it_civil to wa_civ .

read table it_civil index 1 .

if sy-subrc = 0 .

modify it_civil index 1 from wa_civ .

else .

append it_civil .

clear : it_civil .

endif .

******************************

YOUR PROB WILL SOLVED .

PLEASE REWARDS IF SATISFIED .

REGARD'S

NILESH JAIN

Read only

Former Member
0 Likes
851

Find the no of lines in your internal table using DESCRIBE TABLE itab LINES gv_lines.

Then in PBO, write

tc-lines = gv_lines.

where tc is your table control.

regards,

Jinson