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

scriptform-print

Former Member
0 Likes
714

hi,

when using FM 'open_form' to print scriptform, generally a dialog popup to set the printer parameters,

how to set these parameters in program for need not to fill manually?

thanks advance!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
676

Hi Edgar,

There is a structure called as ITCPP - SAPscript output parameters and ITCPO - SAPscript output interface.

With the function modules PRINT_TEXT and OPEN_FORM, you can set output formatting and print control using the parameter OPTIONS. The data you pass to this parameter must have the structure ITCPO. The fields of this structure come from the areas SAPscript, the spool, and SAPcomm. Some of these fields can be changed by the user on the selection screen, if you requested it using the parameter DIALOG with the above function modules. The print program evaluates these changes using the corresponding fields of the parameter RESULT.

For e.g

CALL FUNCTION 'OPEN_FORM'

EXPORTING

FORM = SPACE

LANGUAGE = SY-LANGU

DEVICE = 'PRINTER'

DIALOG = 'X'

<u><b>OPTIONS = ITCPO</b></u>

............................

So in the options you can pass that structure, so that all the values to be changed can be done through that.

P.S. Mark all helpful answers for points.

Regards,

JLN

5 REPLIES 5
Read only

Former Member
0 Likes
676

We have an parameter options in the functiom module ther in that structure u can set all the fileds u want.

Read only

Former Member
0 Likes
676
Read only

Former Member
0 Likes
676

Hi,

Set the IMPORT parameter 'OPTIONS' for this FM and make DIALOG as space in the import param.

Regards

Nishant

Read only

Former Member
0 Likes
677

Hi Edgar,

There is a structure called as ITCPP - SAPscript output parameters and ITCPO - SAPscript output interface.

With the function modules PRINT_TEXT and OPEN_FORM, you can set output formatting and print control using the parameter OPTIONS. The data you pass to this parameter must have the structure ITCPO. The fields of this structure come from the areas SAPscript, the spool, and SAPcomm. Some of these fields can be changed by the user on the selection screen, if you requested it using the parameter DIALOG with the above function modules. The print program evaluates these changes using the corresponding fields of the parameter RESULT.

For e.g

CALL FUNCTION 'OPEN_FORM'

EXPORTING

FORM = SPACE

LANGUAGE = SY-LANGU

DEVICE = 'PRINTER'

DIALOG = 'X'

<u><b>OPTIONS = ITCPO</b></u>

............................

So in the options you can pass that structure, so that all the values to be changed can be done through that.

P.S. Mark all helpful answers for points.

Regards,

JLN

Read only

Former Member
0 Likes
676

Hello,

Fill in the 'ITCPO' structure with appropriate values the call the open_form

CALL FUNCTION 'OPEN_FORM'

EXPORTING

FORM = SPACE

LANGUAGE = SY-LANGU

DEVICE = 'PRINTER'

DIALOG = 'X'

OPTIONS = ITCPO