cancel
Showing results for 
Search instead for 
Did you mean: 

change default value of standard attribute

Former Member
0 Kudos

Hi All,

I am trying to change the default value of standard attribute ACC_IND in view V_SC_DOFC_I_LIMITEM of webdynpro component /SAPSRM/WDC_DODC_SC_I_LIM.

To achieve about requirement I have created a post-exit of method WDDOINIT and via wizard I have set the attribute ACC_IND value to '02' where as the default value is '01'.

The above solution did not change the output. So, now I want to change the default value itself to '02 from '01'.

So, is there a way to change the default value of the attribute ACC_IND, please share your thoughts.

Regards,

Depp

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Maybe your coding in WDDOINIT was not correct? Just post it, we will have a look

Former Member
0 Kudos

*   DATA LO_ND_LIMIT_SUB TYPE REF TO IF_WD_CONTEXT_NODE. 

    DATA LO_EL_LIMIT_SUB TYPE REF TO IF_WD_CONTEXT_ELEMENT. 

    DATA LS_LIMIT_SUB TYPE WD_THIS->ELEMENT_LIMIT_SUB. 

    DATA LV_ACC_IND TYPE WD_THIS->ELEMENT_LIMIT_SUB-ACC_IND.

* navigate from to via lead selection  

    LO_ND_LIMIT_SUB = WD_CONTEXT->PATH_GET_NODE( PATH = `LIMIT_ITEM.LIMIT_SUB` ).

* @TODO handle non existant child

   *  IF lo_nd_limit_sub IS INITIAL.

   * ENDIF.

* get element via lead selection  

    LO_EL_LIMIT_SUB = LO_ND_LIMIT_SUB->GET_ELEMENT( ).

* @TODO handle not set lead selection  

    IF LO_EL_LIMIT_SUB IS INITIAL.   ENDIF.

* @TODO fill attribute * lv_acc_ind = 1.  

    lv_acc_ind = '02'.

* set single attribute  

    LO_EL_LIMIT_SUB->SET_ATTRIBUTE(     NAME =  `ACC_IND`     VALUE = LV_ACC_IND ).

Former Member
0 Kudos

Is node LIMIT_SUB an 0..1 node or is it a 0...n node??

You saw in Debugger that line "set_attribute" will be executed??

I've never used method "path_get_node", therefore i don't know if this is right way, but you can check that in debugger