Application Development and Automation 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: 
Read only

print button on custom screen

Former Member
0 Likes
506

Hi all,

I made a custom screen and a menu (status ) for that using menu painter. I want to put a button there for printing the screen. What code i have to write for that print button so when user presses print button, it prints the screen????

Thanks

Ribhu

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
462

HI

fcode for print is fcode = 'UTPR'.

call function 'SET_EDITOR_HANDLE'

call function 'SWITCH_FRAMEWORK

call method get_cursor

call method source_instance->get_state

if me->editormode-casemode = '0' or

me->editormode-casemode = 'L'.

case_mode = 'LOWER'.

elseif me->editormode-casemode = '1'.

case_mode = 'UPPER'.

elseif me->editormode-casemode = '2'.

case_mode = 'HIKEY'.

elseif me->editormode-casemode = '3'.

case_mode = 'LOKEY'.

endif.

cursor-new_index = cursor-index.

cursor-new_offset = cursor-offset.

me->edit-buf_scline = content_display..

me->edit-buf_culine = cursor-index.

me->edit-buf_cuoffs = cursor-offset.

if source_instance->l_control_instance_identical = space.

source_instance->l_backend_actual =

call method source_instance->get_source_tab

call method source_instance->get_compressed_source

describe table content lines content_fill.

call method source_instance->set_lineindex.

call method source_instance->get_lineindex

importing

lineindex = lineindex[].

call method source_instance->get_linenumbers

importing

linenum = linenum[].

call method source_instance->get_modification_inf

call method source_instance->get_state

call method source_instance->get_change_information

call method me->get_editor_mode

CALL FUNCTION 'SET_EDITOR_HANDLE'

thanks vivekanand

Hi all,

I made a custom screen and a menu (status ) for that using menu painter. I want to put a button there for printing the screen. What code i have to write for that print button so when user presses print button, it prints the screen????

Thanks

Ribhu

2 REPLIES 2
Read only

Former Member
0 Likes
463

HI

fcode for print is fcode = 'UTPR'.

call function 'SET_EDITOR_HANDLE'

call function 'SWITCH_FRAMEWORK

call method get_cursor

call method source_instance->get_state

if me->editormode-casemode = '0' or

me->editormode-casemode = 'L'.

case_mode = 'LOWER'.

elseif me->editormode-casemode = '1'.

case_mode = 'UPPER'.

elseif me->editormode-casemode = '2'.

case_mode = 'HIKEY'.

elseif me->editormode-casemode = '3'.

case_mode = 'LOKEY'.

endif.

cursor-new_index = cursor-index.

cursor-new_offset = cursor-offset.

me->edit-buf_scline = content_display..

me->edit-buf_culine = cursor-index.

me->edit-buf_cuoffs = cursor-offset.

if source_instance->l_control_instance_identical = space.

source_instance->l_backend_actual =

call method source_instance->get_source_tab

call method source_instance->get_compressed_source

describe table content lines content_fill.

call method source_instance->set_lineindex.

call method source_instance->get_lineindex

importing

lineindex = lineindex[].

call method source_instance->get_linenumbers

importing

linenum = linenum[].

call method source_instance->get_modification_inf

call method source_instance->get_state

call method source_instance->get_change_information

call method me->get_editor_mode

CALL FUNCTION 'SET_EDITOR_HANDLE'

thanks vivekanand

Read only

0 Likes
462

Hey dude,

Thanks for this code , but this is showing a lotta errors...... Please check it man.

Thanks for your support.

Ribhu