cancel
Showing results for 
Search instead for 
Did you mean: 

can't check TEAM SC checkbox by default

Former Member
0 Kudos

Hello,

I have a requirement to check a "Team shopping cart" check box by default.

The check box value is binded to TEAM_SHOPPING_CART_SEL variable in the context CONTENT.

When i try to set default value for TEAM_SHOPPING_CART_SEL in WDDOINIT of the view, nothing happens.

Here is the coding:

DATA: lv_context TYPE REF TO if_wd_context_node,
        lv_element TYPE REF TO if_wd_context_element,
        lv_value TYPE c .

  lv_context = wd_context->get_child_node( name = wd_this->wdctx_content ).
  lv_element = lv_context->get_element( ).

  CALL METHOD lv_element->set_attribute
    EXPORTING
      name  = 'TEAM_SHOPPING_CART_SEL'
      value = abap_true.


Any suggestions?

Thanks,

Hazem DAOUD

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Please check if its binded directly to the context element or to its property.

-Manish

Former Member
0 Kudos

Hello Manish,

I attach the following image to let you know how the binding is done:

Thanks in advance for your reply,

Hazem.

Former Member
0 Kudos

Hi,

The binding looks good.

One more thing you can check is if the value of element is not overwritten after WDDOINIT is executed. Because INIT will only execute once. It might be some other operation is overwriting the values.

-Manish

Former Member
0 Kudos

Hi,

Debug DOINIT method and check the TEAM_SHOPPING_CART_SEL value as it is getting value or not?

If it is getting value then check in MODIFYVIEW method wether that node/attribute is over writting with initial value.

---Paul

Former Member
0 Kudos

Hello,

In fact, my change in WDDOINIT is always overwritten by standard code. I did the modification in the badi BBP_DOC_CHANGE_BADI implementation and it's ok now.

Thanks a lot for your help.

Hazem.

Former Member
0 Kudos

Hi,

Thats great your problem is solved. Please mark the question as answered by selecting the correct answer.

-Manish

Answers (1)

Answers (1)

uppu_narayan
Active Participant
0 Kudos

Hi Hazem,

        I hope the type of team_shopping_cart_sel  is wdy_boolean............then try. if still its not works than try as below.........it should work.

  CALL METHOD lv_element->set_attribute
    EXPORTING
      name  = 'TEAM_SHOPPING_CART_SEL'
      value = 'X'.

thanks and regards,

narayan