Show TOC

 XStep: Dynamic Function Calls Locate this document in the navigation structure

Use

You can use this function to call certain SAP functions from within the PI sheet or perform certain calculations and checks in the PI sheet. ABAP function calls that have been created for the corresponding use are used for the function call.

Prerequisites

The function module to be called must exist and be active in the Function Builder (ABAP Development Workbench).

Features

The SAP system contains a number of predefined function modules that you can use in function calls. You can also create your own function modules.

To create or display function modules, go to Customizing for Process Management and choose   Process Instructions   Define PI Categories for PI Sheet Using Characteristic Overview.   -> Assign Characteristics to Dynamic Function Calls   Create Function Modules for Dynamic Function Calls.  

The following table provides an overview of the function modules that you can define as dynamic function calls:

Function

Function Module

Calling of any transaction

COPF_CALL_TRANSACTION

Order confirmation for phases

COPF_ENTER_CONFIRMATION

Displaying of material quantity calculation in the order

COPF_MATERIAL_QUANTITY_CALC

Display of documents created in the SAP document management system

COPF_DOCUMENT_SHOW_DIRECT

Calculation of the duration of time intervals

COPF_DETERMINE_DURATION

Calculatethe start date of a time interval

COPF_DETERMINE_START_TIME

Calculate the end date of a time interval

COPF_DETERMINE_END_TIME

Create physical-sample records for quality inspections during production

QPRS_PI_NEW_SAMPLE_DRAW_XS

Processing of sample drawing(for example, release/lock physical sample)

QPRS_PI_NEW_SAMPLE_DRAW_PROC_XS

Recording of inspection results in QM

COPFX_QM_INSPECTION_RESULT_REC_XS

Sample function module for check function

COPF_VALIDATION_FUNCTION_TEST

Execution of the Function

The function can be executed in the following ways:

  • Manually

    A button with the description saved appears in the PI sheet. The function is only executed, once you have triggered it using the pushbutton.

  • Event-driven

    You can specify an event that triggers the function automatically. The system automatically executes the function as soon as the event is triggered.

  • Manual and event-driven

    You can execute the function manually and parallel to this, the function can also be automatically triggered using a defined event. To do this you specify an event.

    Note Note

    For the event PARAMETER_CHANGED, in the case of event-driven and manual execution you can specify which parameters have to have values assigned to them in order for a function module to be executed.

    End of the note.

For more information about events, see Events in PI Sheets and Cockpits .

For more information on how to define the parameters of the function module in the XStep process instruction, see XStep: Function Module Parameters .

Activities

  1. You create an XStep process instruction of the type Control Function Call.

  2. You specify the following on the Function tab page in the process instruction:

    • Whether the function can also be executed in display mode

    • Whether the function should be triggered manually, event-controlled, or both manual and event-controlled.

      If the function should be triggered manually, you have the option of entering a description which will appear on the pushbutton in the PI sheet.

  3. You enter the name of the function module on the Parameters tab page. The function module parameters are displayed.

  4. You assign values to all the mandatory parameters of the function module.

  5. You assign values to all optional parameters of the function module, for which you do not want to use the default value defined in the function module.