Skip to Content

How to recognize command in SHC Save BADI?

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???


Keyur Pawar

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jul 25, 2016 at 03:30 PM

    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 ?



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.