cancel
Showing results for 
Search instead for 
Did you mean: 

Input field initial value problem

Former Member
0 Kudos

Hi All,

I have created an input field and binded it to a field of type NUMC 20.

Now when my initial screen opens it is displaying as 00000000000000000000.

If i use conversion exit, then my input field has one zero .

I want my input field to be blank in intial screen. How to achieve this?

Please explain

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Change the Formatting Property : Display Leading Zeros of Context Attribute binded to input field as Zeros as Blank.

Answers (1)

Answers (1)

arjun_thakur
Active Contributor
0 Kudos

Hi,

Use the method Set_attribute_null to remove the zeros.

Refer the code:


  DATA: LO_EL_CONTEXT TYPE REF TO IF_WD_CONTEXT_ELEMENT.
* get element via lead selection
 
 LO_EL_CONTEXT = WD_CONTEXT->GET_ELEMENT(  ).

  CALL METHOD lo_el_context->SET_ATTRIBUTE_NULL
    EXPORTING
      NAME   = 'ATTR1'.   "Give the name of the attribute which you have binded with your input field.