2009 Oct 31 9:09 AM
hi,
how to disable a 2 fields in a row in module pool table control.
Thanks and Regards,
sravani
hi,
how to disable a 2 fields in a row in module pool table control.
Thanks and Regards,
sravani
2009 Oct 31 9:41 AM
hi
in PBO.
loop at itab with control Tc.
endloop.
module modify_screen.
in Program.
module modify_screen.
loop at screen.
if screen-name = 'ITAB-FIELD1' or screen-name = 'ITAB-FIELD2'.
screen-input = 0.
modify screen
ENDIF
endloop.
endmodule
Cheers
Ram
2009 Oct 31 4:12 PM
Hi Sravani,
<li>Define Columns table based on table control in the TOP include.
<li>Write the below code in the PBO of the screen to hide certain fields
CONTROLS TABC TYPE TABLEVIEW USING SCREEN 100.
DATA: COLS LIKE LINE OF TABC-COLS.
Thanks
Venkat.O"At runtime as TABC is deep structure which has COLS table
"inside we have to do the following.
LOOP AT TABC-COLS INTO COLS.
IF COLS-SCREEN-NAME = 'ITAB-MATNR'. "Which is to be hidden
COLS-SCREEN-ACTIVE = '0'.
MODIFY TABC-COLS FROM COLS INDEX SY-TABIX.
ENDIF.
ENDLOOP.
2009 Nov 05 1:27 PM
Hi Sravani
u need to invisible the fields or diable for user entry?
2009 Nov 05 1:50 PM
If u want to do for a particular line.
Try Below logic.
1.GET CURSOR LINE g_var--<declare a varaible of type i>.
2.Using this index we can find which line is to be modified/uneditable.
3.Write the logic in PBO of the table control when the index comes create a module to write the logic.
Regards
Pramod M
2009 Nov 06 4:03 AM
Hi,
Try like this...
If you know which row you wanna make uneditable, then declare a counter like this
PROCESS BEFORE OUTPUT.
LOOP AT itab WITH CONTROL tc.
MODULE modify_screen.
ENDLOOP.
MODULE STATUS_0100.
MODULE modify_screen OUTPUT.
counter = counter + 1.
LOOP AT SCREEN.
if counter = 2. " For the 2nd row in the table control
screen-input = 0.
MODIFY SCREEN .
endif.
ENDLOOP.
If you want a particular column of the 2nd row to be disabled, then you can try something like this
MODULE modify_screen OUTPUT.
LOOP AT SCREEN.
counter = counter + 1.
if counter = 10. "Lets say you have 5 columns. This will disable 5th column in the 2nd row
screen-input = 0.
MODIFY SCREEN .
endif.
ENDLOOP.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |