cancel
Showing results for 
Search instead for 
Did you mean: 

How to recognize command in SHC Save BADI?

keyur_pawar
Active Participant
0 Kudos
125

Hi Team,

I'm creating a Shopping cart, It includes few steps those are Order & then Approve.

Here I have written some block of code in SHC Save BADI, which executes on both events Order as well as Approve.

But here I have to put some conditional code i.e. I want some different behavior on Order and Approve event.

Please tell me how can I do this? How to identify am I clicked on Order or Approve?

Here I'm trying to take details from buffer from status table of FM: BBP_PD_SC_GETDETAIL but status is not getting updated in it. Please tell me is there any other way to identify it???

Regards,

Keyur Pawar

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Keyur

Can you try this code ?

DATA: lo_transaction_context TYPE REF TO /sapsrm/if_transaction_context,
ls_crmd_orderadm_h TYPE crmd_orderadm_h,
lv_object_id TYPE CRMT_OBJECT_ID_DB.

lo_transaction_context = /sapsrm/cl_transaction_context=>/sapsrm/if_transaction_context~get_instance( ) .

CASE lo_transaction_context->get_current_action( ).

WHEN /sapsrm/if_pdo_action_c=>'APPROVE'.  


**** Put your code here ..


Let me know if this helps ?


Regards

Vinita 

keyur_pawar
Active Participant
0 Kudos

Perfect !! It's working.

Thank u so much Vinita.

Answers (0)