HTMLBusiness
The
Internet Transaction Server (ITS) requires an HTMLBusiness-template for each SAP transaction screen. An HTML Business-template is an HTML page in which HTML Business-commands are embedded.The ITS generates a page of pure HTML for each template.
HTMLBusiness
Properties
HTMLBusiness-commands are bracketed with ` (backtick) when mixed in with "normal" HTML.
There is no difference between upper and lower case in an HTMLBusiness expression.
There must be at least one character between two consecutive HTMLBusiness commands enclosed by a ` (backtick).
The
SAP@Web Studio shows the HTMLBusiness orders in blue.All names that occur in an HTMLBusiness expression are interpreted as names of a screen field.
If an HTMLBusiness expression consists of only one field name, this expression is replaced at runtime with the value of the R/3 screen field with the same name.
If a field with the addition .LABEL is used in an HTMLBusiness expression, this expression is replaced in the screen with the field indicator of the same name.
As well as
.LABEL , the following additions also exist, which can be used with every screen field that is ready for input.MAXSIZE |
Maximum entry length of a screen field |
VISSIZE |
Maximum number of characters visible in a screen field |
Programming Function Keys
If you want to design your form in such a way that inputs are not made directly in a field but with buttons, you must edit the HTML template as shown in the following example:
The standard task for approving an application contains the approval status element in its container. This element is marked as an import and export element and is defined with a data type reference to a Char1 field (for example
SYST-INPUT . )The HTML template for screen 100, therefore, contains the Approval status input field and the Transfer button as standard.
The functions you want to provide on the form will allow users to set the approval status to approved or rejected using one of two buttons and therefore end processing.
The Approval status input field and the Transfer pushbutton are to be removed.
The lines that generate this input field and button, therefore, must be deleted or commented out in the HTML template source code.

`approval status010100.label`
<INPUT TYPE="text" name="approval status010100" VALUE="`approval status010100`" maxlength="1" size="1" >
<INPUT TYPE="submit" name="~OkCode(STRT)" value="`START.label`">
The following lines are then added to the source code:

<FORM ACTION="`wgateURL()`" METHOD="post">
<INPUT TYPE="submit" name="~OKCode(STRT),
This source code creates the two buttons and labels them Accept and Reject. The value of the approval status container element is then set to A or R, depending on the button selected, and returned to the SAP System.
If the button text is to depend on the logon language, you must use language resources.
Integration of Possible Entries
By inserting a command it is now also possible in the web to use an input help for particular field types.

<input type="text" size="10" maxlength="10"
name= "`LASTDAY1_TEST015004.name`1"
value= "`LASTDAY1_TEST015004.value`">`assert(LASTDAY1_TEST015004.name)`
<INPUT TYPE="SUBMIT" NAME="~searchhelp(`LASTDAY1_TEST015004.name`)" VALUE="?">
Simplification of Process Flow for Work Item Execution

You may only implement this simplification if this service is to be executed exclusively using the Service Business Workplace in the Internet (BWSP). An extended executing service, as subsequently described, tried to go back to the Business Workplace in the Internet (BWSP) service. However, if the executing service was executed for example from the Workflow Inbox MiniApp, this leads to problems.
You can accelerate and simplify the process flow of execution by modifying the HTML template for the execution of a work item in the web described below. The Web Workplace is displayed directly, for example, if you cancel an activity.

Template 50: Instead of the old <form... , after <body>: <form action="`wgateURL()`&~ret_url=`~ret_url`" method="post">
Template 100: After </title> , before </ head> : <script language="JavaScript"> function logoff() { hiddenConfirm = new Image(); hiddenConfirm.src = "`wgateURL(~OKCode="/NEX")`"; } function return_bwsp() { parent.location.href="`~ret_url`&BW02_1400-CHOICE=BAIN&~okcode=WORK&~confirm_url=`~confirm_url`&~dec_state=1"; } </script> At the start, directly after <body ...> : Replace <form method="post" action="`wgateURL()`"> with:<FORM NAME="theform" METHOD=POST ACTION="`wgateURL(~OKCode="WORK")`&~dec_state=0&~ret_url=`~ret_url`&~confirm_url=`wgateURL()`"> Before the cancel button: Instead of <input type=submit name="~okcode=/NEX" value="`CANCEL.label`"></form> <FORM onsubmit="logoff()" METHOD=POST ACTION="`~ret_url`&BW02_1400-CHOICE=BAIN&~OKCode=WORK" target="_parent"> <input type=submit name="" value="`CANCEL.label`">
Template 200: Before </ head> : <script language="JavaScript"> function logoff() { hiddenConfirm = new Image(); hiddenConfirm.src = "`wgateURL(~OKCode="/NEX")`"; } function return_bwsp() { parent.location.href="`~ret_url`&BW02_1400-CHOICE=BAIN&~okcode=WORK&~confirm_url=`~confirm_url`&~dec_state=1"; } </script> In the <form></form>- blocks delete the following line:<input type=submit name="~okcode=/NEX" value="`SUBMIT.label`"> After </ head> :`if (~dec_state == "0")` <body onload="return_bwsp()" BGCOLOR="#ffffff" LINK=BLUE VLINK=BLUE> </body> `elseif (~dec_state == "1")` <body onload="logoff()" BGCOLOR="#ffffff" LINK=BLUE VLINK=BLUE> Before </ html> :`end` |