Page tree
Skip to end of metadata
Go to start of metadata


This page is created to clarify the application logic of Central Contract output determination process.


When releasing a Central Contract, the outputs are determined during the approval process. The determination and the output parameters can be configured in SPRO path Cross-Application Components -> Output Control. Here you can maintain the Output Types, Channels, Form and Email templates. From here you can also start the application to maintain the Business Rules for output parameter determination (Define Business Rules for Output Parameter Determination). In that application after choosing the relevant output type (Central Purchase Contract in the standard), you can configure and assign the output parameters such as channels, receivers, email settings, forms and printers.

For example in Output Type, you can define, if the output should be triggered immediately or only scheduled.

In Channel you can set the output channels you would like to use.

Debugging Guide

The relevant logic is called when the approval is finished, so to stop the program, set a breakpoint for user SAP_WFRT in method SET_RELEASED of class CL_OUTL_AGRMNT_HANDLER_MM. In this method system calls the FM CNTRL_CONTRACT_OM_TRIGGER in update task, so to continue the debugging activate update debugging. In debugging session follow menu path Settings -> Change Debugger Profile/ Settings, tick Update Debugging and click Save. Afterwards you can press F8.

After a few seconds the update debugging will open. In the debugging session set a breakpoint in FM CNTRL_CONTRACT_OM_TRIGGER and press F8. If the breakpoint doesn’t stop and a new debugging session opens, set the breakpoint again in FM CNTRL_CONTRACT_OM_TRIGGER and press F8.

The breakpoint stops in FM CNTRL_CONTRACT_OM_TRIGGER.

Output and parameter determination

First, system calls method CREATE_OUTPUT_REQUEST, which is responsible to determine the outputs based on the configuration.

If the issue is that the outputs are not determined correctly, you can continue debugging the logic by setting a breakpoint in the debugging session in Method _PARAMETER_DETERMINATION of class CL_APOC_OR_A_ROOT_DET_ITEMS. In that method system will call many separate methods to gather each type of data. You can check, if the data is determined as expected in the corresponding Importing parameter. Firstly, system determines the relevant output types.

Then system loops at found output types and determines the receiver role for each.

System also loops at the found receivers to gather the role data for each receiver (responsible application callback method CL_MMPUR_CCTR_OUTPUT_CALLBACK - IF_APOC_COMMON_API~GET_DATA_FOR_ROLE).

System loops at the found role data and determines the output channel.

System loops at the collected channels and determines sender data (responsible application callback method CL_MMPUR_CCTR_OUTPUT_CALLBACK - IF_APOC_COMMON_API~GET_DATA_FOR_SENDER).

Then system gathers the relevant forms.

Depending on the channel, it gets further data (Print output – printer details, Email – email sender details).

If everything was collected properly into the Importing parameters, press F7 and check table LT_ITEM_DETERMINED and LT_ITEM_EMAIL_DETERMINED.

Coming back to CNTRL_CONTRACT_OM_TRIGGER check if LT_FAILED_OBJECT is empty.

Issuing output

The next step in FM CNTRL_CONTRACT_OM_TRIGGER is to issue the output. For this, system calls Method TRIGGER_ISSUE_OUTPUT.

To debug the issuing logic, set a breakpoint in the debugging session in Method /BOBF/IF_FRW_ACTION~EXECUTE of class CL_APOC_OR_A_ITEM_ISSUE_OUTPUT.

System first gathers the previously determined outputs and its parameters into LT_ITEM and LT_ITEM_EMAIL.

Then, it loops at LT_ITEM and calls the output triggering logic for each that has In Preparation status.

Afterwards, system sets the output status from In Preparation to To Be Output.

Coming back to FM CNTRL_CONTRACT_OM_TRIGGER, check if LT_FAILED_OBJECT is empty.

Saving output

The last step in FM CNTRL_CONTRACT_OM_TRIGGER is to finalize the process and save the output. System performs a few checks before saving the output. Verify if lv_rejected is blank after each.

Finally, system saves the output.

  • No labels