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

Change Printer name at runtime

Former Member
0 Likes
1,124

User is taking invoice prinout. For a particular output type say "IGFA" if the language is other than EN, the printer name has to be changed to different printer name. Please suggest me..

7 REPLIES 7
Read only

andreas_mann3
Active Contributor
0 Likes
996

Hi,

use fm GET_PRINT_PARAMETERS -

import parameter: destination

Andreas

Read only

0 Likes
996

Sir, My requirement is like this.

user is taking invoice printing for a particular output type IGFA.For this output type the printer name is getting defaulted now. The requirement is based on the output language other than EN, I have to change the printer name at runtime. I also tried making changes in the print program of the IGFA output type, by modifying the NAST structure. But changes are not getting updated.please advice me..

Read only

0 Likes
996

HI,

Maybe it is taking the default printer name which you can find in the menu item SYSTEM=>USER PROFILE=>OWNDATA..When you check the defaults tab you will find the printer name attached.

I think you can try this.

From NAST table you can get the language.You can do the following

data:dt_itcpo type itcpo.

dt_itcpo-TDDEST = PRINTER NAME REQUIRED. or

dt_itcpo-TDRDIDEV = PRINTER NAME REQUIRED..

CALL FUNCTION 'OPEN_FORM'

EXPORTING

form = XXXXX

options = dt_itcpo

Hope it is helpful.Plz do reward points if it works out fine.

Read only

0 Likes
996

Hi Naveen,

This can be resolved by

A) The Output Condition creation:

Define Language as a field in the Output Determination. Then, in Txn VV22, create the relevant Output condition records, with different Communnication parameters (Printers) for each language. Note that this language field is different from the NAST language, though the values should be the same for your situation.

B) If custome driver program

The other solution is that if your driver (print) program that handles the output type IGFA is a custom program, you can update the NAST parameters (preferred, as it leaves an audit trail) or ITCPO structure. TDDEST is the field for the printer.

Let me know if this helps.

Cheers,

Bhanu

Read only

0 Likes
996

Hi,

When I am trying to update the NAST Parameters, It is updating in the print program,wheras the moment it leaves the print program the changes are not reflecting to the NAST structure. Also tried with ITCPO structure. Please suggest me.

Read only

0 Likes
996

Hi,

Is it a smartform or a script.If it is samrtforms,just check form interface.In the import parameters,there is a field user settings.By default it is X..just mark it as blank if it is X or mark it X if it blank and check.

Regards,

vivek

Read only

Former Member
0 Likes
996

Hi

as per my knoledge in SAp scripts ,we can

in open_form

we have one option to change printer.

check it out.

all the best