cancel
Showing results for 
Search instead for 
Did you mean: 

Smartform printing after script

Former Member
0 Kudos

Hi,

I have a requirement in which i need to print the smartform after script. The program is using script to print the deliveryorder.

After printing the delivery order i need to print the smartform automatically. How can i do it?

Regards,

Arun.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

If my understanding is right ,follow the following process

1.Print Script first

OPEN form

write Form

Close Form.

2.Once the close form is over call the Smartform functin module.

Let me know if I am not clear.

Regards,

Ravi

Former Member
0 Kudos

Actually i was following the one that u had referred..but what happening is print it is fine both are printing...but when it come to print preview it will show the script first..then when i click back it will show the smartform......then when i click back it will come to the out type screen....actually i dont want to show the smartform in print preview.....

Former Member
0 Kudos

Hello,

If you dont want to show the smartform in the print privew pass the following parameter,

SSFCTRLOP-PREVIEW = ' '.

Hope this would help.

Regards,

Former Member
0 Kudos

If i give in the below format but when i tried print preview then it wil show script fiirst then when i click back the value for SY-UCOMM will become 'SBCAS' so it would be going to others......and if i put W_CTRLOP-PREVIEW = '' it is printing the form and if i put W_CTRLOP-PREVIEW = 'X' it is showing the preview......how can i restrict this printing and showing preview when user select for print preview......

CASE SY-UCOMM.

WHEN 'VIEW'.

CLEAR:W_CTRLOP,W_COMPOP.

W_CTRLOP-NO_DIALOG = 'X'.

W_CTRLOP-PREVIEW = 'X'.

*w_ctrlop-device = 'LP01'.

W_COMPOP-TDNOPREV = ''.

W_COMPOP-TDNOPRINT = 'X'.

W_COMPOP-TDIMMED = 'X'.

W_COMPOP-TDDELETE = 'X'.

W_COMPOP-TDFINAL = 'X'.

W_COMPOP-TDNEWID = 'X'.

W_COMPOP-TDIEXIT = 'X'.

WHEN 'PRNT'.

CLEAR:W_CTRLOP,W_COMPOP.

W_CTRLOP-NO_DIALOG = 'X'.

W_CTRLOP-PREVIEW = ''.

W_COMPOP-TDNOPREV = 'X'.

*w_compop-tdnoprint = 'X'.

W_COMPOP-TDIMMED = 'X'.

W_COMPOP-TDDELETE = 'X'.

W_COMPOP-TDFINAL = 'X'.

W_COMPOP-TDNEWID = 'X'.

W_COMPOP-TDIEXIT = 'X'.

W_COMPOP-SPONUMIV = 'X'.

W_COMPOP-TDCOPIES = NAST-ANZAL.

WHEN OTHERS.

CLEAR:W_CTRLOP,W_COMPOP.

W_CTRLOP-NO_DIALOG = 'X'.

W_CTRLOP-PREVIEW = ''.

*w_ctrlop-device = 'LP01'.

W_COMPOP-TDNOPREV = ''.

W_COMPOP-TDNOPRINT = 'X'.

W_COMPOP-TDIMMED = 'X'.

W_COMPOP-TDDELETE = 'X'.

W_COMPOP-TDFINAL = 'X'.

W_COMPOP-TDNEWID = 'X'.

W_COMPOP-TDIEXIT = 'X'.

ENDCASE.

.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Is it a standard driver program or a modified one?

Regards

Karthik D

Former Member
0 Kudos

modified one...

Former Member
0 Kudos

Hi Arun,

I hope you are aware of basic programming of smartforms so whenever you are calling the function module generated while acitvating your smartforms, you have to pass structure "output_options" and "control_parameters" here you can set output device, and no print preview.

Thanks,

Santosh