Example: Requirements for Order Confirmation 

This example shows how requirements and access sequences can be set up.

Prerequisites

You have created an action profile ZAB in Customizing with the action type order confirmation. You have defined the following processing types (output medium) for the action definiton order confirmation.

 

If you call up the activity Define Requirements for Output in Customizing for output determination, you see the following screen in the requirement overview for order confirmation:

A requirement definition is created for each requirement in this overview in the screen area Requirement definition.

The output medium from the action profile is entered for each task in the screen area Output Definition.

 

The requirements are coded as follows (an explanation of these code lines can be found under Procedure).

Requirement 1: Status check

* T = condition true

* F = condition false

 

* check if the document is correct

call function 'CRM_OUTPUT_CHECK_DOCUMENT'

exporting

io_context = l_context

importing

ep_result = rule_evaluation_outcome.

 

Requirement 2: Order confirmation by email

* T = condition true

* F = condition false

data: l_deflt_comm type ad_comm.

 

* determine the communication type from the sold-to-party

call function 'SPPF_GET_COMM_DATA'

exporting

partners = l_context->partner

partner_role = '0001'

importing

deflt_comm = l_deflt_comm.

 

* check communication type

if l_deflt_comm eq 'INT'.

rule_evaluation_outcome = 'T'.

else.

rule_evaluation_outcome = ' F '.

endif.

 

Requirement 3: Order confirmation by fax

data: l_deflt_comm type ad_comm.

 

* determine the communication type from the sold-to-party

call function 'SPPF_GET_COMM_DATA'

exporting

partners = l_context->partner

partner_role = '0001'

importing

deflt_comm = l_deflt_comm.

 

* check the communication type

if l_deflt_comm eq 'FAX'.

rule_evaluation_outcome = 'T'.

else.

rule_evaluation_outcome = ' F '.

endif.

 

Requirement 4: Order confirmation by print

*print the document

RULE_EVALUATION_OUTCOME = 'T' .

 

* T = condition true

* F = condition false

 

Process Flow

The system checks the requirements in the given sequence. The requirements in this sequence signify the following:

  1. The system checks the status of the document. If the document is incorrect, output determination terminates at this point (stop symbol). If the document is complete and contains no errors, the system looks at the next requirement.
  2. The system checks the requirements for email: Is the standard communication type in the business partner master for the sold-to party email? If yes, it sends the order confirmation by email and ends output determination (stop symbol).
  3. If the requirements for email are not met, the system checks requirements for sending by fax: Is the standard communication type fax in the business partner master for the sold-to party? If yes, it sends the order confirmation by email and ends output determination (stop symbol).
  4. If the requirements for the fax are not met, the system prints the order confirmation.

 

If the system finds from the requirements that output, for example, should be sent by fax, but that no fax number has been entered in the business partner master, the system cannot send output. Output determination terminates as the output is seen as having been successfully processed.