Use the HTMLB library to display SAP data in HTML

Use the HTMLB library to display SAP data in HTML

Please send me the sample code to display SAP data from an internal table to HTML format, from an HTML screen to view/execute the trans code or query on SAP data.

    Requires Free Membership to View

    When you register, you will start receiving targeted emails from my award-winning team of editorial writers. Our goal is to keep you informed on the hottest topics and biggest challenges faced by SAP professionals today.

    Hannah Smalltree, Editorial Director

    By submitting your registration information to SearchSAP.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchSAP.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

First, you should have a look at the BSP examples with WebAS. See BSP applications in SE80 and inspect apps IT00 and HTMLB_SAMPLES.

For easy design, you can use the very powerful HTMLB library, a number of macros that render into plain HTML and Javascript. To see what is possible to create a BSP application and a page, browse the possible HTMLB tags in Tag Browser->BSP Extensions->Transportable->HMLB

A very simple example may look like this.

<html>
<head>
<% data: itab type table of sflight. %>
<% field-symbols: <row> like line of itab. %>
<% select * from sflight into table itab. %>
</head>
<body>
<table>
<% loop at itab assign <row>. %>
<tr>
<td><%= <row>-carrid %></td>
<td><%= <row>-connid %></td>
</tr>
<% endloop. %>
</table>
</body>
</html>

If you want to call transaction codes via HTML you need to activate the ITS.

This was first published in August 2005

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.