cancel
Showing results for 
Search instead for 
Did you mean: 

BHTML :Changing Font & Size - Input Field on Web Transaction

Former Member
0 Kudos

Hi,

I developed a Web Transaction with internet service. How do I change the font and size for input field. I tried :

<font face="Arial" color="Green" size="5">

`SAP_InputField("Z_BKUPSTF_T")`

</font>

or

<font face="Arial" color="Green" size="5">

`SAP_TemplateEditableField("Z_BKUPSTF_T", name="Z_BKUPSTF_T", value=Z_BKUPSTF_T, size="80")`

</font>

where Z_BKUPSTF_T is the field.

Both the approaches do not show any effect on ITS or Portal. Any advice is appreciated.

Thank you.

Regards

Kir Chern

Accepted Solutions (1)

Accepted Solutions (1)

former_member185704
Contributor
0 Kudos

Hi Kir Chem,

Your approach does not work because the settings of your font tag get overloaded by the class and style attributes of the HTML tags that are generated by function SAP_TemplateEditableField and SAP_InputField. Please look at the HTML source code that is generated by the ITS to see which CSS-classes are used by the sap-inputfields.

If all the inputfields you create should have the same fontsize and size you could create a new design for your EWT and set this design with the parameter ~design. You could copy the original ITS stylesheets into the new desgin and change the ITS stylesheet classes you want to change. The SAP Stylesheet Designer may be helpful for this task.

If only some inputfields should look different you should create a copy of the needed ITS template-library functions and customize them. But there will be a risk that your own bhtml functions may have to be changed to work after an ITS software update - and you are on your own then to solve the problems. Please look at templateLibraryField.html and templateLibraryDynpro.html to find the sourcecode of the functions mentioned above.

Best regards,

Henning.

P.S.: Please grant reward points for helpful answers.

former_member185704
Contributor
0 Kudos

Hi Kir Chem,

You can also add add your own stylesheet to the template (instead of creating a whole new design for your web transaction) in which you overload existing properties of the existing stylesheets. But this will only work if you use the CSS feature "! important".

Best regards,

Henning.

Former Member
0 Kudos

Hi Henning,

I have resolved the problem. I added the CSS :

<style>.{font-size: 10pt;}</style>

and it works. Thank you.

Regards

Kir Chern

former_member185704
Contributor
0 Kudos

Hi Kir,

I think

.{font-size: 10pt;}

will not work in Gecko based browsers (Firefox, Mozilla, Netscape). Please test that if necessary.

Best regards,

Henning.

Former Member
0 Kudos

Hi Henning.

I am in the process of creating ITS (mixed mode) transactions for TRIP and TP04 in order to change some of the template properties. The client does not want the WEBGui look&feel, but wants the theme on these transactions to correspond to their SAP Portal look&feel.I copied the standard transactions and programs and I created BHTML templates (for the new ITS services) from the standard screens for these transactions. However, when I call the service (i.e. .../scripts/wgate/ztp04/!) on the ITS I get an error message "Invalid Frame Name - If you are writing a multiframe application please set the variable ~FrameName in your document.". I am not sure what is required here (screen no?). What exactly is the ITS looking for in this template variable ~FRAMENAME. I apologise if this is a stupid question, but I am not fluent in HTML or BHTML and need some expert guidance here.

Regards

Marius

Former Member
0 Kudos

Hi Marius,

Did you succed on doing this? I don´t even know how to modify or create the BHTML and how to apply it to my Internet Service that I created.

Kind Regards,

Gerardo J

Former Member
0 Kudos

Hi Marius, Gerardo,

If you have resolved the issue, please could you send an email with the information for achieving it????

I would appreciatte it so much. My email: ferrando.rosa@gmail.com

Best Regards and thanks in advance.

Rosa

Answers (0)