cancel
Showing results for 
Search instead for 
Did you mean: 

Dropdownbyindex enable/disable as per trans. mode (display-edit)

Former Member
0 Kudos

Dear Gurus,

I have a dropdown by index in a standard transaction, created with ehhancement. I want to be able to control the field, input when the transaction is in edit mode and display only when the transaction is in display mode. I am in the shopping cart screen in SRM 7.

How can i achieve this. Is there a standard API I can use in the post exit of modifyview method to determine what mode the transaction is in?

Regards

Ali

Accepted Solutions (0)

Answers (2)

Answers (2)

rpalotai
Participant
0 Kudos

Hi,

Here is a more general code you can use:

DATA:

lv_trans_mode TYPE /sapsrm/pdo_inst_mode,

lr_mo_task_container TYPE REF TO /SAPSRM/IF_CLL_TASK_CONTAINER,

lo_task_factory TYPE REF TO /sapsrm/if_cll_taskcon_factory.

lo_task_factory = /sapsrm/cl_ch_wd_taskcont_fact=>get_instance( ).

lr_mo_task_container = lo_task_factory->get_task_container( ).

lr_mo_task_container ->get_transaction_mode( IMPORTING ev_pdo_trans_mode = lv_trans_mode ).

I use for checking: IF lv_trans_mode EQ/NE 'DISPLAY'.

BR

Richard

Former Member
0 Kudos

Thanks,

Sorted out myself. Used attribute "WD_COMP_CONTROLLER" of the view to get reference to the task container, and called method "GET_TRANSACTION_MODE" if the task container class to get the mode of the transaction.

Regards

Ali