The control variable C is a global variable that exists in each application form. It contains technical data for the application form or the print environment that is relevant for the current print transaction. The variable has a fixed structure and is defined globally which means that it can be queried at any time in texts or user exits.
The variable C enables you to request global information for the application form or the print environment so that you can interpret and process this information either locally in the form or externally.
The variable C consists of two parts. The first part is transferred to the Smart Form. This corresponds to the DDIC structure EFG_STRN_PRINTDATA:
Field |
Name |
LANGU |
Current language for the form |
DEVICE |
Current output type (PRINTER, TELEFAX)) |
RDI |
SAPscript indicator for RDI |
FORMKEY |
Current application form |
FORMCLASS |
Current form class |
ITCPO |
Input print parameter for SAPscript as ITCPO structure |
ARCHIVE_INDEX |
Parameters for archiving (BOR object type, BOR object ID, archive object type) |
COMM_TYPE |
BCI send type (INT, FAX, RML) |
SENDTYPE |
send type |
SENDTYPE_EXT |
External send type |
COPYFLAG |
Document is a copy |
TESTMODE |
Test print |
ITCPP
|
Print parameter returned by SAPscript as ITCPP structure |
XSF |
XSF indicator for print using Smart Forms: |
COLLECTION |
Name of collection (if integrated in a collection) |
IDENTIFICATION |
Identification from collection (if integrated in a collection) |
GET_PWB_DATA |
Returns data on the caller |
ADDITIONAL_PARAM |
Parameter specified by the application for controlling print-relevant parameters |
XFP |
Output format of PDF-based forms |
The second part of the variable contains further fields:
Field |
Name |
TABIX |
Count variable for the current loop |
LINES |
Number of entries in the current loop |
FORMTYPE |
Form type (Smart Form of SAPscript) |
NO_ENTRY |
Last form level has no entry |
PA_PRINT |
Print action records should automatically be printed. |
PA_UPDATE |
Print action records to be updated |
FORM_LEVEL |
Current form level |
LEVEL_NUMBER |
Number of form level if multiple selection in the hierarchy |
RDI_RESULT |
SAPscript return structure if RDI has been used |
SAP_FORM |
Name of SAPscript form |
SMARTFORM |
Name of Smart Form |
T_LANGU |
Table of valid languages |
REC_STRING |
Recipient for send type (e-mail address, fax number, user name) |
SEND_STRING |
Sender for send type (e-mail address, fax number, user name) |
MANDT |
Client of form |
RDI |
RDI indicator |
SMARTPRINT |
Indicator whether Smart Form is to be called |
SMARTFILL |
Indicator whether the data is to be filled in the complex data types (default ‘X’) |
SF_RESULT |
Return result of Smart Form call (structure SSFCRESCL) |
SF_OUTPUT_OPTIONS |
Output options for Smart Forms (structure SSFCOMPOP) |
SF_CONTROL_PARAMETERS |
Smart Forms: Control structure (structure SSFCTRLOP) |
You can use the variable C at any time in texts (for example, &C-TABIX&) or in user exits. You can also change the variable; however, this is only recommended in a few cases. Via Extras ® Display Control Variable, you can display the most important fields of variable C. You can display a complete list of all fields by displaying the structure EFG_STRN_PRINTDATA_EXPANDED in the ABAP Dictionary.
The variable C is globally defined in the generated print program. It is filled by the print program and interpreted later for further processing, for example, the print parameters in C-ITCPO. The variable is also defined in the form class library and can be used there, for example, to query the form type.