Start of Content Area

Controlling Print Output  Locate the document in its SAP Library structure

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.

TDPAGESLCT

SAPscript: select print page

TDPREVIEW

SAPscript: show print view

TDNOPREV

SAPscript: disable print view

TDNOPRINT

SAPscript: disable printing from within print view

TDTITLE

SAPscript: text for tiltle line in the output selection screen

TDPROGRAM

SAPscript: program name for replacing symbols

TDTEST

SAPscript: test printout

TDIEXIT

SAPscript: return immediately after printing

TDGETOTF

SAPscript: return OTF table, no print output

TDSCRNPOS

SAPscript: display position of OTF on screen

   

TDDEST

Spool: name of the output device

TDPRINTE

Spool: name of the device type

TDCOPIES

Spool: number of copies

TDNEWID

Spool: new request

TDIMMED

Spool: print request immediately

TDDELETE

Spool: delete request after printing

TDLIFETIME

Spool: retention time of the request

TDDATASET

Spool: identification of the request

TDSUFFIX1

Spool: suffix 1 of the request

TDSUFFIX2

Spool: suffix 2 of the request

TDAUTORITY

Spool: authorization for a request

TDARMOD

Spool: archiving mode

TDCOVER

Spool: print cover page

TDCOVTITLE

Spool: cover page: title text

TDRECEIVER

Spool: cover page: recipient name

TDDIVISION

Spool: cover page: division name

   

TDSCHEDULE

SAPcomm: type of scheduled send time

TDSENDDATE

SAPcomm: requested send date

TDSENDTIME

SAPcomm: requested send time

TDTELELAND

SAPcomm: country key of recipient country

TDTELENUM

SAPcomm: telecommunications partner

 

TDPAGESLCT: SAPscript: select print page

The field contains the page specifications of the pages to be printed. You can specify individual pages, page intervals, and a combination of both. If the field is empty, the system prints all pages.

The page numbers refer to the physical pages of the SAPscript printout, not to the logical page numbering of the form.

Example:

4

only page 4

2-5

pages 2 to 5, included

20

from beginning to page 20, included

3-

from page 3 to end

 

 

To combine these variants, separate the different specifications with commas:

prints the pages 4, 8 to 10, and then from page 15 to the end.

The user can change the values proposed in this field on the selection screen.

 

TDPREVIEW: SAPscript: print view

The field determines whether SAPscript shall create a print view. You can then see on the screen exactly what the printout will look like later. In background processing, the system does not interpret this field. It always creates a spool request.

Possible values:

‘X’

print view wanted

‘ ‘

no print view wanted

 

TDNOPREV: SAPscript: disable print view

On the print selection screen, the user can choose to display the print view of the SAPscript output on the screen. If you want to disable this function, use field TDNOPREV.

Possible values:

‘X’

disable print view function

‘ ‘

allow print view function

 

TDNOPRINT: SAPscript: disable printing from within print view

Use this field to determine whether the user is allowed to start the printing process from within the print view of a SAPscript text. If, for example, the application program shall control print output independent of any user entries, activate this field.

Possible values:

‘X’

printing from within print view disabled

‘ ‘

Printing from within print view allowed

TDTITLE: SAPscript: text for title line of print selection screen

The text in this field is displayed in the title line of the print selection screen.

 

TDPROGRAM: SAPscript: program name for replacing symbols

To replace program symbols, SAPscript must know in which active program to find the work areas for the corresponding values. If no program is specified in this field, the system looks in the program that was called first (program name from SY-CPROG); otherwise in the data area of the program specified here.

The program name is valid during the entire print process. With form printing, however, you can specify a new program name when calling the function module START_FORM. This new program name is then valid until the next END_FORM. Afterwards, the system uses the program name specified in TDPROGRAM again.

SAPscript accesses the table fields of this program using a dynamic ASSIGN with the program name specified here. If no program name is entered or if the program has not been loaded yet, the system treats the symbol as text symbol.

 

TDTEST: SAPscript: test printout

