‎2009 Jan 08 12:42 PM
Hi all,
I am enable to activate the vertical scroller in the table control for the module pool please provide the solution with explanation.
regards,
Vishal.
‎2009 Jan 11 5:44 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 Jan 08 1:18 PM
Hi,
Select PBO module status & click on that.
Just you write a code after normal code as:
VCONTROL-LINES = SY-DBCNT.(this will enable the table control vertical scroll bar.)
Normal code before above statement is(for eg.),
MOVE WA-EBELN TO EKKO-EBELN.
MOVE WA-AEDAT TO EKKO-AEDAT.
Regards,
BBR.
‎2009 Jan 08 1:23 PM
Write the below code in the PBO module before the table control loop.. endloop statement.
DESCRIBE TABLE <internal_table_name> LINES tablecontrolname-lines. "<internal_table_name> is the name of the internal table used for the table control
‎2009 Jan 08 2:07 PM
Hi,
write the following code in the PBO event.
data: line type i.
describe tables itab lines line.
tc-lines = line.
where tc is the table control name.
if records exceeds the physial space in table control, then only vertical control bar will be displayed.
regards,
John
‎2009 Jan 08 2:14 PM
HI.
Have you created TC by not wizard? If yes ,go to layout of TC and click the check box of vertical separator.
REgards.
jay
‎2009 Jan 10 6:51 AM
Hi,
Select PBO module status & click on that.
Just you write a code after normal code as:
TABLECONTROLNAME-LINES = SY-DBCNT.(this will enable the table control vertical scroll bar.)
Normal code before above statement is(for eg.),
MOVE WA-EBELN TO EKKO-EBELN.
MOVE WA-AEDAT TO EKKO-AEDAT.
Regards,
BBR.
‎2009 Jan 11 5:44 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.