cancel
Showing results for 
Search instead for 
Did you mean: 

Draft Conversion Triggers Duplicate Approval in SAP Business One Service Layer

staseeb
Active Participant
0 Kudos
197

Problem Statement: Draft Conversion Triggers Duplicate Approval in SAP Business One Service Layer

Hello SAP Community,

I’m encountering an issue with the DraftsService_SaveDraftToDocument service in SAP Business One, and I’m hoping someone can provide guidance or a solution.

Scenario:

  • System: SAP Business One (Service Layer)
  • Process: Converting a draft Approved Purchase Order (PO) to a final document

Issue:

When I use the DraftsService_SaveDraftToDocument service to convert an approved draft PO to a final document, it triggers the approval process again. Here’s the detailed workflow:

  1. Create a PO: The PO draft is created and submitted for approval.
  2. Approval Process: The PO draft goes through the approval process and is approved.
  3. Convert Draft to Document: I use the DraftsService_SaveDraftToDocument service to convert the approved draft to a final document.
  4. Re-trigger Approval: The conversion process re-triggers the approval, and I have to approve it again. Only after the second approval does the document get saved by calling DraftsService_SaveDraftToDocument.

Observations:

  • The approval template is set to “Always” check for approvals.
  • The document status before conversion is fully approved.

Payload Example:

Here is the JSON payload I am using for the conversion:

 

{
  "Document": {
    "DocEntry": 12345
}
}

 

Steps Taken:

  • Verified that the approval template settings are correct and do not have duplicate conditions.
  • Ensured the draft status is fully approved before conversion.

General Settings

staseeb_0-1718281590790.png

Template Settings

staseeb_1-1718281644129.png

SAP Version

 

staseeb_2-1718281689648.png

 

Question:

Has anyone experienced similar issues with the DraftsService_SaveDraftToDocument service? How can I prevent the approval process from being re-triggered upon conversion of the approved draft to a final document?

Any insights or solutions would be greatly appreciated. Thank you!

@ANKIT_CHAUHAN

 

staseeb
Active Participant
0 Kudos

any help @ANKIT_CHAUHAN 

Accepted Solutions (1)

Accepted Solutions (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi staseeb,

I would ask you to check the issue in the latest patch as there are several known issues in regards to the topic in question.

Refer to SAP Note 3428615 and 3411835 for the same.

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

Answers (0)