Application Development 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: 

Printer using in Smartforms

Former Member
0 Kudos

Hi,

I have the job to change all old sapscript orders to be printed with co01/02/03 from DIN A4 to DIN A5 and decided to recreate them in smartforms now. The boxes and stuff were created dynamically and to change that big forms and printprograms in sapcript to DIN A5 is like You have to change everything.... The sapscript masters know, what I mean! ;o)

So now I have made the design of the forms in Smartforms. I wanted to use the data-selection of the old print programs. When You print an order in Co01/02/03, You have to choose a list in combination with the printer destination.

In the old programs, I´m getting a structure called PRINT_CO and PRINT_OPT with the list option I have chosen for the print. This structure has a field called "DESTI", but this field is only the size of 4 characters.

The smartforms structures CONTROL_PARAMETERS and OUTPUT_OPTIONS need the full tddestination content, like the printername. And that field is in size 8 char.

How can I get this destination using the field DESTI and pass it to smartforms. Or is there a better way, to use the chosen options of the lists in CO01/02/03?

I hope, You can understand my problem!

Cheers Arne

5 REPLIES 5

Former Member
0 Kudos

Hi,

The function GET_PRINT_PARAMETERS will give you the default values for a specific user. So, you can call this function and pass the output to the SMART Form including the PRINTER details.

Regards,

Ravi

Note - Please mark the helpful answers

0 Kudos

Thank You!

But I have to get the printer setting, the user has made for the list, which is used to print the orders.

Cheers Arne

0 Kudos

How is the user doing this setting and where exactly its being done?

0 Kudos

ok, for example:

TA CO02->choose an order->menu order->settings->list control. Here You can check the lists, You want to be printed and there output device.

In the customizing, You can set the sapscript and the print program for every list, so You can print different forms with only one order in CO01/02/03.

The problem is, that You can´t choose a smartform there. So I have to write my own program and call the actual smartform by the choosen list.

In the print program, I´m calling the function CO_PRINT_GET_INFO_LIST to get the list structures PRINT_CO and PRINT_OPTS. In there, I have the field DESTI, which has the type CHAR 4, buit I need to fill the TDDEST field in the smartform structure, and it´s size is CHAR 8. Here I need the destination, like the printername. In DESTI I get only the short name.

Hope You understand, what I mean!

Cheers

0 Kudos

I am not sure I completely understand this but did you try passing the DESTI to the smart form? Does it accept it or error out?

Regards,

Ravi