cancel
Showing results for 
Search instead for 
Did you mean: 

how to set inputfield's value to empty string?

Former Member
0 Kudos

hi all,

I have a inputfiled,and this inputfield bind to a context's attribute,and its type is T

when I open this view , this inputfield will show "00:00:00"

but I want it show empty string.

and I want to use method "set_nullable()" and set_attribute_null as SDN said

some one can show me the code

thanks so much

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

DATA lo_nd_nd_time TYPE REF TO if_wd_context_node.

DATA lo_el_nd_time TYPE REF TO if_wd_context_element.

DATA ls_nd_time TYPE wd_this->element_nd_time.

    • navigate from <CONTEXT> to <ND_TIME> via lead selection*

lo_nd_nd_time = wd_context->get_child_node( name = wd_this->wdctx_nd_time ).

lo_nd_nd_time->set_attribute_null(

EXPORTING

    • index = USE_LEAD_SELECTION*

name = 'ATR_TIME'

-).

This is code for displaying the input field null of attribute type T. ATR_TIME is the Attribute name and ND_TIME is the node name. Put this code in the Initialization event.

Regards,

Ragu.

Edited by: Ragu Prasad on Feb 6, 2009 7:30 AM

Former Member
0 Kudos

thanks ,your answer is right

Answers (1)

Answers (1)

former_member226203
Active Contributor
0 Kudos

i guess one way is like to code it in such a way that..ON_LOAD chk if this particular cell of the component is having a value 0 .If so clear it n make it blank or use field conversion here.

u can use the methids set_attribute_null. u can chk this.