01-03-2006 4:42 AM
Hi Experts,
I need some help in smartforms.that is when i execute layout i Need two buttons in printdialog window print and printpreview .but if i press print button i need to update some data printpreview means no update but no print button should be disabled.
I need to select buttons while running the FM in smartforsm.
If anybody know tell me.
Thanks
Regards,
Nandha
01-03-2006 5:03 AM
Dear Nandha,
When you run the smartforms you already get the popup with 'Print' and 'Print Preview' buttons.
You are trying to update some data which is going to be printed just before printing??? You can directly then handle through the program itself, why from that 'print' button.
And if you are trying to update some data which is not going to be printed with the click on 'print' then is it a good practice???
Could you be more clear???
Regards,
Deva.
01-03-2006 5:02 AM
01-03-2006 5:03 AM
Dear Nandha,
When you run the smartforms you already get the popup with 'Print' and 'Print Preview' buttons.
You are trying to update some data which is going to be printed just before printing??? You can directly then handle through the program itself, why from that 'print' button.
And if you are trying to update some data which is not going to be printed with the click on 'print' then is it a good practice???
Could you be more clear???
Regards,
Deva.
01-03-2006 5:36 AM
Hi,
Thanks for reply.
If i press print some data should update if i print preview print icons and menu item should be disabled.
but i need Two buttons(Print and print preview) in selection window(Print dialog window).
Now what's happening is everytime it's updating data print or preview.
I want to update only when press print button.
Thanks
Regards,
Nandha
01-03-2006 5:49 AM
Hi nandha,
1. I faced similar problem.
2. The thing to understand here is :
a. On selection-screen give a CHECKBOX
for Print
If user selects / ticks the checkbox,
only then PRINT BUTTON will come
while opening report,
otherwise not.
3. So Based upon the CHECK BOX,
we come to know what is going to happen
(only print, or only preview)
4. Based on this, we can DETECT and Update
the database as per our requirement.
5. For SMARTFORM
There is one parameter for the FM
OUTPUT_OPTIONS
data: output_options type ssfcompop.
*----
output_options-tdnoprint = 'X'.
6. This TDNOPRINT is Very Important.
It will do what we want.
Based upon the checkbox, we can set its value.
Try the above technique. It works fantastic.
regards,
amit m.
01-03-2006 5:53 AM
Hi again,
1 One Another technique !
2. While calling the FM for smartform,
we have an importing parameter :
JOB_OUTPUT_INFO
3. JOB_OUTPUT_INFO-OUTPUTDONE
This will be 'X' if PRINT
This will be '' if PRINT PREVIEW
4. After the user Prints/Preview
This value can be used
to update databased.
regards,
amit m.
01-03-2006 8:20 AM
Hi,
Thanks for the reply
No other way without checkbox?
Thanks.
Regards,
Nandha..