‎2009 Jan 10 2:23 PM
Dear all
when enterting in data table control 6 enteries i can enter , when i am scrolling scroll bar it coming 6 th item
repeating , how to control avoid , how do move scroll bar and enter 7 th data, pls tell me
ex: 1
2
3
here no space table control i want scroll
3
3
3
repeating how avoid,
and then 4 data i want enter.
‎2009 Jan 10 2:31 PM
hi,
Refer to these program..
DEMO_DYNPRO_TABCONT_LOOP
DEMO_DYNPRO_TABCONT_LOOP_AT
DEMO_DYNPRO_TABLE_CONTROL_1
DEMO_DYNPRO_TABLE_CONTROL_2
‎2009 Jan 10 5:58 PM
hi,
Try include this code in PAI
loop at itab.
module modify_tab
endloop
in program
module modify_tab
describe table itab lines tc-liens
if tc-current_line > tc-lines
append itab
else
modify itab index tc-current_line
endmodule
thanks
‎2009 Jan 11 6:02 AM
Hi,
Use this code, its working:-
Take the names of the input/output fields as work_area-field_name.
What you need to do exactly is read the values from internal table into table control in PBO of the screen after modifying them in PAI.
At Screen Logic:-
PROCESS BEFORE OUTPUT.
MODULE status_8002. "for pf-status
LOOP WITH CONTROL po_tab. "po_tab is name of table control
MODULE pass_data. "to pass data into table control from internal table
ENDLOOP.
PROCESS AFTER INPUT.
MODULE user_command_8002. "to handle other user commands (back and exit)
LOOP WITH CONTROL po_tab. "po_tab is name of table control
MODULE modify_data. "to modify data from table control into internal table
ENDLOOP.
In PBO,
*&---------------------------------------------------------------------*
*& Module PASS_DATA OUTPUT
*&---------------------------------------------------------------------*
MODULE pass_data OUTPUT.
READ TABLE it_ekpo into wa_ekpo INDEX po_tab-current_line.
" read data from internal table into table control
DATA : line_count TYPE i.
DESCRIBE TABLE it_ekpo
LINES line_count. "count number of records in internal table
po_tab-lines = line_count + 5.
" take 5 more lines than the number of records in internal table
" in order to make table control scrollable
ENDMODULE. " PASS_DATA OUTPUT
"it_ekpo is internal table and wa_ekpo is the work area
In PAI,
*&---------------------------------------------------------------------*
*& Module MODIFY_DATA INPUT
*&---------------------------------------------------------------------*
MODULE MODIFY_DATA INPUT.
MODIFY IT_EKPO INDEX PO_TAB-CURRENT_LINE FROM WA_EKPO.
"modify records from table control into the internal table
ENDMODULE. " MODIFY_DATA INPUT
Hope this solves your problem.
Thanks & Regards,
Tarun Gambhir.
‎2009 Feb 06 7:52 AM