Start of Content Area

Background documentation Differences in Routine Concepts  Locate the document in its SAP Library structure

When implementing routines, only commands can be used which are allowed in ABAP objects.

Statements not conforming to ABAP objects are detected by the syntax check, and the corresponding alternatives are described in the ABAP online documentation.

Example:

Start routine old (update rule):

Loop at data_package.

…..

 Endloop.

 

Start routine new (transformation):

Loop at source_package ASSIGNING <source_fields>.

 endloop. 

The coding that previously used the data_package structure must also be modified.

Overview

The following table provides an overview of the special features of the ABAP form routines for the update and transfer rules compared with the routine in the transformation:

Form Routine for Update/Transfer Rule

Routine for Transformation

Addition OCCURS when the internal table is created

The OCCURS addition is not permitted.

You use the DATA statement to declare a standard table instead.

Internal table with header row

You should not use an internal table with a header row. You create an explicit work area with the LINE OF addition of statements TYPES, DATA, and so on, to replace the header row.

Direct operations such as INSERT itab, APPEND itab on internal tables

You have to use a work area for statements of this type.

Parameter COMM_STRUCTURE

SOURCE_FIELDS

Parameter ABORT <> 0

RAISE EXCEPTION TYPE CX_RSROUT_ABORT.

Parameter RETURNCODE <> 0

RAISE EXCEPTION TYPE CX_RSROUT_SKIP_RECORD (for key fields)

or

RAISE EXCEPTION TYPE CX_RSROUT_SKIP_VALUE (for non-key fields)

Subprograms are included in the global part of the routine using an INCLUDE

 

 

You cannot use INCLUDES.

You can convert these subprograms in the following ways:

1. Convert the subprograms into global, static methods.

2. Create a subroutine pool in the ABAP editor and execute these subprograms using PERFORM SUBROUTINE.

3. Define a function module that has the logic of the subprograms.

Function modules, methods or external subprograms can be called in the local part of the routine.

STATICS statement

The STATICS statement is not permitted in instance methods. Declared static attributes of the class can be used with CLASS DATA instead.

 

 

 

 

End of Content Area