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

lines in table control!

Former Member
0 Likes
672

friends,

i hav two table controls in my screen..based on some user action or selection made in the first table control 1, i need to set the no. of lines in the table control 2 input enabled/disabled..i.e. i need to set the tablecontrol2-lines through some selection made or double click done in table control 1...how to achieve this? i hav already posted a similar question to this one, but didn't get any reply..if somebody can walk me thru this issue it will be of great help to me...points will be rewarded...thanks all....will shoot the next qn if this issue is solved

1 ACCEPTED SOLUTION
4 REPLIES 4
Read only

Former Member
0 Likes
641

Hi Sathish,

the solution approach is as follows..

lets assume u select 2 rows of the tablecontrol1 and press a button BUTT..

In the user command module we need to write the logic for BUTT wherein we can put the logic...in the internal table containing the records for Tablecontrol2 ..we need to put a flag for those records which need to be in Enabled/Disabled mode..then in the PBO u do the appropriate action while populating the Second Tablecontrol.

Read only

Former Member
0 Likes
641

if you choose some user action, PAI will be triggered, here you need to set the lines.

using TC2-lines = 20.

if sy-ucomm = 'ENTER'.

tc2-lines = 20.

endif.

Regards

Vijay

Read only

Former Member
0 Likes
641

thanks for your reply...i already have set it like this TBLCTRL2-LINES = 3 - LINE_CNT...but the problem is in some scenarios, it is not working...my scenario is like this...

flowlogic - pbo

MODULE TBLCTRL2_CHANGE_TC_ATTR.

program:

MODULE TBLCTRL2_CHANGE_TC_ATTR OUTPUT.

DESCRIBE TABLE ITAB_TBL2 LINES TBLCTRL2-LINES.

TBLCTRL2-LINES = 3 - LINE_CNT.

based on teh variable line_cnt, i am setting the lines of the table control2, but if line_cnt is 0, all the lines are getting input enabled, which i don't want...or if the variable = 0, i want the total tblcontrol 2 to be input disabled...i have given screen-group = '111' for the 3 fields of the tablecontrol2 adn when i attempted the same with the following set of coding, am getting the same result..in fact, some other buttons are getting disabled.. where am i going wrong?

LOOP AT SCREEN.

    • SCREEN-GROUP1 = '111'.

screen-name = 'ITAB_TBL2-PEDTR'.

SCREEN-INPUT = 0.

modify screen.

ENDLOOP.

ENDIF.