cancel
Showing results for 
Search instead for 
Did you mean: 

How to identify if the shopping cart is in display mode

Former Member
0 Kudos

Hi Experts,

I need to identify if the shopping cart is in display mode based on which I need to restrict some functionality in modify view. Can you please let me know how can I handle this? I am in SRM 7.0.

Thanks and regards,

Atanu

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hello

i used this piece of code in related webdynpro

    DATA: mo_task_container   TYPE REF TO /sapsrm/if_cll_task_container.

   * get screen mode
  CALL METHOD wd_comp_controller->mo_task_container->get_transaction_mode
    IMPORTING
      ev_pdo_trans_mode = lv_mode.

regards

Imrich

Answers (3)

Answers (3)

jason_boggans
Active Contributor
0 Kudos

No response since Sep 26th so assumed answered.

Former Member
0 Kudos

i reckon we may get visible mode details from READ_ONLY context in the Webdynpro Ui element...

Former Member
0 Kudos

Thanks all for your reply.

Hi Imrich,

I am getting null object reference as I am mapping to an interface. I am not expert in Web Dynpro. Can you please let me know how I can avoid a dump?

Hi Bhagath,

It is the entire shopping cart that I am looking for as display mode, not a particular field that I am referring to. The field may be read only but the shopping cart is in change mode.

Thanks and regards,

Atanu

Former Member
0 Kudos

hello Atanu

could you give me the webdynpro where you need the check?

thanx

Imrich

Former Member
0 Kudos

Hi Imrich,

The Webdynpro component is /SAPSRM/WDC_DOTC_CONF_OID and view V_CONF_DOTC_BASIC. I want to do the checking in post exit of modify view.

Thanks and regards,

Atanu

Former Member
0 Kudos

  I checked in our system the webdynpro and it should work the way as in my example.

We are not using confirmations so I cant debug the functionality. You should debug the process and try to find out what is missing.

Please check whether the related componentcontroler of Webdynpro has in attribute 'mo_task_container' (Public), which holds the method 'get_transaction_mode'. It means you can call it and get the transaction mode. Try to observe how the method is used around.

best wishes, Imrich

DATA: mo_task_container   TYPE REF TO /sapsrm/if_cll_task_container,

            lv_mode    TYPE /sapsrm/pdo_inst_mode.  

* get screen mode
  CALL METHOD wd_comp_controller->mo_task_container->get_transaction_mode
    IMPORTING
      ev_pdo_trans_mode = lv_mode.

Former Member
0 Kudos

Hi,

even if you bind any standard field context also it works but i agree it's  a valid point in getting the transaction mode....

Try, i do checked it is working ....

DATA :    lo_pdo                 type ref to /SAPSRM/IF_PDO_BASE,

              lv_mode              type /SAPSRM/PDO_INST_MODE.

CALL METHOD WD_COMP_CONTROLLER->MO_BOM_SC->/SAPSRM/IF_CLL_BO_MAPPER~GET_PDO

     RECEIVING

       RO_PDO = lo_pdo.

lv_mode = lo_pdo->GET_MODE( ).

You will get value and

you may use below for comparison of mode with constants already declared..

/SAPSRM/IF_PDO_CONSTANTS_GEN_C=>GC_MODE_EDIT EQ LV_MODE.

Have a nice time..

Former Member
0 Kudos

Hi,

Please check with Basis team to achieve this using by some authorization assignment.

You can check also role assignment of that particular user.

Regards,

Naga.