cancel
Showing results for 
Search instead for 
Did you mean: 

how press enter and show text on the screen.

Former Member
0 Kudos

Hi all:

how implement the requirement that press enter and show discription of company,

for example, when enter company code 1000 in inputfield and press enter, the txt

discription would show in a textview, the most important is how to catch the event

of pressing enter.

thank you very much

Accepted Solutions (0)

Answers (2)

Answers (2)

saket_abhyankar
Active Participant
0 Kudos

You can make use of the event 'onEnter' associated with the input field. You can define one method in this event, where you can write the required code. This will get triggered every time when you will enter in that input field.

I hope I have understood your question correctly.

Regards,

Saket

Former Member
0 Kudos

Hi,

You can define the action code when u create the button underlying Layout. Please go to the Methods and select the action ONACTION<action_name>,double click it and write the OO Code.

DATA: LT_NODE TYPE REF TO IF_WD_CONTEXT_NODE,

LT_EI_NODE TYPE REF TO IF_WD_CONTEXT_ELEMENT.

DATA: L_STRING TYPE STRING.

LT_NODE = WD_CONTEXT->GET_CHILD_NODE( NAME = 'NODE_NAME' ).

LT_EI_NODE = LT_NODE->GET_ELEMENT().

LT_EI_NODE->GET_NODE_ATTRIBUTE(

EXPORTING

NAME = <Attribute_name>

IMPORTING

VALUE = L_STRING ).

SELECT * FROM T001W WEHRE WERKS = L_STRING.

In addtion, you must bind the value of the textview to the attribute of the context code, it's important.

Above all is only for your reference. Maybe it's helpful to u.

Former Member
0 Kudos

thank you very much for your reply, " You can define the action code when u create the button underlying Layout.",

I don't quite understand the above, when I press enter not clik on the button you methioned, can the system catch

the action of pressing enter ?

Former Member
0 Kudos

Yes it can.

Check for the actions associated with the UI Element.

Thanks,

Sai