2007 Nov 01 2:22 PM
Hi People,
Need some ABAP help. Presently im displaying data in a table control and now i want to print the data in that table control. I know about one function module which was mentioned in one of the threads i dont know how to use this function module
( FITRV_PRINT_TABLE_CONTROL_DATA). it will be great of you guys if you can explain this function module or provide me with an alternative.
Thanks,
Venkat
Hi People,
Need some ABAP help. Presently im displaying data in a table control and now i want to print the data in that table control. I know about one function module which was mentioned in one of the threads i dont know how to use this function module
( FITRV_PRINT_TABLE_CONTROL_DATA). it will be great of you guys if you can explain this function module or provide me with an alternative.
Thanks,
Venkat
2007 Nov 01 2:26 PM
----
Form print_table_control_data
----
Print data from table control screen
----
--> ITAB = internal table with table control data
--> TC = table control
-- OPTIMIZE = use column optimization when calling ALV
----
form print_table_control_data tables ptab
using table_control type cxtab_control
title type c
optimize type c
ddic_fields type c.
data: pgm like sy-repid,
tc type cxtab_control.
pgm = sy-repid.
tc = table_control.
call function 'FITRV_PRINT_TABLE_CONTROL_DATA'
exporting
table_control = tc
callback_program = pgm
callback_top_of_list = 'PRINT_TRIP_HEADER'
get_curr_quan_fields_from_ddic = ddic_fields
optimize_column_width = optimize
window_title = title
tables
print_data = ptab
exceptions
column_information_missing = 1
printing_not_possible = 2
others = 3.
endform. " print_table_control_data
check the program MP56TFPR. it might help you
2007 Nov 01 2:28 PM
Hello,
DATA: pgm LIKE sy-repid,
tc TYPE cxtab_control.
pgm = sy-repid.
tc = table_control. " Your table control name
CALL FUNCTION 'FITRV_PRINT_TABLE_CONTROL_DATA'
EXPORTING
table_control = tc
callback_program = pgm
callback_top_of_list = 'PRINT_TRIP_HEADER' " Make this perform for header
get_curr_quan_fields_from_ddic = ddic_fields " pass blank
optimize_column_width = optimize "pass blank
window_title = title " pass blank
TABLES
print_data = ptab " your data tab
EXCEPTIONS
column_information_missing = 1
printing_not_possible = 2
OTHERS = 3.Regards,
Naimesh Patel
2007 Nov 01 3:21 PM
Thanks Guys,
I could get the function module to work. But for the list headings its printing blank on the top of the list. What should i do to populate the headings.
2007 Nov 01 8:22 PM
2013 Apr 25 9:21 PM
I am stuck at header. How to get the header info? please help
2007 Nov 06 2:46 PM
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |