Example: End Routine

Use

You use DataSource General Ledger: Transaction Figures (0FI_GL_1) to load data into DataStore object FIGL: Transaction Figures (0FIGL_O06).

You want to create an end routine to fill the additional InfoObject Plan/Actual Indicator (ZPLACTUAL). You also want the routine to read the Value Type field. If the value is 10 (actual), value A is written to the Plan/Actual Indicator InfoObject; if the value is 20 (plan), value P is written to the Plan/Actual Indicator InfoObject.

  1. You are in transformation maintenance. Choose Create End Routine. The routine editor opens.

  2. You enter the following lines of code:

The code loops through the result_package searching for values that have the value type 10 or 20. For these values, the appropriate value is passed on to InfoObject Plan/Actual Indicator (ZPLACTUAL).

  1. You quit the routine editor.

  2. You save the transformation. An edit icon next to the End Routine indicates that an end routine is available.