‎2006 Dec 20 11:35 AM
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
‎2006 Dec 20 11:52 AM
hi satish,
chk this link.
will be hlpful for u.
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbac5e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbac5e35c111d1829f0000e829fbfe/content.htm
Regards
Anver
‎2006 Dec 20 11:46 AM
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.
‎2006 Dec 20 11:47 AM
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
‎2006 Dec 20 11:52 AM
hi satish,
chk this link.
will be hlpful for u.
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbac5e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbac5e35c111d1829f0000e829fbfe/content.htm
Regards
Anver
‎2006 Dec 20 12:21 PM
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.