URL Access to Smart Forms Objects
Use
Smart Forms uses the services of the Internet Communication Framework (ICF) when creating a Web form. You can use such a service to access Smart Forms objects - for example, Smart Styles, graphics, and texts - even independently of a complete Web form. To reference an object, simply use a URL. In this way, you can include a CSS style for a Smart Style or logos on your own Web pages, for example.
Integration
When you access a Smart Forms object using a URL, Smart Forms performs the following steps:
-
The object is read from the SAP system.
-
Smart Forms converts the object into a target format for display in the Web. Depending on the object, there may be more than one target format.
-
The converted target format is written in a cache in the SAP system. When accessed again (even by another user), the object does not need to be read and converted.
-
The object is usually transferred for display in a Web browser.
Features
To access objects, use a URL consisting of the address of your SAP Web Application Server (abbreviated to <WAS>), an appropriate directory path, and the object name. The target format is contained in the object name as a suffix:
-
http:// <WAS> /sap/bc/smart_forms/ <Object Type> / <Object Name> . <Format Suffix>
You can also append the BSP runtime to the URL parameters. In the case of text modules, you can use the parameter sap-language to control the language in which the text module is to be read from the SAP system. The parameter expects the language as a ISO language identifier (see also: System-Specific URL Parameters).
The prefix " http:// /sap/bc/smartforms <WAS>" is not included in the following overview because it is the same in each case:
URL Access to Smart Forms Objects
|
Object |
Output Format |
URL structure (without prefix, see above) |
|
Name space (with XML format) |
||
|
Form description |
XML |
/sfform/<form name> .xml |
|
urn:sap-com:SmartForms:2000:internal-structure |
||
|
Smart Style |
CSS |
/sfstyle/<name of Smart Style> .css |
|
BDS graphic |
BMP |
/gr/graphics/bmap/<type>/<name of graphic> .bmp <type> can be either
|
|
Text module |
HTML |
/sftext/<name of text module> .htm |
|
Text module |
XML |
/sftext/<name of text module> .xml |
|
urn:sap-com:SmartForms:2000:xsf |
||
|
SAPscript Text |
HTML |
/stdtext/<text object> /<text ID> /<language> /<text name>.htm |
|
SAPscript Text |
XML |
/stdtext/<text object> /<text ID> /<language> /<text name>.xml |
|
urn:sap-com:SmartForms:2000:xsf |
Example
You want to use the same fonts that you use on a form (when printing or using a Web form) on a different BSP page. Let us assume that your Smart Style has the name mystyle. You can download the relevant CSS style using the following URL:
-
http://<address of SAP Web AS> /sap/bc/smart_forms/sfstyle/mystyle.css
A paragraph format AS from the Smart Style could appear as follows in CSS style:
.MYSTYLE DIV#AS.par {
font-family : "Courier New" ;
font-size : 12pt ;
font-weight : bold ;
line-height : 1em ;
text-decoration : underline ;
text-align : left ;
}
If you now want to include the generated CSS in an HTML page, simply link to this style sheet in the header and use the tag <div> with the relevant attributes to access the formats:
<html>
<head>
<link rel="STYLESHEET"
href="/sap/bc/smart_forms/sfstyle/mystyle.css" />
</head>
<body>
<div class="MYSTYLE">
<div class="par" ID="AS">
Ihr formatierter Text
</div>
</div>
</body>
</html>