Start of Content Area

Background documentation Example: Use of Parameter Views  Locate the document in its SAP Library structure

The following example shows how to use parameter views in your own function modules. This example shows how a parameter view is used, which has been defined at function level.

Note If you want to use a parameter view, you need to take into account various criteria. For more information, see: Parameter Views at Tool Level

Prerequisite

You have created a commission case with a valuation. The ZZJABEIT field contains the annual contribution.

The tool from the example Create Your Own Tool is enhanced. You can use the parameter view to manually enter a percentage that is used in the function module.

Activities

  1. Create the table ZTEST_LOS_OD_PR with the following fields:

Field Name

Field
Type

.INCLUDE

CACS_S_LOS_ST_OD_K

PERCENTAGE

APROZENT

.INCLUDE

CACS_S_VERS1

The APROZENT field type is an integer field that contains the percentage.

The CACS_S_VERS1 include contains fields for versioning.

The CACS_S_LOS_ST_OD_K include contains the following keys for the table:

Field Name

Field Type

Description

MANDT

MANDT

Client

APPL

CACSAPPL

ID of commission application

OBJ_TYPE

CACS_LOS_OTC

Object type class (OTC) for the logical service

OBJ_METHOD

CACS_LOS_METH

Assigned method for the object type class of the logical service.

TOOL

CACS_LOS_TOOL

Tools for the logical service

TOOLFUNCTION

CACS_LOS_TOOLFUNCTION

Assigned function for the tool for the logical service

OBJ_ID

CACS_LOS_OBJID

Identification of the calculating object

VERSION

CACSVERSION

Master data or Customizing object version

  1. Create the ZVZTEST_LOS_ODPR view. This is based on the ZTEST_LOS_OD_PR table. Ensure that the fields contain the following attributes:

View Field

Table

Field

Maintenance Attribute

Key

MANDT

ZTEST_LOS_OD

MANDT

 

X

APPL

ZTEST_LOS_OD

APPL

S

X

OBJ_TYPE

ZTEST_LOS_OD

OBJ_TYPE

S

X

OBJ_METHOD

ZTEST_LOS_OD

OBJ_METHOD

S

X

TOOL

ZTEST_LOS_OD

TOOL

S

X

TOOLFUNCTION

ZTEST_LOS_OD

TOOLFUNCTION

S

X

OBJ_ID

ZTEST_LOS_OD

OBJ_ID

S

X

VERSION

ZTEST_LOS_OD

VERSION

G

X

PERCENTAGE

ZTEST_LOS_OD

PERCENTAGE

   

BUSI_BEGIN

ZTEST_LOS_OD

BUSI_BEGIN

   

BUSI_END

ZTEST_LOS_OD

BUSI_END

   

TECH_BEGIN

ZTEST_LOS_OD

TECH_BEGIN

H

 

TECH_END

ZTEST_LOS_OD

TECH_END

H

 

FLG_CANCEL_OBJ

ZTEST_LOS_OD

FLG_CANCEL_OBJ

H

 

FLG_CANCEL_VERS

ZTEST_LOS_OD

FLG_CANCEL_VERS

H

 

CHG_TCODE

ZTEST_LOS_OD

CHG_TCODE

H

 

CHG_USR

ZTEST_LOS_OD

CHG_USR

H

 

TRI_METH_TYP

ZTEST_LOS_OD

TRI_METH_TYP

H

 

TRI_METH_TARGET

ZTEST_LOS_OD

TRI_METH_TARGET

H

 

STATUS_VERSION

ZTEST_LOS_OD

STATUS_VERSION

H

 

STATUS_WORK

ZTEST_LOS_OD

STATUS_WORK

H

 
  1. Under Selection Conditions, enter the following data:

Table

Field Name

Operator

Comparison Value

AND/OR

ZTOOL_VAL_PR

FLG_CANCEL_VERS

EQ

' '

AND

ZTOOL_VAL_PR

FLG_CANCEL_OBJ

EQ

' '

 
  1. Generate the view in the SE80 transaction.
    1. In the menu, choose Utilities -> Table Maintenance Generator.
    2. Enter a function group and choose Find Screen Numbers. The system issues a number for the view.
    3. Choose Create.
  1. The view is version managed, which means that you need to maintain three time-spots.
    1. Create a file in the function group in which the view was generated and copy the contents of the LCACS_LOS_GEN_VH03 file into this file.
    2. Replace V_TCACS_LOSSTODP with ZVZTEST_LOS_OD_PR and TCACS_LOS_ST_OD with ZTOOL_VAL_PR.
      See: Form Routines for Versioning to find out the form that the form routines are required to have.
    3. Maintain events 03, 05 and 21 in transaction SE54 under Environment -> Events. Enter the following:

Event

Form Routine

03

ZVZTEST_LOS_OD_PR_AVOID_DELETE

05

ZVZTEST_LOS_OD_PR_INIT

21

ZVZTEST_LOS_OD_PR_VERSION

  1. You need to assign the view to a function in Customizing for the Commission System.
    1. In Customizing, assign functions to the ZTOOL_VAL_PR tool under Tools ® Logical Service: Maintain Tools. Insert the ZVZTEST_LOS_OD_PR view in the object-dependent field of the parameter view.
    2. Save your entries.
  1. In SE80, enhance the <APPL>_LOSTEST_GET_VAL function module.
    1. Call up the CACS_LOS_GET_PARAM_OD form routine of the <APPL>_LOSTEST_GET_VAL function module to find out the required percentage.
    2. See: Function Module to find out the form that your coding should have.
  1. In Customizing for the Commission System, choose Commissions ® Basic/Master Data ® Standard Commission Contract ® Valuation Agreements ® Maintain Valuation Types.
  2. Choose Assign tools then Maintain Parameters.
  3. Simulate the commission case and check that the valuation calculation used the percentage that you entered in Customizing.

 

 

 

 

 

 

 

 

End of Content Area