SAP ABAP IMG Activity /IPRO/MGT_VAR (Define Variables)
Hierarchy
SAP_BS_FND (Software Component) SAP Business Suite Foundation
   CA-GTF-DOB (Application Component) Document Builder
     /IPRO/PROGS (Package) programs
IMG Activity
ID /IPRO/MGT_VAR Define Variables  
Transaction Code /IPRO/17000029   (empty) 
Created on 20040304    
Customizing Attributes /IPRO/MGT_VAR   Define Variables 
Customizing Activity /IPRO/MGT_VAR   Define Variables 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name /IPRO/MGT_VAR    

Use

In this step you define variables. Variables are used to map data from external programs, such as element fill-ins, and in the dialog process as well. The end result is a variable tree that is used to determine the content of a document. Once you have defined the variable tree, you must execute the report in Display Output as WSDL to convert the variable tree by means of the Web Service Description Language generator (WSDL) to an XML message that is eventually mapped on the SAP NetWeaver Exchange Infrastructure. Mapping with the external document is eventually required.

In SAP Document Builder, the following variable types are used:

  • Simple variables
    Simple variables are standalone variables. When a variable is used in the dialog process, each variable is actually a question that determines the contents of a document. Each variable can be linked to a reference help text, which is a part of a regulation set. Data can be mapped into a simple variable from an external source.
  • Structure variables
    Structure variables enable you to group variables according to functional similarity. Before defining variables, however, you must define a structure (or root variable) for the highest node in the Document Data Tree, which may contain dependent structures and simple variables. Once you have defined the root structure, you must perform the activity Define Contents and enter the newly defined root structure.
  • Table variables
    Table variables can be used for forms, reports and clause selection. Table variables are rendered in elements as tables, with each structure being a row.
    To create a table variable, you must create:
    • The simple variables it will contain
    • A structure
    • The table variable that specifies a name and key field for the table. You can insert the table variable into a standard element at a later stage.

In order for SAP Document Builder to work, all variables must be assigned to the highest node structure or an underlying structure. To identify orphaned simple variables, run report List Unstructured Simple Variables .

Note 1

Due to the high volume of entries, we strongly recommend that you first plan a naming convention for easier maintenance and retrieval. To find a variable either by ID, text, reference or reference text, choose Search variables in the toolbar.

Note 2

If you plan to use variables as search criteria for templates and documents in a search generated using the classification system, the following limitations apply:

  • Variables of type CHAR are not allowed to have more than 30 digits
  • Variables of type DATE requires the use of the 10-digit format, not 8
  • Variables of type CURR are not allowed to have more than 15 digits

Note 3

We recommend not deleting variables in a productive system as you may encounter errors when trying to open previously saved and released documents. We recommend setting such variables to Inactive instead of deleting them.

Note 4

You cannot edit documents that have been created as a result of reorganizing simple, table, and structure variables into different structure variables. Reorganizing variables should be done in the testing phase prior to production.

Requirements

Standard settings

Activities

To create a simple variable, proceed as follows:

  1. Choose Simple Variables in the dialog structure.
  2. Choose New Entries.
  3. Enter a variable name and description.
  4. Enter a content modifier if applicable.
  5. Select an existing data element or create one in the ABAP Dictionary if necessary. Data elements are required for radio buttons and list boxes.
  6. Specify a default value. Enter either an X ('Yes') or a blank ('No') for an indicator.

