SAP ABAP Data Element RSROUTTXTLG (Routine in the update rules)
Hierarchy
SAP_BW (Software Component) SAP Business Warehouse
   BW-WHM-DST (Application Component) Data Staging
     RSAU_RSAA (Package) Routine
Basic Data
Data Element RSROUTTXTLG
Short Description Routine in the update rules  
Data Type
Category of Dictionary Type D   Domain
Type of Object Referenced     No Information
Domain / Name of Reference Type TEXT60    
Data Type CHAR   Character String 
Length 60    
Decimal Places 0    
Output Length 60    
Value Table      
Further Characteristics
Search Help: Name    
Search Help: Parameters    
Parameter ID   
Default Component name    
Change document    
No Input History    
Basic direction is set to LTR    
No BIDI Filtering    
Field Label
  Length  Field Label  
Short 10 Routine 
Medium 20 Routine 
Long 40 Routine 
Heading 60 Routine 
Documentation

Definition

You use routines to define complex update rules for a key figure or a characteristic.

Routines are ABAP programs that consist of a pre-defined global data declaration part and an ABAP form routine. All of the ABAP programming functions are available in the form routine.

The following routine types are used in the update process:

Procedure

Make the following entries:

  1. Between *$*$ begin of global ... and *$*$ end of global ... you define global data declarations included in all the routines.
    In this way, you can use subtotals in other routines or you can re-use the results of the first call when calling up the same routine again.

    Note:

    During serial loading (processing option PSA and up in data targets this global data remains as long as the process continues to exist. For this reason, there must be a REFRESH statement in internal tables. This is not necessary for parallel loading since an individual process is created for each data package.

  2. The form routine has the following parameters (valid for all routines except the start routine):
    • MONITOR: Used for user-defined monitoring
    • MONITOR_RECNO: A record number can be specified for the monitor
    • COMM_STRUCTURE: In the variable COMM_STRUCTURE, the routine of the record you want to update for the communication structure is made available.
    • RECORD_NO: In the variable RECORD_NO, the number of the current transaction data record is made available in the form of a communication structure.
    • RECORD_ALL: In the variable RECORD_ALL, the number of transaction data records is made available in the form of a communication structure.
    • SOURCE_SYSTEM: The technical name of the source system is given in the variable SOURCE_SYSTEM.
    • RESULT: You must assign the result of the calculated key figure or the calculated characteristic to the variable RESULT.
    • RETURNCODE: You use the variable RETURNCODE to control writing to the data target. Only when RETURNCODE equals 0 is the calculated RESULT Value written to the data target.
    • If RETURNCODE<> is <> 0, there are two behavior patterns, depending on whether it is a characteristic (key field in InfoCube) or a key figure (a data field):
      For key fields, the data record is skipped and the next data record is processed. For key figures, key figure processing ends and the content of the corresponding key figure is initialized and transferred to the target table.
      Caution: This behavior is not problematic when you update additively because in that case only a 0 is added. For minimum and overwrite update modes, however, this behavior is problematic. You should not use a RETURNCODE here, because otherwise existing entries will be initialized, that is, existing etnries will be overwritten by initial values.
    • Abort: If Abort <> 0 then the entire update process is terminated. This can be helpful in the case of serious errors.
  3. Insert your program code for the routine between *$*$ begin of routine ... and *$*$ end of routine ..., so that the variables RETURN and RETURNCODE are supplied with the corresponding values.
  4. Check the syntax of your routine with the Check function, and use the Save function to transfer the routine.

    Leaving the Editor ends the maintenance session for the routine.

Example

Note

All navigation options (for example, "Goto Dictionary") as well as the syntax check are available in the editor for you to use when you are composing a routine.

History
Last changed by/on SAP  20130604 
SAP Release Created in