11-26-2009 3:58 AM
Hi,
I have created a table with 5 rows and 2 columns(2 fields).When i enter the first row value and give enter the others rows gets disabled please guideme how to handle it.
11-26-2009 4:03 AM
Hi Jansi,
In PBO.
module status_100.
loop at itab with control tc.
endloop.
in program.
module status_100.
describe table itab lines tc-lines.
tc-lines = tc-lines + 1. " To get only next row editable. or
tc-lines = 5. " To enable just 5 rows or any other number to have
endmodule.
Cheerz
Ram
11-26-2009 5:32 AM
Hi,
Refer:
it_zekpo is my internal table w/o header line,
wa_zekpo is work area.
Name of input/output fields on screen are:-
wa_zekpo-field1,
wa_zekpo-field2, and so on...
Use code:-
At screen logic:-
PROCESS BEFORE OUTPUT.
* MODULE status_8003.
LOOP WITH CONTROL po_tab. "po_tab is table control on screen 8003
MODULE read_data.
ENDLOOP.
PROCESS AFTER INPUT.
* MODULE user_command_8003.
LOOP WITH CONTROL po_tab.
MODULE modify_data.
ENDLOOP.
In PBO:-
*&---------------------------------------------------------------------*
*& Module READ_DATA OUTPUT
*&---------------------------------------------------------------------*
MODULE read_data OUTPUT.
READ TABLE it_zekpo INTO wa_zekpo INDEX po_tab-current_line. "po_tab is table control name
data : line_count type i.
describe it_zekpo
lines line_count.
po_tab-lines = line_count + 10.
"to increase the number of lines in table control dynamically
ENDMODULE. " READ_DATA OUTPUT
In PAI:-
*&---------------------------------------------------------------------*
*& Module MODIFY_DATA INPUT
*&---------------------------------------------------------------------*
MODULE MODIFY_DATA INPUT.
MODIFY IT_ZEKPO FROM WA_ZEKPO INDEX po_tab-currentline.
"this will modify the contents of existing line
ENDMODULE. " MODIFY_DATA INPUT
Hope this helps you.
Regards,
Tarun