cancel
Showing results for 
Search instead for 
Did you mean: 

How to populate read only input field or text view form value help only

Former Member
0 Kudos

Hi experts,

I have one requirement to populate a read-only field or text view from value help.

User cant put any value there.value comes only from the value help.

For example,

when we read context using Code Wizard,we cant type any value there.value only comes from value help.

How to implement that functionality?

Please reply.

Thanks in advance,

Subhasis.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Yes it is possible.

1.Create a context Attribute and then bind this attribute to the Text view UI element.

2. read context attribute and then set value to the context attribute like this way.

DATA:

elem_context1 TYPE REF TO if_wd_context_element,

stru_context1 TYPE if_first=>element_context ,

item_potxt LIKE stru_context-potxt.

  • get element via lead selection

elem_context1 = wd_context->get_element( ).

stru_context1-potxt = 'PO'.

elem_context1->set_attribute(

VALUE = stru_context1

name = 'POTXT'

).

thanks

Suman

Edited by: suman kumar chinnam on Sep 9, 2008 12:12 PM

Former Member
0 Kudos

Hi Suman,

thanks for your reply.

But you didn't understand my question!

my question was,

An input field will be in read only mode but user can put value there by selecting value from value help(F4).

it is like when we read context using code wizard..value comes there from value help.

That is my requirement.

thanks,

Subhasis.

Edited by: subhasis on Sep 9, 2008 12:34 PM

Former Member
0 Kudos

Can anybody tell me the functionality can be implemented or not????