cancel
Showing results for 
Search instead for 
Did you mean: 

Restrciting NAST entries while 'print preview' of VA02/03 sales order

Former Member
0 Kudos

Hi experts,

While doing 'printing preview' for the displayed VA03/02 sales order, an entry is created in the NAST table.

The requirement is to not create(or diffrentiate based on some flag) this entry in NAST table while doing 'printing preview' ..but for actual print the entry in NAST table should be created.

Finally the main aim is to differentiate between print preview vs actual print based on NAST entry.

I tried debugging but the parameters for print preview vs actual print are same.

How can the print preview action be distinguished from actual print in such cases.

Thanks

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

The additional popup screen from the smartform led to these inconsistent results. The driver program is modified to use the settings in the SAP standard screen and supressed the additional screen. Using Print or Print Preview in the standard screen will directly create spool or output preview.

Former Member
0 Kudos

Hi,

The requirement is to not create(or diffrentiate based on some flag) this entry in NAST table while doing 'printing preview' ..but for actual print the entry in NAST table should be created.

For your requirement to differentiate, you can use the field VSTAT in NAST table, this has possible values of 0, 1 and 2.

0 Not processed

1 Successfully processed

2 Incorrectly processed

So as and when an output type for printing is attached, the status of the output remains '0' until the form is actually printed, so in case of print preview it will remain to be '0'. This will change to '1' once the Print command is actually issued.

Regards,

Chen

Former Member
0 Kudos

Hi Chen,

You are correct as far as the setting of the above fields is concerned.But still, during print and print previews same values of the fields were updated.

The problem was there due to multiple 'Print' options screens existing for this t-code.

So the user could 'Preview' the o/p even after clicking 'Print' button.(Duplicate screens being callled)

The additional popup screen from the smartform led to these inconsistent results. The driver program is modified to use the settings in the SAP standard screen and supressed the additional screen. Using Print or Print Preview in the standard screen will directly create spool or output preview.

Thanks

Former Member
0 Kudos

Hi,

Try using the following methods,

1. In the driver program, check whether the ok code is for print preview or not. If ok code is for print preview, then clear the control data available in NAST sturcture so that it will not get updated in the table for print preview.

2. Develop a Z table with columns to mention the print and print preview control flags and update the table accordingly from the driver program based on the OK CODE value.

Thanks & Regards,

Harish