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
1,844

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
1,173

Hi

Call the function module 'GET_PRINT_PARAMETERS' to print.

*Sending the print parameters to this.

CALL FUNCTION 'GET_PRINT_PARAMETERS'

EXPORTING

destination = 'LP01'

immediately = 'X' "<<< add this line - immediate print

NEW_LIST_ID = 'X' "<<< add this line - new spool request

IMPORTING

out_parameters = l_parms

valid = valid.

Check this thread

Regards

Raj

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

5 REPLIES 5
Read only

Former Member
0 Likes
1,173

Try using 'PRIN' as FCODE for ur print button.

reward points if helpful

Read only

0 Likes
1,173

Well I am obviously doing that but what about the coding part???? what should happen when the user presses the print button? It is a custom ment for the screen. Let me know

Thanks

Ribhu

Read only

Former Member
0 Likes
1,174

Hi

Call the function module 'GET_PRINT_PARAMETERS' to print.

*Sending the print parameters to this.

CALL FUNCTION 'GET_PRINT_PARAMETERS'

EXPORTING

destination = 'LP01'

immediately = 'X' "<<< add this line - immediate print

NEW_LIST_ID = 'X' "<<< add this line - new spool request

IMPORTING

out_parameters = l_parms

valid = valid.

Check this thread

Regards

Raj

Read only

0 Likes
1,173

Thanks for your reply. Please let me know what are these variables?

out_parameters = l_parms

valid = valid.

What should I pass there in my case?

Thanks

Ribhu

Read only

0 Likes
1,173

Welll when I am writing this code, I believe its storing the data in the spool request. Its not printing immideatly.

Please tell me what to do???

Thanks

Ribhu