SAP ABAP Data Element RSROUTTXT1 (Start Routine in the Update Rules)
Hierarchy
SAP_BW (Software Component) SAP Business Warehouse
   BW-WHM-DST (Application Component) Data Staging
     RSAU (Package) Update
Basic Data
Data Element RSROUTTXT1
Short Description Start 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

The start routine only has the parameters MONITOR, MONITOR_RECNO, DATA_PACKAGE, RECORD_ALL, SOURCE_SYSTEM, and ABORT. DATA_PACKAGE is the complete data package here. The start routine has no return value. Its purpose is to execute preliminary calculations and to store them in a global data structure. You can access this structure or table in the other routines.

Use

Dependencies

Example

The following routine shows an example for a start routine that stores the master data of InfoObject "SALESMNG" in the g_t_sales table, and terminates the load process with an appropriate message when an error occurs.

PROGRAM UPDATE_ROUTINE.

*$*$ begin of global - insert your declaration only below this line

*-*

* TABLES: ...

DATA: g_t_sales LIKE /bic/msalesmng OCCURS 0.

*$*$ end of global - insert your declaration only before this line

*-*

FORM startup

TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring

DATA_PACKAGE STRUCTURE /BI0/CSSELLING

USING RECORD_ALL LIKE SY-TABIX

SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS

CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update

*

*$*$ begin of routine - insert your code only below this line

*-*

* fill the internal table "MONITOR", to make monitor entries

CALL FUNCTION 'RSAU_READ_MASTER_DATA'

EXPORTING

i_iobjnm = 'SALESMNG'

I_CHAVL =

I_T_CHAVL =

I_DATE =

I_FLG_WHOLE_TABLE = 'X'

I_ATTRNM =

IMPORTING

E_STRUCTURE =

E_TABLE = G_T_SALES

E_ATTRVAL =

EXCEPTIONS

READ_ERROR = 1

NO_SUCH_ATTRIBUTE = 2

WRONG_IMPORT_PARAMETERS = 3

CHAVL_NOT_FOUND = 4

OTHERS = 5

.

IF sy-subrc <> 0.

MONITOR-msgid = sy-msgid.

MONITOR-msgty = sy-msgty.

MONITOR-msgno = sy-msgno.

MONITOR-msgv1 = sy-msgv1.

MONITOR-msgv2 = sy-msgv2.

MONITOR-msgv3 = sy-msgv3.

MONITOR-msgv4 = sy-msgv4.

append MONITOR.

* if abort is not equal zero, the update process will be canceled

ABORT = 1.

ENDIF.

*$*$ end of routine - insert your code only before this line

*-*

*

ENDFORM.

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