SAP ABAP Data Element RSSDLROUTTXTLG (Routine in Scheduler)
Hierarchy
SAP_BW (Software Component) SAP Business Warehouse
   BW-WHM-DST (Application Component) Data Staging
     RSSM (Package) BW: General monitoring and scheduling
Basic Data
Data Element RSSDLROUTTXTLG
Short Description Routine in Scheduler  
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 can define complex selections for InfoPackages using routines.

Routines are ABAP programs that consist of a pre-defined data declaration section and an ABAP form routine. In the form routine you can use all of the ABAP programming functions.

Procedure

After calling the editor for routine maintenance, you get the following program frame:

1. Selection routines for fields on tab page 'Data Selection':

program conversion_routine.


'$*$ begin of global - insert your declaration only below this line *-*
* TABLES: ...
* DATA: ...
*$*$ end of global - insert your declaration only before this line *-*
...
FORM COMPUTE_<Fieldname>
tables l_t_range structure rssdlrange
changing p_subrc like sy-subrc.
*$*$ begin of routine - insert your code only below this line *-*

data: l_idx like sy-tabix.
read table l_t_range with key
fieldname = <Fieldname>.
l_idx = sy-tabix.
*....
modify l_t_range index l_idx.

p_subrc = 0.

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

2. Selection routines for file names on tab page 'External Data':


FORM compute_flat_file_filename
changing p_filename like rsldpsel-filename
p_subrc like sy-subrc.
*$*$ begin of routine - insert your code only below this line*-*
p_filename =
*...
p_subrc = 0.

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

3. Selection routines for selecting the from and to date for time-dependent data on tab page 'Update Parameters'.


form compute_time_dependent_dates
changing p_datefrom type d
p_dateto type d
p_subrc like sy-subrc.
*$*$ begin of routine - insert your code only below this line*-*
p_datefrom =
p_dateto =
*...
p_subrc = 0.

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

4. Routines for determining the old requests to be deleted after successfully loading a new request.


form compute_<InfoCube-Name>
tables l_t_request_to_delete structure rsreqdelstruc
using l_request like rsreqdone-rnr
changing p_subrc like sy-subrc.
*Insert Source Code to decide if requests should be deleted.
*All Requests in table l_t_request_to_delete will be deleted
*from Infocube <InfoCube-Name>.
*Add new requests if you want to delete more (from this cube).
*Remove requests you did not want to be deleted.
*$*$ begin of routine - insert your code only below this line*-*

loop at l_t_request_to_delete.
*....
endloop.

clear p_subrc.

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

Note:
Those fields flagged with <...> are dependent on the selection fields and are filled automatically by the system when you call up the editor.

Make the following entries:

  1. Global data declarations
    Between *$*$ begin of global ... and *$*$ end of global ... you can define data declarations. These are avaliable in all the routines that you create on the 'Select Data' tab page.
    This means, for example, that you can use intermediate results in other routines or reuse the results of a routine when you call this routine again.
  2. The form routine FORM COMPUTE_<Field Name> has the following parameters:
    • l_t_range
    • The routines of all selection fields that are filled or that have routines are made available in table l_t_range.
      The routines are executed last in the scheduler. This means that all selections performed previously are liable to change.
    • p_subrc
    • You use the variable p_subrc to report an error to the scheduler. p_subrc <> 0 signifies an error and means that the data request is terminated.
  3. Insert your program coding for the routine between *$*$ begin of routine ... and *$*$ end of routine ... so that the variables l_t_range and p_subrc are filled with the appropriate values. You then transfer the routine by saving it using the Save function. You exit routine maintenance by leaving the editor.
  4. The form routine FORM compute_flat_file_filename has the following parameters:
    • p_filename:
    • You give the name of the file that is to be loaded in parameter p_filename.
      This is useful if your file name contains date dependencies that should be determined by sy-datum and calculated during runtime.
    • p_subrc
    • You use the variable p_subrc to report an error to the scheduler. p_subrc <> 0 signifies an error and means that the data request terminated.
  5. The form routine FORM compute_time_dependent_dates has the following paramters:
    • p_datefrom and p_dateto
    • Fill these parameters with the from- and to-dates for time-dependent master data and texts.
    • p_subrc
    • You use the variable p_subrc to report an error to the scheduler. p_subrc <> 0 signifies an error and means that the data request is terminated.

Note

All navigation options (e.g. goto the dictionary) and the syntax check are available in the editor for entering routines.

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