cancel
Showing results for 
Search instead for 
Did you mean: 

about disabled input field

Former Member
0 Kudos

Hi,

I am having a disabled input field on my screen whose

value is set equal to a character( of length 70) page attribute.The value of this page attribute is being set

in the oninitialization of the page

Problem is, when I am assigning any special character (#,or " etc) to the page attribute,the input field is not picking up the value of the attribute.

But when the input field is enabled it picks up fine.

What can be the problem ? Please help.

Regards,

Ananya

Accepted Solutions (0)

Answers (8)

Answers (8)

Former Member
0 Kudos

Hi,

Add one more attribute to your <htmlb:inputfield> i.e type attribute and give value STRING as shown in below code and check.

<htmlb:inputField id="SAMPLE" design="STANDARD" type="STRING" value="<%= var1%>"

disabled="TRUE"/>

Regards,

Azaz Ali.

Former Member
0 Kudos

Hi Ananya,

I got the solution may be you have given type="BCD".

If you give the type attribute BCD value it will not take "(i.e double quote).

Give the type attribute value as "STRING" then it works fine.

Regards,

Azaz Ali.

Former Member
0 Kudos

Hi,

Finally the problem has got solved.

in htmlb:page content we have to set attribute forceEncode="enabled".It worked then.

Thanks&Regards

Ananya

Former Member
0 Kudos

Hi,

i can't see that kind of attribute for the htmlb:page

i mean there is no attribute named forceEncode.

Regards,

Azaz Ali.

Former Member
0 Kudos

Hi,

It is <htmlb:content forceEncode="enabled">

Sorry for the mistake

Regards

Ananya

athavanraja
Active Contributor
0 Kudos

on a similar note if you are passing values thru url parameters, then when using special charactes it has to be URL escaped.

for example to pass # in the url, the escaped value is '%23' .

you can use class

cl_http_utility=>IF_HTTP_UTILITY~ESCAPE_URL method to do this .

Regards

Raja

Former Member
0 Kudos

Hi Ananya,

This did work for me as well. Thanks for the information.

Regards,

Bhavik Devisha

Former Member
0 Kudos

Hi,

It's working fine here check the Internet options and other settings.

Don't forget to reward points if the answers are helpful.

Regards,

Azaz Ali.

Former Member
0 Kudos

Hi,

I am sending you the entire code for a application which i have tried for you, just create a new application and just paste my code where ever required and check.

page type : page with flow logic

status : unchanged

In the layout

-


<%@page language="abap"%>

<%@extension name="htmlb" prefix="htmlb"%>

<htmlb:content design="design2003">

<htmlb:page title = "first page ">

<htmlb:form>

<br>

<br>

<htmlb:inputField id="SAMPLE" design="STANDARD" value="<%= var1%>"

disabled="TRUE"/>

</htmlb:form>

</htmlb:page>

</htmlb:content>

Event Onintialization

-


var1 = 'abc"dk'.

page attributes

-


var1 type char5

Try this with single page with flow logic. you will get the solution. After that you can cross check with your application where it is going wrong.

Regards,

Azaz Ali.

Former Member
0 Kudos

Hi,

Done exactly same way. but still not working.

Regards

Ananya

Former Member
0 Kudos

Hi,

No..It is still not solved. I did it the way you told..same way..but still it is not taking "

Regards

Ananya

Former Member
0 Kudos

Hi,

Did you got the solution? If there are any issues let me know.

Regards,

Azaz Ali.

Former Member
0 Kudos

Hi,

the problem is specifically occuring for the character

" ( i.e. double quotes).

For other characters it is ok.. Please help

Regards,

Ananya

Former Member
0 Kudos

Hi,

It's working fine for the "(i.e double quotes). Please try the code which i have sent it will work.

Regards,

Azaz Ali.

Former Member
0 Kudos

Hi,

I have used htmlb inputfield. Why is this problem ocuuring for special characters.

Thanks&regards

Ananya

Former Member
0 Kudos

Hi,

I have tried its working. i am sending you the sample code which i have worked try out with this you will get the solution.

In the layout

-


<htmlb:inputField id="SAMPLE" design="STANDARD" value="<%= var1%>"

disabled="TRUE"/>

In the page attributes

-


I have declared in this way...

var1 type char5

In the Oninitialization Event

-


var1 = 'abc#dk'.

It's working fine... try out this and let me know...

Regards,

Azaz Ali.

Former Member
0 Kudos

Hi,

Are you using in your layout, i mean javascript or htmlb?

Have you tried with both cases?

Regards,

Azaz Ali.