cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Purchase Order not getting updated in the evaluate conditions BADI for Flexible Workflow

Utkarsh
Participant
0 Likes
6,310

Experts,

We have implemented the following BADIs to add start conditions for triggering PO flexible workflow.

1) SWF_WORKFLOW_CONDITION_DEF

2) SWF_WORKFLOW_CONDITION_EVAL.

Inside the method of SWF_WORKFLOW_CONDITION_EVAL-EVALUATE_CONDITION - We are not getting the PO number which is supposed to be part of importing parameter (is_sap_object_node_type-sont_key_part_1).

Please suggest.

Accepted Solutions (1)

Accepted Solutions (1)

Banc
Product and Topic Expert
Product and Topic Expert

Hi Uktash

Usually, the workflow related BADIs are called twice.. The first time during the simulation, where the PO is not yet posted, therefore PO number is not available. The second time during update task, where the PO number is available.

Can you test workflow simulation via /nswf_process_admin?

Kind regards, Bríd

Utkarsh
Participant
0 Likes

While saving the PO - the BADI gets triggered only during simulation not during update task. Hence the PO number is not present. I will test the simulation and let you know.

Thanks bridaine.nichonghaile

pappu_kumar2
Participant
0 Likes

Hello Uktash / Bnichon,

I have used TCODE: /nswf_process_admin but it did not help me out. 

Issue - Once PO gets save then BADI:SWF_WORKFLOW_CONDITION_EVAL this is not getting called the second time.

Scenario: 

Copy Standard PO Flexible WF: WS00800238 to custom PO Flexible WF: WF9000*9. when I run standard WF with the custom condition, badi gets called twice but in the case of custom WF only once is getting called. 

Note: Filter Badi I have added both the WF number.

 

Answers (5)

Answers (5)

Banc
Product and Topic Expert
Product and Topic Expert

HI utkarsh179

Please review the following KBA that includes some sample coding

2841783 - How to define new Pre-condition in Manage Workflow for Purchase orders

Regards, Bríd

Utkarsh
Participant
0 Likes

Hi bridaine.nichonghaile,

The field IS_SAP_OBJECT_NODE_TYPE-SONT_KEY_PART_1 is blank in the BADI. Is it because the PO number is not yet generated? If yes - then how do we fetch data for our conditions?

Thanks !

Utkarsh

former_member835672
Discoverer
0 Likes

Solution:

Enable external debugging

Enable workflow user for external debug

Enable updated debugging

former_member772988
Discoverer
0 Likes

Hi,

I am facing the same issue. When I create a PO, I am not getting the PO number in this BADI method.

But, if I am changing my PO, then I am able to see the PO number in the importing parameters. Please suggest solution for getting PO number when PO is created

EDIT: We can see the PO numberr only when it is created from fiori app Manage purchase order and fiori app ME21N(advanced)

former_member835672
Discoverer
0 Likes

Hello, did you find the solution?

0 Likes

Hi utkarsh179,

Did you find a solution?

Thanks in advance

Utkarsh
Participant
0 Likes

Please check in update debugging mode. You will get the PO number.

Utkarsh
Participant
0 Likes

Hello bridaine.nichonghaile,

We have implemented a flexible workflow for certain user IDs in our SAP system. And for the remaining user IDs - auto PO release strategy is getting triggered. However, once the PO is confirmed in Ariba - the confirmation details are not updated in the order.

And when deactivate the flexible workflow - the Ariba confirmation gets updated in the PO.

Please advise on how to solve this issue.

Banc
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Utkarsh,

If this is still an issue, I would suggest to create an incident for SAP support to review under component MM-FIO-PUR-REL

Kind regards, Bríd