SAP Knowledge Base Article - Public

3055458 - Error "Type conflict with ASSIGN in program' While Using Submit for Approval Script

Symptom

You are using an ActionValidation-SubmitforApproval script for Employee Times BO in Cloud Application Studio.

Environment

SAP Business ByDesign

SAP Cloud Application Studio

Reproducing the Issue

  1. Login to UI
  2. Click the Self Service tile on the launchpad
  3. Select Edit Timesheet
  4. Click on Release
  5. Dump occurs

However if you go to Cloud Applications Studio and open the Dump ananlysis tool, you can see the below error:-

"Type conflict with ASSIGN in program"

Cause

This error is occurring due to an auto-generated code from the Employee times BO and therefore a mismatch occurs in the action parameter being called in the backend. This triggers the dump to occur.

Resolution

In order to fulfil this requirement you can use "Enhancement Implementation" from cloud application studio rather than using SubmitForApproval Action Validation.

SAP has provided a standard BADI definition which can be implemented by the partners for these types of validations, you can find the below details for the same:

  • BADI name : TIM_EMP_TIME_VALIDATION_CHECK
  • Corresponding enhancement spot name : ES_TIM_REC_VAL_CHK_EXT
  • This BADI has an interface with only one method “VALIDATE” which needs to be implemented

Steps to implement this from Cloud Application Studio are as follows:-

  1. Login to Cloud Application Studio
  2. Open the relevant add-on solution
  3. Click on Add icon-> New Item
  4. Select Enhancement Implementation from the list
  5. In the create screen select the below information:
  • Namespace: http://sap.com/xi/AP/TimeAndLabourManagement/Global
  • Business Object: Employee Times
  • Enhancement Option: Validate Times

    6. VALIDATE.absl will get created, here you can write the logic and raise the error messages as required.

In the ABSL you can use the input parameters that are passed to this BADI for the conditions. (Action Name, RecViewTypeCode, UUID). The UUID received is of the Employee Time Root and you need to retrieve the data of root and item node of the Employee Time Business object to write the logic based on the duration or time recording date or as required.

See Also

This interface method has importing parameter of type TIM_EMP_TIM_VAL_CHK which in turn consists of Employee Time ROOT UUID, Action Name and Recording View type code as input parameters. These parameters will be passed from the standard SAP code to the BADI implementation whenever any action will be called on the employee’s working time confirmations.
 
In the BADI implementation, the partner needs to check for the Action name that is existing on the ROOT node of the TIMX_EMPLOYEE_TIME BO (if the implemented code needs to be executed for some specific actions, in this case SUBMIT_FOR_APPROVAL) and then retrieve the ROOT and ITEM node data of TIMX_EMPLOYEE_TIME business object with the help of received Root Node UUID.
 
After data retrieval, the conditions need to be put to validate the entered/saved time durations. If the requirement is to raise an error message only from the ESS time sheet, then the recording view type code can be checked in the retrieved ITEM data of the BO. The error message which needs to be raised can be logged into the CHANGING parameter of the interface which in turn consists of some attributes with regards to the error message like BADI implementation name, error occurred (Yes/No), message severity, error message text etc.
The SAP standard code will take care of the error handling and the error message which is received from the BADI implementation will be shown onto the UI.

Keywords

Dump while rejecting time sheet entry due to pdi type conflict error in sdk error while using submit for Approval Action validation in Employee times Badi for Employee times , KBA , AP-RC-BDS-BO , ByDesign Studio BO definition/generation , AP-RC-BDS-SCR , ByDesign Studio Scripting (ABSL) , Problem

Product

SAP Business ByDesign all versions ; SAP Cloud Applications Studio all versions