cancel
Showing results for 
Search instead for 
Did you mean: 

PDF Print Preview

Former Member
0 Kudos

Hi experts,

I have a requirement where I display the output of a program in popup in PDF format when user clicks on a button.

I am able to do that and output is shown properly in PDF format.

But now the problem is he wants PDF to be shown directly in 'Print Preview' mode.

Can you please suggest me how it can be done.

I am using 'get_Print_parameters' Function Module.

Is there any parameter which we need to set for this purpose.

Thanks in advance.

Regards

Vasu

Accepted Solutions (1)

Accepted Solutions (1)

former_member186491
Contributor
0 Kudos

Hi,

You can use following code --

 DATA: LV_CONTROL_PARAMETERS TYPE SSFCTRLOP.

 * Set relevant control parameters
 LV_CONTROL_PARAMETERS-DEVICE = 'PRINTER'. "Printer Device
 LV_CONTROL_PARAMETERS-GETOTF = L_X. "OTF output 
 LV_CONTROL_PARAMETERS-NO_DIALOG = ' '. "L_X. No print dialog 
 LV_CONTROL_PARAMETERS-PREVIEW = 'X'. " This would enable Preview SPACE is for No preview 
* Set relevant output options LV_OUTPUT_OPTIONS-TDNEWID = L_X. "Print parameters,
 LV_OUTPUT_OPTIONS-TDDELETE = ' '. "SPACE. Print parameters, 

Check this, this worked in my case.

Thanks.

Kumar Saurav.

Former Member
0 Kudos

Hi Kumar,

Thanks for your reply.

But can you please explain me in detail where this set of code should be used i.e. calling which function module.

I am using 2 Function modules:

GET_PRINT_PARAMETERS

CONVERT_ABAPSPOOLJOB_2_PDF

I could not see field 'PREVIEW' in any structure of importing/exporting/tables parameters of these Function modules.

Regards

Vasu

Answers (1)

Answers (1)

Former Member
0 Kudos

solved it myself

Former Member
0 Kudos

hi vasu .

could you explain how you solve

thanks

Sree