cancel
Showing results for 
Search instead for 
Did you mean: 

How to delete a item level condition type by using FM SLS_LORD_MAINTAIN ?

Former Member
0 Kudos

Hi,

      I have to delete discount related condition type (As per user decision) before saving the order. My Web dynpro component is copy of standard component LORD_MAINTAIN_COMP. I tried to access node level values of item conditions,but nodes are being empty. So that I'm trying to using FM SLS_LORD_MAINTAIN to update condition types. What all are the parameters has to be passed to this FM?.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Any idea to update condition value in item level?.

Former Member
0 Kudos

I have added below code to make condition type as inactive. But still its not working.

lo_nd_cond_h = wd_context->get_child_node( name = wd_this->wdctx_cond_h ).

lo_nd_cond_h_data = lo_nd_cond_h->get_child_node( name = wd_this->wdctx_cond_h_data ).

   CALL METHOD lo_nd_cond_h_data->get_elements

*      EXPORTING

*        from   =

*        to     =

     RECEIVING

       set    = element_set_cond        .

   LOOP AT element_set_cond INTO lo_el_cond_h_data .

     lo_el_cond_h_data->get_attribute(

     EXPORTING

       name `KSCHL`

     IMPORTING

       value = lv_kschl ).

     IF lv_kschl EQ condition_type .

       CALL METHOD lo_el_cond_h_data->set_attribute

         EXPORTING

           name  = 'KINAK'

           value = 'A'.

       lo_interfacecontroller->add_to_change_log( ir_element        = lo_el_cond_h_data

                                   iv_attribute_name = 'KINAK'

                                   iv_new_value      = 'A' ).

       lo_interfacecontroller->maintain( ).

     ENDIF.

   ENDLOOP.