cancel
Showing results for 
Search instead for 
Did you mean: 

It removes only the zeros in the first line

Former Member
0 Kudos

Hi,

There are 10 lines within the editable table but I can remove only the first line of the default zeros.

How can I refer within the below loop each line to remove the other lines

Regards

ertas

this method has tow paramters NODE->String ATTRIBUT -> String

method CLEAR_LEADING_ZEROS .

Data: l_node type ref to if_wd_context_node.

l_node = wd_context->get_child_node( NODE ).

l_node->set_attribute_null( exporting name = ATTRIBUT ).

endmethod.
method WDDOINIT .

  DATA: lt_kteile TYPE if_main=>elements_zkauf,
              wa_kteile TYPE if_main=>element_zkauf,
              lv TYPE REF TO if_wd_context_node.

  DO 10 TIMES.
    APPEND wa_kteile TO lt_kteile.
  ENDDO.

  lv = wd_context->get_child_node( name = 'ZKAUF' ).
  lv->bind_table( new_items = lt_kteile ).

LOOP AT lt_kteile INTO wa_kteile.
  wd_this->clear_leading_zeros(
    node =   'ZKAUF'
    attribut =  'MGK'
  ).
ENDLOOP.

endmethod.

Edited by: Ilhan Ertas on Apr 28, 2009 4:01 PM

Accepted Solutions (1)

Accepted Solutions (1)

former_member40425
Contributor
0 Kudos

Hi,

Go to the properties of the Attribute which is binded to input field. there you will find formatting option.

Set Display leading zeros properties as Zeros as Blanks.

I hope it helps.

Regards,

Rohit

Former Member
0 Kudos

meanwhile I have solved this problem as you have suggested.

Nevertheless it is interessting to know how to solve such a problem as described

in my prior posting

Best Regards

Ilhan Ertas

Former Member
0 Kudos

Hi,

You are looping through the context elements right. Then try to use the set_attribute_null of each and every context element. I think you are calling anohter method(cleaR_leading_zeroes) where again you are using the node's method.

lt_elements = lr_node->get_elemnents( ). "LR_NODE has the node reference

Loop at lt_element into ls_element.

ls_element->set_attribute_null( name = 'XYZ' ).

Endloop.

This will do for all the elements. You can avoid calling the other method.

Regards,

Lekha.

Answers (0)