Syntax documentation*DESTINATION_APP Locate this document in the navigation structure

The DESTINATION_APP keyword allows you to write the results of calculations to a different application.

Syntax

*DESTINATION_APP = {app name}

Often, the destination application shares only some of the dimensions of the original application. In this case, the missing dimensions can be dropped from the original records with the instruction:

*SKIP_DIM= {dimension name}[,{dimension name},…]

When the original application has dimension that are not found in the destination application, the SKIP_DIM keyword is mandatory. Validation cannot pass without the SKIP_DIM keyword.

Multiple dimension names can be supplied to the instruction separated either by commas or by multiple SKIP_DIM instructions entered on separate lines.

If the destination application has dimensions that do not exist in the original application, these can be added to the passed records, using the instruction:

*ADD_DIM {dimension name}={value}[,{dimension name}={value},…]

Multiple dimension names and values can be supplied to the instruction separated either by commas or by multiple ADD_DIM instructions entered on separate lines.

The keyword RENAME_DIM can be used, to change name of one or more dimensions. The syntax is:

*RENAME_DIM {dimension name}={value}[,{dimension name}={value},…]

This instruction can be used when data is to be written into an application where a dimension is named with a different ID.

Multiple dimension names and values can be supplied to the instruction separated either by commas or by multiple RENAME_DIM instructions entered on separate lines.

Any combination of the three keywords, above, are supported.

Examples
Example 1

AppSet: APSHELL_V

Application: PLANNING

In this example, APSHELL_V is a copy of APSHELL and COPY_PLANNING is a copy of the PLANNING application. You can execute the script, shown in this example, in a PLANNING application to copy ACTUAL data to the COPY_PLAN application.

If the *DESTINATION_APP command appears once in the middle of the script, all remaining data writing of the script logic file occurs in the referenced destination application. Any data writes before the *DESTINATION_APP are written in the application where the script is currently being run.

Syntax Syntax

  1. *XDIM_MEMBERSET TIME = 2006.AUG
  2. *XDIM_MEMBERSET CATEGORY=ACTUAL
  3. *DESTINATION_APP=COPY_PLANNING
  4. *WHEN CATEGORY
  5. *IS "ACTUAL"
  6. *REC(EXPRESSION=%VALUE%)
  7. *ENDWHEN
End of the code.
Example 2

To explain DESTINATION_APP with SKIP_DIM, ADD_DIM, and RENAME_DIM, another application DETAIL_PLAN is created by copying the PLANNING application from the delivered APSHELL. It is necessary to:

  • Create new dimensions PRODUCT and MARKET and add these to the DETAIL_PLAN application

  • Replace P_ACCT with P_ACCTDETAIL

  • Remove the P_ACTIVITY dimension from the DETAIL_PLAN cube

Syntax Syntax

  1. *XDIM_MEMBERSET TIME = 2006.AUG
  2.  *XDIM_MEMBERSET CATEGORY=ACTUAL
  3. *DESTINATION_APP=DETAIL_PLAN
  4. *SKIP_DIM = P_ACTIVITY
  5. *ADD_DIM P_DATASRC=INPUT, PRODUCT = NO_PRODUCT, MARKET = NO_MARKET
  6. *RENAME_DIM P_ACCT=P_ACCTDETAIL
  7. *WHEN CATEGORY
  8. 	*IS "ACTUAL"
  9. 	*REC(EXPRESSION=%VALUE%)
  10. *ENDWHEN
End of the code.

Explanation

DETAIL_PLAN is the target application, which has all dimensions of PLANNING except for P_ACCT. This dimension is replaced with P_ACCTDETAIL. Also, DETAIL_PLAN has two additional dimensions, namely PRODUCT, and MARKET.

The above script logic moves the data into DETAIL_PLAN with:

  • Blank data in the PRODUCT and MARKET dimensions

  • P_DATASRC defined by the keyword INPUT

  • corresponding values of P_ACCT copied to P_ACCTDETAIL

Any software coding and/or code lines / strings ("Code") included in this documentation are only examples and are not intended to be used in a productive system environment. The Code is only intended to better explain and visualize the syntax and phrasing rules of certain coding. SAP does not warrant the correctness and completeness of the Code given herein, and SAP shall not be liable for errors or damages caused by the usage of the Code, except if such damages were caused by SAP intentionally or by its gross negligence.