Send Zero Order Confirmation to SAP

You can send a zero order CONF21 IDOC to SAP to indicate when the first labor activity has started on an order or operation. This IDOC will have zero hours and zero quantity. It will be sent only once for each work order or operation when the first labor activity starts.

When a person starts the first labor activity on a work order or operation, the event’s Insert Action Process Status to Create Zero Conf21 validation will check the order or operation’s first_activity_flag in the charge_element_operation table. If this flag’s value is 0, the validation will change it to 1 and create an action process status record called OUT_SAP_ZERO_CONF21. The next time a labor is posted for this order/operation, the validation will see that the flag is already 1 and no action process status for OUT_SAP_ZERO_CONF21 will be created.

When the OUT_SAP service runs (with the TRANSACTION_GROUP parameter set to ZERO_CONF21), it will send the records based on the SAP_ZERO_CONF21 Export Definition (or a modified copy of this Export Definition). This Action export looks for records with action process status OUT_SAP_ZERO_CONF21. It will send the Order and Operation (entered when the person posted the first labor) from these records to SAP. This IDOC will have no hours or quantity, indicating the first labor has started.

Note: If a transaction has an action process status record for OUT_SAP_ZERO_CONF21 with a status of R (Ready), and the transaction is cancelled or replaced, the status of the OUT_SAP_ZERO_CONF21 action process status record will change to X (Cancelled Before Processing). However, the first_activity_flag will not reset to zero. In this case, the zero order confirmation will not be sent to SAP.

The configuration required for this feature is explained below:

Configure the Events

Configure the Export Definition

Configure the Distribution Model

Configure and Run the OUT_SAP Service

 

Configure the Events

Each event that is used to post labor that will be sent in the zero order confirmation IDOC to SAP needs to have an event validation added to it. The event’s Order and Operation prompts also need to have the correct Charge Type and Element Name configurations.

The Event Validation you need to add to the event is called Insert Action Process Status to create Zero Conf21. The Validation Stage is Post Validation. You can add this validation using the Validation tab of the Events form.

You also need to configure the appropriate Charge Type and Element Name for the event’s Order Num and Operation prompts. You can modify these settings on the Prompt tab of the Events form.

For the Order Num prompt, set the Charge Type and the Element Name to ORDER.

For the Operation Num prompt, set the Charge Type to ORDER and the Element Name to OPERATION.

The Insert Action Process Status to Create Zero Conf21 validation on the event will create an action process status record called OUT_SAP_ZERO_CONF21 if the order or operation’s first_activity_flag in the charge_element_operation table is 0. This action process status record can then be exported by the SAP_ZERO_CONF21 Export Definition (see below).

 

Configure the Export Definition

The SAP_ZERO_CONF21 Export Definition will export Order Number and Operation Number (entered when the person posted the first labor) records with an action process status called OUT_SAP_ZERO_CONF21 to SAP.

SAP_ZERO_CONF21 is an Action export. It is recommended that you copy the SAP_ZERO_CONF21 Export Definition and modify the duplicate as necessary. To do so, use the Export Definition form (Main Menu > Configuration > Interfaces > Export Definition).

Make sure the Export Parameter called PROCESS_NAME is set to OUT_SAP_ZERO_CONF21.

The SAP_ZERO_CONF21 Export Definition uses rules to get the Order Number and Operation Number to export. These Export rules use the operand Get Action Prompt Value to get the Order Number and Operation Number that the person entered at the event prompt. You can duplicate and modify these rules on the Calc Rule form.

Rule Name - Set Order Num From Action Prompt

IF:
Is Export Record Not Empty( )
THEN:
Set Output( Get Action Prompt Value( F_ORDER_NUM ) )

Rule Name - Set Operation Num From Action Prompt

IF:
Is Export Record Not Empty( )
THEN:
Set Output( Get Action Prompt Value( F_OPERATION_NUM ) )

 

Configure the Distribution Model

The OUT_SAP service uses the Distribution Model to determine which Export Definition to run. This service uses its SENDER_NAME and TRANSACTION_GROUP parameters to look up the Export Name in the Distribution Model.

You need to define the Sender Name, Receiver Name, and Export Name for the Zero Order Confirmation you are sending to SAP.

The application comes with a predefined Distribution Model record for the ZERO_CONF21 transaction. It is recommended that you copy this record and modify the duplicate version as necessary.

Once the Export Definition and Distribution Model records have been updated, you can configure and run the OUT_SAP service (see below).

 

Configure and Run the OUT_SAP Service

You may want to configure a separate instance of the OUT_SAP service to send the zero order confirmation IDOCs. Make sure you set the TRANSACTION_GROUP parameter to ZERO_CONF21. To do so, use the Service Instance form (Main Menu > Configuration > Services > Service Instance).

When the OUT_SAP service runs (with the TRANSACTION_GROUP parameter set to ZERO_CONF21), it will send the records based on the SAP_ZERO_CONF21 Export Definition (or a modified copy of this Export Definition). This export looks for records with action process status OUT_SAP_ZERO_CONF21. It will send the Order and Operation (entered when the person posted the first labor) from these records to SAP. This IDOC will have no hours or quantity, indicating the first labor has started.