cancel
Showing results for 
Search instead for 
Did you mean: 

Duplicate question

walkerist
Participant
0 Kudos

I'm trying to maintain an existing workflow and I need to enhance it that it only sends an email approval when the sales order has credit check block. Any tips or good documentation to read?

Is it possible to check if the sales order has credit blocking in the table UKM_DCD_ATTR?

Accepted Solutions (0)

Answers (1)

Answers (1)

SBach
Advisor
Advisor

Hi Wane,

you have to include a method that checks for credit block and than use the result as a step-condition.

Maybe that thread helps: https://answers.sap.com/questions/10397533/trigger-credit-block-workflow-at-sales-order-or-de.html

walkerist
Participant
0 Kudos

Thanks sebastian.bach , I'm kind of confused with the workflow. Does this mean that the emails get sent to the user's inbox in SBWP as soon as the workflow is triggered?

Currently, the program of the workflow is selecting documents from the UKM_DCD_ATTR table

DATA: l_case_guid TYPE ukm_dcd_attr-case_guid,

SELECT SINGLE *
FROM ukm_dcd_attr
INTO lx_dcd_attr
WHERE case_guid EQ l_case_guid.
IF sy-subrc EQ 0.

*It sends email to the approver

ENDIF.

Is it possible to insert a logic that checks the document in table VBUK if it has credit blocking? Although I'm not sure how it goes.

Lastly, If I were to include a logic or checking if a sales document has a credit blocking, which one should I edit? the workflow or the program related to the workflow?

SBach
Advisor
Advisor
0 Kudos

Hello Wane,

no, the mail in your screenshot workflow structure is sent via the send mail step, if the case logic for this path is fullfilled. If you want only to send for a specific case - blocked sales order - than the case logic needs to check this.

But if understand that thread: https://answers.sap.com/questions/7316326/specific-sales-order-not-showing-in-vkm1.html your case should check if a credit block is there and if not it informs the approvers about the review task and than release the sales order. If a credit block is there the path left should be triggered and no release should happen until the block is cleared. I hope that task has an end event and waits for the credit block release over that. Sorry I am not familiar with sales tables. I guess you need an ABAP-Developer, who is familiar with that and can implement your logic.

That brings me back to your original question. You want to inform approvers if the credit check fails? Or was succesful?

walkerist
Participant
0 Kudos

sebastian.bach

I want to have a checking that the sales order has credit blocking. If the sales order has a credit block, then it will be sent vkm1 and a mail will be sent to the approver at the same time.