Skip to Content
author's profile photo Former Member
Former Member

Business Server Pages

Hi to all,

I have developed my own html page and I want to call this from ABAP/4 report. And the values which were entered on this page should get reflected back to report. I know the concept of servlets in java. The same I want to do with ABAP/4. Is that Java Servlets and Business Server Pages same?..... Sure I will award points to helpful answers.

-Satya Priya Vepakomma

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2007 at 09:53 AM

    <b>Hi,

    I think the below example will help two read the values from html page.

    in this example User will enter a name and number in initial page , in second page the name will be displayed as entered number of times.

    1. page one --HTML code.

    Declare the attributes w_name and w_number in two pages and set AUTO property in second page.

    <%@page language="abap" %>

    <%@extension name="htmlb" prefix="htmlb" %>

    <htmlb:content design="design2003" >

    <htmlb:page title="page1 " >

    <htmlb:form>

    <htmlb:label for = "name"

    text = "Name:"

    design = "EMPHASIZED" />

    <htmlb:inputField id = "namevalue"

    size = "10"

    type = "STRING"

    maxlength = "15" />

    <br>

    <htmlb:label for = "number"

    text = "Number:"

    design = "EMPHASIZED" />

    <htmlb:inputField id = "number_value"

    size = "10"

    type = "INTEGER"

    maxlength = "15" />

    <br>

    <br>

    <htmlb:button id = "display"

    text = "Display"

    width = "17"

    onClick = "disp" />

    </htmlb:form>

    </htmlb:page>

    </htmlb:content>

    -


    Events code ( OnInputProcessing)

    • event handler for checking and processing user input and

    • for defining navigation

    DATA: event TYPE REF TO if_htmlb_data.

    event = cl_htmlb_manager=>get_event( runtime->server->request ).

    DATA: lf1_obj TYPE REF TO cl_htmlb_inputfield.

    lf1_obj ?= cl_htmlb_manager=>get_data( request =

    runtime->server->request

    name = 'inputField'

    id ='namevalue'

    ).

    IF lf1_obj IS NOT INITIAL.

    w_name = lf1_obj->value.

    ENDIF.

    DATA: lf2_obj TYPE REF TO cl_htmlb_inputfield.

    lf2_obj ?= cl_htmlb_manager=>get_data( request =

    runtime->server->request

    name = 'inputField'

    id ='number_value'

    ).

    IF lf2_obj IS NOT INITIAL.

    w_number = lf2_obj->value.

    ENDIF.

    navigation->set_parameter( name = 'w_name' value = w_name ).

    navigation->set_parameter( name = 'w_number' value = w_number ).

    CASE event->event_id.

    WHEN 'display'.

    navigation->next_page( 'REQ1' ).

    WHEN OTHERS.

    ENDCASE.

    --Page 2 HTML Code.

    <%@page language="abap"%>

    <%@extension name="htmlb" prefix="htmlb"%>

    <htmlb:content design="design2003">

    <htmlb:page title = " ">

    <htmlb:form>

    <center>

    <htmlb:label for = "CMP"

    design = "EMPHASIZED"

    text = "YASH TECHNOLOGIES PVT. LTD." />

    </center>

    <htmlb:image src="REVIEW_YASH_LOGO.BMP" />

    <br>

    <br>

    <center>

    <%

    do w_number times.

    %>

    <font size = <%= sy-index%>>

    <%= w_name %>

    </font>

    <br>

    <%

    enddo.

    %>

    </center>

    </htmlb:form>

    </htmlb:page>

    </htmlb:content>

    ---</b>

     
    

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.