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 CONTROLS IN MODULE POOL PROGRAM

Former Member
0 Likes
577

Hi All.

I am fasing an issue in module pool programming.

I designed a screen(0100).In that one I created a table control with name TC,for 5 fields from the program internal table.

while executing ,I want to give input to the table control.In that one only 8 records are showing.So i am able to give 8 records as input.

Actually I want enter up to 20 records as input.

How to get that multiple entries function gor that table controlls.

Can any body help me to solve this issue.

Thanks in advance.

Regards,

Eswar

4 REPLIES 4
Read only

Former Member
0 Likes
527

Venkateswar,

Actually when you enter 8 records the scroll will display you.Drag scroll and enter other records.But one thing you have to main that when you scroll the scrollbar and go back again your enterd data will disaapear.Reason is when you drag the scroll bar PBO event will get trigger and it will show the same earlier screen.By putting some flag maintain that.

Pls. reward if useful

Read only

Former Member
0 Likes
527

In PBO of ur module pool program for the screen containing table control , write a module say abc as follows -

module abc.

module abc output.

DATA N TYPE I.

N = 20.

tabctrl-lines = N.

endmodule.

amit

Read only

Former Member
0 Likes
527

Hi Venkat,

The Vertical Scroll in the module is default so we need to use the table control properties. The table control has Lines as the property.So in PBO module write the following logic.. TC1-lines = TC1-lines + 1. This will display the Vertical scroll in the table control...

Srini.

Read only

Former Member
0 Likes
527

declaration

*&SPWIZARD: LINES OF TABLECONTROL 'TC1'

DATA: G_TC1_LINES LIKE SY-LOOPC.

in pbo write the following logic.

PROCESS BEFORE OUTPUT.

*&SPWIZARD: PBO FLOW LOGIC FOR TABLECONTROL 'TC1'

MODULE TC2_INIT.

*&SPWIZARD: MODULE TC1_CHANGE_TC_ATTR.

*&SPWIZARD: MODULE TC1_CHANGE_COL_ATTR.

LOOP AT G_TC2_ITAB

INTO G_TC2_WA

WITH CONTROL TC1

CURSOR TC2-CURRENT_LINE.

*&SPWIZARD: MODULE TC1_CHANGE_FIELD_ATTR

MODULE TC2_MOVE.

MODULE TC2_GET_LINE.

ENDLOOP.

*&SPWIZARD: MOVE ITAB TO DYNPRO

MODULE TC1_MOVE OUTPUT.

MOVE-CORRESPONDING G_TC1_WA TO ZFG_SRNO.

tc1-lines = G_TC1_LINES + 2000.

ENDMODULE. "TC1_MOVE OUTPUT

*&SPWIZARD: OUTPUT MODULE FOR TC 'TC1'. DO NOT CHANGE THIS LINE!

*&SPWIZARD: GET LINES OF TABLECONTROL

MODULE TC1_GET_LINES OUTPUT.

G_TC1_LINES = SY-LOOPC.

ENDMODULE. "TC1_GET_LINES OUTPUT

here TC1 is table control