Use this field to format a text for printing in a test mode. This means that the system does not replace the symbols in the text with their current values. Instead, it represents all output positions of a symbol value using 'X'.

Possible values:

‘X’

format text in test mode

‘ ‘

format text as usual

 

TDIEXIT: SAPscript: return immediately after printing

Use this parameter to determine whether to return to the application program immediately after printing the text from within the print view. Usually, the system remains in the print view.

Returning to the application program may be necessary, if a text is to be printed only once or if the print view is no longer needed after printing.

Possible values:

‘X’

leave print view immediately after printing

‘ ‘

remain in print view after printing

 

TDGETOTF: SAPscript: return the OTF table

If you enter ‘X’ in this field, the SAPscript composer produces the print format as usual, but does not pass it to the spool or print view. Instead, it passes the OTF format created to the calling program for further processing, using the table parameter OTFDATA of the function modules PRINT_TEXT and CLOSE_FORM.

Possible values:

‘X’

return output format

‘ ‘

pass output format to spool or print view

 

TDDEST: Spool: name of the output device

Specify the name of the device on which you want to output the formatted SAPscript text. If you enter ‘*’ or leave the field empty, the system uses the default value specific in the user master record of the active user. If, in this case, no printer is specified in the user master record, the system displays the print selection screen, even if you wanted to suppress the dialog when calling the function modules PRINT_TEXT or OPEN_FORM (parameter DIALOG).

The user can change the value proposed on the selection screen.

 

TDPRINTER: Spool: name of the device type

Usually, this field is empty. On the selection screen, the user can choose among all existing printers. However, if you want to ensure that the text is output on printers of a certain type only, you can specify the device type in this field. On the selection screen, the system then offers only the printers of this type.

Note

The device type you specify must be defined in table TSP0A. To find these types out, use the spool administration (transaction SPAD).

TDCOPIES: Spool: number of copies

Specify how often you want the spool to print a text. ‘1’ means that the entire text is printed once (default). If you specify '2', the system prints all pages twice. SAPscript internally replaces the value '0' with ‘1’.

When you create more than one copy, the sequence of the printed pages is 1-2-3..., 1-2-3...

The user can change the proposed value on the print selection screen.

TDNEWID: Spool: new spool request

This field determines whether to append the current spool request to an existing request with the same attributes or whether to create a new request. To append a request to another, the values of the fields Name, Output device, Number of copies and the Formatting mode must be the same, and the existing spool request must still be active. This is no longer the case, if a spool request is released to printing. If the system does not find a matching spool request, it always creates a new one.

Possible values:

‘X’

create a new spool request

‘ ‘

find a matching spool request for appending

The user can change the proposed value on the print selection screen.

TDIMMED: Spool: print request immediately

Use this field to determine whether to send the print request to the output device immediately after completing it. Otherwise, you must use the spool print control (transaction SP01) to release the print request.

Possible values:

‘X’

print request immediately after completing it

‘ ‘

keep request in spool after completing it

The user can change the proposed value on the print selection screen.

 

TDDELETE: Spool: delete request after printing

Use this field to determine whether to delete the spool request immediately after printing it on the output device or whether to keep it for the spool retention period.

Possible values:

‘X’

delete immediately after printing

‘ ‘

delete after retention time has expired

The user can change the proposed value on the print selection screen.

 

TDLIFETIME: Spool. retention time of the request

This field determines for how many days the system keeps a request in the spool before deleting it. If the field is empty, SAPscript inserts the default value '8'.

The user can change the proposed value on the print selection screen.

 

TDDATASET: Spool: identification of the request

The field is the first component of the three-part identification of the spool request (including also the fields TDSUFFIX1 and TDSUFFIX2). There is no naming convention for the identification. If your application uses a certain convention, see the corresponding application documentation.

If the field is empty, SAPscript enters the value SCRIPT.

The user can change the proposed value on the print selection screen.

 

TDSUFFIX1: Spool: suffix 1 of the request

Second part of the identification of the spool request. See also the description of field TDDATASET.

