‎2005 Jun 06 5:54 PM
Hi ,
Can anyone help in disabling rows in Table Control. My actual Requirement is user enters data in first Column and the row is filled accordingly. rest all rows should be greyed out at the same time.
thanks in advance,
anjani.
‎2005 Jun 06 6:12 PM
‎2005 Jun 06 6:12 PM
‎2005 Jun 06 6:17 PM
If this is to be dynamic or done at run-time, then you will need to do a loop at the control.
* Here i_pidetcon is the table control
loop at i_pidetcon-cols into cols where index gt 0.
if cols-screen-name = 'YOUR_FIELD'.
cols-screen-input = '0'.
endif.
modify i_pidetcon-cols from cols index sy-tabix.
endloop.
Regards,
Rich Heilman
‎2005 Jun 07 3:55 AM
Hi Heilman,
This Solution grey's out all the rows in table control . my problem is if user enters in first and second row . those two rows must be editable and rest should be greyed out. Rowwise should be done.
thanks,
anjani.
‎2005 Jun 07 5:05 AM
Hi Anjani,
You can use t_ctrl-current_line ge 2 to gray all other lines.
DATA : i_makt TYPE STANDARD TABLE OF zzz_makt WITH HEADER LINE.
CONTROLS: t_ctrl TYPE TABLEVIEW USING SCREEN '9000'.
PROCESS BEFORE OUTPUT.
.....
LOOP AT i_makt WITH CONTROL t_ctrl CURSOR t_ctrl-current_line.
Dynamic screen modifications
MODULE set_screen_fields.
ENDLOOP.
MODULE set_screen_fields OUTPUT.
LOOP AT SCREEN.
IF ( t_ctrl-current_line LE 2 ) .
Making the screen fields as editable
screen-input = 1.
ELSEIF ( t_ctrl-current_line GT 3 ).
Making the screen field as uneditable
screen-input = 0.
ENDIF.
Modifying the screen after making changes
MODIFY SCREEN.
ENDLOOP.
ENDMODULE. " set_screen_fields OUTPUT
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/table control in abap.pdf
If your problem is solved,kindly reward points and close this thread.Otherwise get back.
‎2005 Jun 07 8:03 AM
Hi Jayanthi,
thanks very much. I implemented the code with small modifications and it worked well.
i didnt find any option to give points and close the thread. can you tell me how to do that.
thanks & regards,
anjani.
‎2005 Jun 07 8:08 AM
Hi Anjani,
You can find three options close to each reply.[yellow for helpful answer,green for very helpful answer and blue star for solved problem].
If you click any one [which you think is suitable]nearer to reply , it will automatically assign point for that corresponding person.
If you are not able to find those options,you have to ask the moderator of this forum to assign marks or mail to sdn@sap.com.