Note: If you want to create a default value for a variable which exceeds 30 characters, you can use a standard text as your default value. You create standard texts using transaction SAPscript: Standard Texts (so10). You then enter the name of a standard text in the Default Value field and select the Use Std Text checkbox. We recommend that you use the same name for the standard text as for the variable.

  1. Set the Constant indicator if required. A constant may be useful for element rules when the same value is reused more than once within different rules.
  2. Specify in which presentation type (form) the variable should be displayed. For options and listboxes, you must specify the relevant data element, which contains the applicable domain:
    • Data field
      Used to capture a string, date or number.
    • Indicator
      Used for multiple selections within a structure.
    • Option
      Used to display all possible answers on the screen.
    • List box
      User must open the listbox to view the options.
    • Text area
      Used to capture a long string that spans multiple lines. You must select a data element with STRING as its domain to configure a variable as a text area.
  3. Enter a currency variable if required. This provides a currency type (for example USD, United States Dollar) and amount on the screen while authoring a document. It also enables you to edit the currency type or amount. To do so, you need to set up a generic currency variable, which may be reused for many others.
    Each currency variable has an associated currency type. Both are represented as simple variables.
    To create a currency type variable and a currency variable:
    1. Create a currency variable as a simple variable, for example CURR_VAR.
    2. Define the data element as currency type (for example CURCY). You may want to create a new data element in the Data Dictionary.
    3. Assign a default value, such as USD.
    4. Assign the newly created variable to a structure.
    5. Create a simple variable, for example. EST_VALUE.
    6. Define the data element type as currency type data element (for example LS_CURR16). Note that this data element is different than the currency type variable data element.
    7. Set its currency variable to the currency type you have previously created, for example CURR_VAR.
    8. Assign the newly created variable to a structure.
    9. Enter a unit of measure if applicable. Perform this step when you create a variable that has a unit of measure. Follow the same steps as defined for a currency variable but use data elements to suite your needs for units of measure.
    10. Enter a validator class if applicable. This is an optional technical step and is not used in most cases. A validator class is useful when you want to apply a complex validation to a variable that is not supported by the Data Dictionary. In addition to specifying the class name in this field, you must create the relevant class.
  4. Select a fill-in owner when applicable. This information is displayed in the Document Summary to the document author.
  5. Enter a text for this variable. This information is displayed in the form of a label to the document author.
  6. Save your entries.

To create a structure variable:

  1. Choose Structure Variables in the dialog structure.
  2. Choose New Entries.
  3. Enter a name.
  4. Enter a content modifier if applicable.
  5. Set the Display indicator if you want to display all the questions (simple variables) contained in the structure. If not set, the system relies on the element rules to determine which questions to ask. This may be useful if you have a structure, such as 'Contract Type', that you always want to ask about every contract type when the contract type question is asked. Alternatively, you may have a group called 'Miscellaneous' that contains many functionally unrelated questions and you never want all the questions to appear unless the system determines that they are all required.
  6. Enter a a description.
  7. Save your entries.

To define the variables contained in the newly created structure, select the structure and choose Variables contained in the dialog structure.

  1. Choose New Entries.
  2. Select a variable.
  3. Specify the sort order. We recommend that you use increments greater than 1 (for example 10, 20, 30, etc.) in case you decide to reorder your variables or add new ones.
  4. Repeat these steps for any further variables.
  5. Save your entries.

To create a table variable:

  1. Create a structure containing the simple variables required for the table.
  2. Choose Table Variables in the dialog structure.
  3. Choose New Entries.
  4. Enter a name.
  5. Enter a content modifier if applicable.
  6. Select the variable structure you have created in step 1. This structure represents the structure of the table.
  7. Enter a description.
  8. Enter a key field.
  9. Save your entries.

Example

Business Attributes
ASAP Roadmap ID 203   Establish Master Data 
Mandatory / Optional 1   Mandatory activity 
Critical / Non-Critical 1   Critical 
Country-Dependency A   Valid for all countries 
Assigned Application Components
Documentation Object Class Documentation Object Name Current line number Application Component Application Component Name
SIMG /IPRO/MGT_VAR 0 HLB0009110 Cross-Application Components 
Maintenance Objects
Maintenance object type C   Customizing Object 
Assigned objects
Customizing Object Object Type Transaction Code Sub-object Do not Summarize Skip Subset Dialog Box Description for multiple selections
/IPRO/VAR_MGT C - View cluster SM34  
History
Last changed by/on SAP  20070502 
SAP Release Created in 10A