cancel
Showing results for 
Search instead for 
Did you mean: 

Update preceding Business transaction in BADI

itabhishek9
Participant
0 Kudos

Hi SDNites,

I have a requirement where I need to update the status of all the preceding transactions of the bcurrent business transaction when the status of the vurrent transaction is set to "COMPLETED". I have implemented BADI CRM_ORDER_STATUS but when I am trying to update the status of previosu BADI I am not able to. It gets saved only in buffer and as I try to edit the preceding business transaction status is again set to the current one. Following are the things I have tried,

1. CRM_ORDER_MAINTAIN - Goes to dump as it is recursive call.

2. CRM_ORDER_SAVE - Goes to dump as it is recursive call.

3. BAPI_TRANSACTION_COMMIT - No effect (Also it not a good practise).

4. Trying to register the transaction for future save using method register_for_save of class cl_action_execute - Dump again.

Request you to please guide me how the same can be achieved. Any pointers will be of great help.

Regards,

Abhi

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Abhishek,

You can create an Implementation in BADI ORDER_SAVE, and get the previous transaction with the help of DOC_FLOW table from order Read. From there you can get the transaction ID of the previous transaction and change the status.

Regards,

Karthik

itabhishek9
Participant
0 Kudos


Thanks Gaurav for the response.

Can you plz let me know,

1. Above FM has to be followed by some supporting FM like 'CRM_STATUS_UPDATE_DIALOG' to actually save details in database.

2. Will ORDER_SAVE badi gets triggered if status change is happened in ECC and then the replication of that status change is done in CRM.

Regards,

Abhi

kumar5
Active Contributor
0 Kudos

Hi,

I think you need to use COMMIT WORK after the above mentioned FMs to change the status.

I am not much sure about the second one..

Thanks

Kumar

kumar5
Active Contributor
0 Kudos

Hi,

You can implement the Badi 'ORDER_SAVE' and use the

FM: CRM_STATUS_CHANGE_EXTERN : to change the user status

FM: CRM_STATUS_CHANGE_INTERN : to change the system status in the document.

Thanks

Kumar