Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Table control issue.

Former Member
0 Kudos

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

6 REPLIES 6

Former Member
0 Kudos

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.

former_member223537
Active Contributor
0 Kudos

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

anversha_s
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.

former_member404244
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Thanks it is answered