If the field is empty, SAPscript enters the output destination (TDDEST).

The user can change the proposed value on the print selection screen.

 

TDSUFFIX2: Spool: suffix 2 of the request

Third part of the identification of the spool request. See also the description of field TDDATASET.

If the field is empty, SAPscript enters the name of the user.

The user can change the proposed value on the print selection screen.

 

TDAUTORITY: Spool: authorization for request

This field defines an authorization value for the spool request. Only users with the specified authorization can display or print the contents of the spool request.

The spool print control (transaction SP01) checks whether the authorization object S_SPO_ACT (spool actions) of the user contains the specified value.

The user can change the proposed value on the print selection screen.

 

TDARMOD: Spool: archiving mode

Use this field to determine whether only to print a request or whether to store it in the optical archive as well.

Possible values:

‘1’

only print request (default)

‘2’

only archive request

‘3’

print and archive request

The user can change the proposed value on the print selection screen.

 

TDCOVER: Spool: print cover page

This field determines whether the printout includes a cover page containing information such as recipient name, division name, format used, and so on.

Possible values:

‘X’

print cover page

‘ ‘

suppress cover page

‘D’

print cover page depending on the setting of the respective output device.
(see definition of the device in the spool administration (transaction SPAD), in the column output devices)

The user can change the proposed value on the print selection screen.

 

TDCOVTITLE: Spool: cover page: title text

This field contains a text describing the spool request. It appears on the cover page.

The user can change the proposed value on the print selection screen.

 

TDRECEIVER: Spool: cover page: recipient name

You can specify the name of the user who receives the spool request. The system prints this name on the cover page. The default value is the name of the current user.

The user can change the proposed value on the print selection screen.

 

TDDIVISION: Spool: cover page: division name

This field contains the name of the division to which the user belongs. The system prints this name on the cover page.

The user can change the proposed value on the print selection screen.

 

TDSCHEDULE: SAPcomm: type of scheduled send time

Use this field to determine whether to send a spool request via the SAP communication interface immediately or whether to wait for the night.

Possible values:

‘IMM’

send request immediately

‘NIG‘

send request during the night

 

If the field is empty, the system uses the default value ‘IMM’.

The user can change the proposed value on the print selection screen.

 

TDSENDDATE: SAPcomm: requested send date

In this field, enter the date on which to send the print request via the SAP communication interface.

The user can change the proposed value on the print selection screen.

 

TDSENDTIME: SAPcomm: requested send time

In this field, enter the time at which to send the print request via the SAP communication interface.

The user can change the proposed value on the print selection screen.

 

TDTELELAND: SAPcomm: country key for recipient country

According to the country key specified in this field, the SAP communication interface determines the country-specific area code and uses it as prefix to the telephone number of the telecommunications partner specified in field TDTELENUM.

The user can change the proposed value on the print selection screen.

 

TDTELENUM: SAPcomm: number of telecommunications partner

In this field, enter the number of the desired telecommunications partner is the way it is dialed in the recipient country. The system automatically includes the area code which you specify in the field TDTELELAND.

To switch off automatic number check and prefixing with the area code, start the number in this field with '&'. In this case, you must specify the entire number, including area code, but without operator call.

The telephone number must be of a certain format:

TELEFAX

Allows only digits and the characters ‘ ( ‘, ‘ ) ’, ‘ / ’, ‘ - ’, and ‘ . ' as well as blanks.

TELEX

Allows only digits, the letters A to Z, and blanks. The number must have the following structure:

nnn...n aaaa..a ccc

'n'

digits that form the numeric part of the telex identification

‘a'

letters that for the alphanumeric part of the telex identification

‘ccc’

consists of one, two, or three letters and corresponds to the country key

 

TELETEX

Allows only digits and the letter A to Z. The number must have the following structure:

nnn...n=aaaa..a

‘n'

digits thst form the numeric part of the teletex identification

'a'

etters that form the alphanumeric part of the teletex identification

 

 

The user can change the proposed value on the print selection screen.