Show TOC

Methods Maintenance

You can carry out complex statistical data transformations by using methods.

To reach methods maintenance in Copy Management, proceed as follows:

A method consists of management information and an ABAP/4 FORM routine.

Complex transformations are carried out in the FORM routine (e.g. data enhancement; updating in accordance with the master data).

If methods had already been created, a list appears first which contains all existing methods. From this list you can select and maintain a method. The source information structure (and target info structure) must, however, be compatible with the method you choose.

If no methods have been created yet, you branch directly into the detail screen of methods maintenance.

You need to make the following specifications in the detailed screen:

By double-clicking on the field Program or FORM routine, you branch into the editor for maintaining the program, as long as the program has already been created.

If you have not yet created the program, a popup appears when you double-click on the Program field and asks you to create the program. The program is usually created without TOP_INCLUDE. When you maintain the program attributes, you need to enter "subroutine" as the type.

SAP provides several transformation scenarios in the work table to support and facilitate the creation of methods. Each scenario consists of both a detailed business description (documentation) and one or more reference methods which the system automatically adapts to the information structure that you have chosen, copies to the clipboard, so that they can then be used when you create a method.

Caution

Automatic adaption to the source and target information structures only takes place if you call up a reference method via the pushbutton Copy from.

You can also call up a reference method from the documentation that is assigned to it. Here, however, the system cannot perform automatic adaption.

Technical information

The FORM routine must have the following interface:

FORM DEMO_SAP TABLES OUTPUT STRUCTURE S$$$
CHANGING INPUT STRUCTURE Sxxx
RETURNCODE.

Sxxx indicates the table for the source information structure (e.g. S001, S501); S$$$ indicates the table for the target information structure.

If you set the variable RETURNCODE = 0, the data record will be written into the target information structure.

If you set the variable RETURNCODE <> 0, no update will take place because an error has occurred while reading supplementary information, for example.

Note

The system proposes the interface for a method under "General scenario".