Skip to Content
0
Former Member
Dec 27, 2012 at 10:37 AM

SAPUI5 get textfield value and binding abap variable

143 Views

I have 2 Textfield and 1 Button.

First textfield is Personal Number (PERNR),

Second textfield is Personal Name (ENAME).

When i clicked button I want to get PERNR field value and binding this value to ABAP variable( lv_pernr ).

Then ;

select ename from ...... where lv_pernr...

I used to;

var txt1 = new sap.ui.commons.TextField( {

id:'text1',

liveChange:function(){( txt1.getValue().getText('<%=lv_pernr.%>'));}

});

txt1.placeAt("uiArea3");

var myButton = new sap.ui.commons.Button( {

text :'Preview',

id :'btn',

press :function() { location.href='?onInputProcessing('+txt1.getValue()+')'; .

var txt2 = new sap.ui.commons.TextField(

{ value: '<%=ename.%>' , editable : false});

sap.ui.setRoot("uiArea2", txt2) ;

myButton.placeAt("uiArea");

When I use 'location.href='?onInputProcessing' my page is refresh. But I don't want to refresh my page.