Showing results for 
Search instead for 
Did you mean: 

Popup Message in SRM 7.0

Former Member
0 Kudos

Hi All,

I am working on SRM 7.0 . I am trying to show a pop up after adding items to the shopping cart after a validation. I made the validation in the badi ZBBP_CATALOG_TRANSFR. I need to pop up a message after that .

I have used he FM BBP_PD_MSG_ADD in the ZBBP_DOC_CHECK badi and I am getting the message but I need a pop up message.

Please suggest on how it could be acheived.

Thanks in advance


Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sudha,

Please refer the sap note 1334202 How to get current action ID and transaction group.

The instance method "/SAPSRM/IF_TRANSACTION_CONTEXT->GET_CURRENT_ACTION( )" can be called to get the currently executed action. The returned action ID is filled with the action ID as it is used in the PDO layer and for metadata. The instance method "/SAPSRM/IF_TRANSACTION_CONTEXT->GET_TRANSACTION_GROUP( )" can be called to get the currently transaction context.

Can you please try ,

DATA: lo_transaction_context TYPE REF TO /sapsrm/if_transaction_context.

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=>gc_action_edit.



Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks ChandraHasan it worked!!!

Former Member
0 Kudos

Hi Jay,

I ve used the field_name = 'EXPRESS'

But could not get the pop up .

So Tried to enhance the view and put the code for POPUP in WDDOMODIFYVIEW method .

It is working fine .But the popup is coming at certain unwanted palces .

Say suppose I order the shopping cart or when I try to display the Shopping cart created .

How to identify the action clicked by the use?

I have placed the code in WDMODIFYVIEW method

data: lr_view type ref to if_wd_view_controller.

data: lr_action type ref to if_wd_action.

lr_view = wd_this->wd_get_api( ).

lr_action = lr_view->get_current_action( ).

But I am getting an error saying Access via 'NULL' object reference not possible.

If I put the code in WDDOACTIONBEFORE method this method is not getting triggered.

Please suggest on how to find out the action performed by the user .

Thanks in Advance,


Former Member
0 Kudos

When you call "BBP_PD_MSG_ADD", fill the paramter "I_FIELD_NAME" with 'EXPRESS'. This should make the message a popup.