2007 Dec 26 7:28 AM
HI I USED THE FOLLOWING CODE TO DISABLE A ROW IN TABLE CONTROL.. BUT THIS CODE DISABLES ONLY THE FIRST ROW..
I NEED TO DISABLE THE ROW WHICH I SELECT..
sy-ucomm.
WHEN 'DELETE'.
IF cflag = 'X'.
IF table1-lineS = 1.
LOOP AT SCREEN.
screen-input = 0.
MODIFY SCREEN.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
screen-input = 1.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
ENDIF.
ENDCASE.
DO HELP ME
2007 Dec 26 7:36 AM
Hi,
use the method get_selected_rows
this will return the index number of the row selected by the user
by using the index number you lock the row
Regards,
siva chalasani.
Reward points if found usefull
HI I USED THE FOLLOWING CODE TO DISABLE A ROW IN TABLE CONTROL.. BUT THIS CODE DISABLES ONLY THE FIRST ROW..
I NEED TO DISABLE THE ROW WHICH I SELECT..
sy-ucomm.
WHEN 'DELETE'.
IF cflag = 'X'.
IF table1-lineS = 1.
LOOP AT SCREEN.
screen-input = 0.
MODIFY SCREEN.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
screen-input = 1.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
ENDIF.
ENDCASE.
DO HELP ME
2007 Dec 26 7:36 AM
Hi,
use the method get_selected_rows
this will return the index number of the row selected by the user
by using the index number you lock the row
Regards,
siva chalasani.
Reward points if found usefull
2007 Dec 26 7:42 AM
Hi Ramya
i think u r table control will have chek box if u select the row tht check box will get filled with 'x'
so based on tht u can meet u r requirement
if u r table control does not have this check box do like this
declare on field as type c of lenght one in the internal table wht u gave for table control and in the wizard give tht field as check box then automatically it iwll be treated as check box and u r problem get solves plzz reward if u found my answer as helpfull to u
for further quiries my mail id is [email protected]
plzz dont forget to reward
2007 Dec 26 7:44 AM
Hi,
Write the code in some module and call this module in loop and endloop for internal table of tablecontrol.
I didnt inderstnad of
IF table1-lineS = 1. stmt.
Could you try in otherway to achieve the samething by using loop .
Regds
Sivaparvathi
Please reward points if helpful...
2007 Dec 26 7:54 AM
hi
good
pls check this code and change your code accordingly.
You need to execute a PBO module between LOOP AT WITH table_control and ENDLOOP.
In the PBO module
LOOP AT itab WIHT table_control.
module init_tab.
ENDLOOP.
MODULE init_tab OUTPUT.
LOOP AT SCREEN.
IF SCREEN-NAME = 'FIELD1' and field1 = 'ABC' "check your data here
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDMODULE.
thanks
mrutyun^
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |