Skip to Content
avatar image
Former Member

Trap function code of buttons in SRM 7.0

Hi.

We have a requirement to throw an error message from the BBP_DOC_CHECK Badi for Shopping carts - is it possible to throw the error message based on a specific user action, like when the user preses Delete on item level while creating carts then the check should trigger?

Please advice.

Thanks.

Anuradha.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Jan 06, 2012 at 09:24 AM

    yes you can. have you searched enough?

    note: 1334202

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 06, 2012 at 07:36 PM

    Hello,

    Note 1334202 gives you some information and examples on how to get the action ID for webdynpro components.

    Different from ITS, command SY-TCODE for example is not triggered anymore.

    Regards,

    Ricardo

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 09, 2012 at 06:10 PM

    Hi.

    I have implemented the code as mentioned in Note # 1334202 in the BBP_DOC_CHECK_BADI BAdi.

    DATA: lo_transaction_context TYPE REF TO /sapsrm/if_transaction_context.

    data: lv_action type /SAPSRM/PDO_ACTION_TYPE.

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

    lv_action = lo_transaction_context->get_current_action( ).

    However, the value of LV_ACTION is always showing up as blank in this case (no matter what button is pressed in the screen).

    Please help.

    Thanks.

    Anuradha.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Anuradha,

      by default it will only return the FPM buttons actions.

      so for anything other than that, go into the WD component and for that button press create a post exit on the event and attach a action id to that. then you can capture that in doc_check badi

      (its their in the note, follow that)

  • avatar image
    Former Member
    Jan 15, 2012 at 11:10 PM

    Hi Richardo & Soumyaprakash.

    The solutions suggested did work and I was able to address the issue.

    Thanks a lot for all the help and advice.

    Thanks.

    Anuradha.

    Add comment
    10|10000 characters needed characters exceeded