09-25-2006 10:33 AM
Hi my requirement is to get operations of the PRODUCTION ORDER in the table control.
I am appending the rows (operations)to the table control. But the problem is remaining rows of the table control are disabled.
I need help ->
1. How to diable single row in a table control.
2. How to enable remaining rows in the table control after append.
Thanks and Regards
Harish
09-25-2006 10:39 AM
hi,
We can not disable a row specifically.
Screen modifications can be done for a complete column not for a single row.
Make all the rows enabled. Whenever, you want to add a new line, append a blank line to the internal table for which you want to append. So, in table control also you will be getting a blank record. Input your values there and save teh internal table.
Regards,
Sailaja.
09-25-2006 10:46 AM
Hi,
PROCESS BEFORE OUTPUT.
LOOP AT it_mat INTO wa_mat
WITH CONTROL tc_mat
CURSOR tc_mat-current_line .
MODULE disable_column.
ENDLOOP.
MODULE disable_column OUTPUT.
if tc_mat-current_line ne l_new_appended_line.
if not wa_mat-partno is initial.
LOOP AT SCREEN.
IF screen-name = 'WA_MAT-PARTNO'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
endif.
endif.
ENDMODULE.
Check whether the record is available in internal table of table control. If it is available, then disable the column. Also check the new line which you have added. For the new line, the field value will be blank.
Best regards,
Prashant
PS : Please mark all helpful answers
09-25-2006 10:48 AM
hi harish,
u can do that.
chk this sample code. u will get an idea.
the names and others variables are that used in my pgm.
for me there are 2 fields are in my table control, they are
<b>zmpets_range-rangeid AND zmpets_mode-modecode</b>
PROCESS BEFORE OUTPUT.
MODULE status_9010.
LOOP WITH CONTROL tab_control.
MODULE move_data_to_table.
<b>MODULE deactivate_field_change.</b>
ENDLOOP.
MODULE deactivate_field_change OUTPUT.
IF zmpets_range-rangeid NE space AND zmpets_mode-modecode NE space.
LOOP AT SCREEN.
CASE screen-name.
WHEN 'ZMPETS_MODE-MODECODE'.
screen-input = 0.
MODIFY SCREEN.
WHEN 'ZMPETS_RANGE-RANGEID'.
screen-input = 0.
MODIFY SCREEN.
ENDCASE.
ENDLOOP.
ENDIF.
ENDMODULE. " deactivate_field_change OUTPUT
rgds
anver
if helped pls mark points
09-25-2006 10:50 AM
You can enable/disable rows in table control .
You have too loop the screen inside the loop of TC in PAI .
Set the screen fields as pe ryour requirment.
For Eg.
LOOP AT i_itab
WITH CONTROL tc_itab
CURSOR tc_itab-current_line.
MODULE screen_tc.
ENDLOOP.
And inside screen_tc
LOOP AT SCREEN.
CASE screen-name.
.....
endcase.
ENDLOOP.
Regards,
Sreejesh P.
09-25-2006 10:51 AM
hi sirivaram,
U cannot disable a single row but u can disable entire column by giving the column to be fixed.
In the PAI write the logic.
CASE SY-UCOMM.
WHEN 'INSERT'.
describe table <table control name> lines v_lines.
v_lines = v_lines + 1.
<tablecontrolname>-lines = v_lines.
endcase.
Now the describe command reads the table control entries and now incremnt it with one and then give this value to tablecontrol-lines.Now u will get a new record with blank line and all the fields will be inputted.
Regards,
Nagaraj
04-06-2009 6:14 PM