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

Closing the PDF application

Former Member
0 Likes
954

Hi Everyone,

My requirement is to send a PDF file stored on my desktop for printing and then delete it from my local system. But the trouble is everytime I am opening this PDF document and send it for printing the application remains open and I have to close it manually so that the program can delete it from the system.

My requirement is how can I achieve the above requirement, even if I have to adopt a different approach.Currently I am using the methods mentioned below for opening the PDF,Printing it and then deleting it (in that order ).

CALL METHOD cl_gui_frontend_services=>execute

EXPORTING

document = gv_fname

PARAMETER = lv_parameter

operation = 'OPEN'

***********************************************************

CALL METHOD cl_gui_frontend_services=>execute

EXPORTING

document = gv_fname

PARAMETER = lv_parameter

operation = 'PRINT'

EXCEPTIONS

***********************************************************

CALL METHOD cl_gui_frontend_services=>file_delete

EXPORTING

filename = gv_fname

CHANGING

rc = gv_return

EXCEPTIONS

How can I close the PDF application automatically without user intervention?

Any input is welcome.

Thanks and Regards

Abhishek Kumar

Edited by: abhishek singh on Oct 9, 2008 3:08 PM

Hi Everyone,

My requirement is to send a PDF file stored on my desktop for printing and then delete it from my local system. But the trouble is everytime I am opening this PDF document and send it for printing the application remains open and I have to close it manually so that the program can delete it from the system.

My requirement is how can I achieve the above requirement, even if I have to adopt a different approach.Currently I am using the methods mentioned below for opening the PDF,Printing it and then deleting it (in that order ).

CALL METHOD cl_gui_frontend_services=>execute

EXPORTING

document = gv_fname

PARAMETER = lv_parameter

operation = 'OPEN'

***********************************************************

CALL METHOD cl_gui_frontend_services=>execute

EXPORTING

document = gv_fname

PARAMETER = lv_parameter

operation = 'PRINT'

EXCEPTIONS

***********************************************************

CALL METHOD cl_gui_frontend_services=>file_delete

EXPORTING

filename = gv_fname

CHANGING

rc = gv_return

EXCEPTIONS

How can I close the PDF application automatically without user intervention?

Any input is welcome.

Thanks and Regards

Abhishek Kumar

Edited by: abhishek singh on Oct 9, 2008 3:08 PM

4 REPLIES 4
Read only

Former Member
0 Likes
733

maybe a dumb approach of mine, but do you need to open it instead to print it?

Read only

0 Likes
733

Hi Florian,

My requirement is to print the documents all at one go and they can be a lot of them not just the PDF but others types as well and even if the Adobe application is opened is not a problem but it should close automatically as well. User should not be manually closing the application.Kind of saying ,can be a background job.

I am opening this actually becoz it should not open the blank application .It is not at all a part of the requirement. But Even if I dont "open" it and just "print" it......the PDF application still opens.Is there any FM/Method to achieve this printing without actually opening it?

Regards

Abhishek

Edited by: abhishek singh on Oct 10, 2008 2:51 PM

Read only

Former Member
0 Likes
733

Could not get any reply.

Read only

Former Member
0 Likes
733

This message was moderated.