!--a11y-->
The main task of HTMLBusiness is to tell the Internet Transaction Server (ITS) how to transfer data between R/3 screens and the HTML templates.
At runtime, there are two types of R/3 field known to the ITS:
Only screen fields are visible to the ITS. Fields known only to the module pool are not visible.
These are fields transferred by the ABAP program using the ITS macros
FIELD_SET or
FIELD_TRANSPORT.
Referencing Screen Fields
Field replacement is the simplest form of HTMLBusiness statement. This controls how screen values are copied to the HTML page and how values from the Web browser are integrated into entry fields on the R/3 screen.
There is normally a 1:1 relationship between screen fields and HTML fields, whether you are reading from or writing to the screen. However, large text areas are an exception to this rule.
With the exception of reserved keywords, every HTMLBusiness expression is treated as a screen field name:
To display R/3 screen field data in your HTML page, you simply enclose the R/3 field name in
<server>...</server> tags or back quotes.Field Identifier Syntax
The following table shows the syntax for referencing R/3 screen fields in HTMLBusiness. The attributes provide additional information about the field.
Name |
Syntax |
Field |
{ ^ } identifier [ [ expression ] ] [. attribute ] |
Attribute |
dim | |
disabled | | |
exists | | |
label | | |
maxSize | | |
name | | |
type | | |
value | | |
visSize |
In HTMLBusiness, field identifiers should conform to the same conventions as in other programming languages such as C or JavaScript.
These conventions are summarized in the following table:
Field Identifier Component |
Possible Characters |
Values |
First character |
Letters |
a…z, A…Z |
Underscore |
_ | |
Tilde |
~ | |
Subequent characters |
Letters |
a…z, A…Z |
Underscore |
_ | |
Tilde |
~ | |
Digits |
0…9 | |
Hyphen |
- |

The following are valid field identifiers:
nCustomers
_foo_bar
~frame
date1
ordered_items
vbcom-kunde
You must enclose the entire field identifier in single quotation marks:

'*vbcom-kunde'
'$@#identifier()***'
'from'
Identifiers such as
vbcom-kunde do not need single quotes, because the hyphen is legal. Simply write `vbcom-kunde` instead of `'vbcom-kunde'` .However, if you want to use arithmetic expressions that contain minus signs, there must be at least one space before and after the minus sign:
Limiting the Number of Characters
You can limit the number of characters per field that are transferred from the HTML page to the screen by entering a colon after the field name and then specifying the number of characters. You must specify the length between the field name and the index.
If you limit the number of characters in this way, extra characters are lost. This does not apply when the field is an array and you have not specified an explicit index with
[] . In this case, characters beyond your specified limit are included in a new line of the step loop. This is necessary when processing large text areas.Field Attributes
There are several attributes you can use to find out properties of R/3 fields. For further information, see
Getting R/3 Field Attributes.