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

BSP Catalog of Utility Classes

I have started a new Weblog for cataloging all the useful BSP Utility Classes.


I encourage everyone to submit their favorite utility class, method, or even program that helps with BSP development. Even if I already have some entries for your favorite, perhaps you have a better explaination or example. I will collect and add all these entries to the weblog.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on Jan 23, 2005 at 08:22 PM

    Hallo Thomas,

    This weblog is very good. It is funny how these down to earth content can have such an impact. In principle, one just needs someone to show the road once, and this is what you did here!

    Allow me one remark: cl_http_ext_webapp=>create_url_for_bsp_application is very old (ancient?). I would recommend using directly cl_bsp_runtime=>construct_bsp_url.

    Then let me add CL_BSP_SERVER_SIDE_COOKIE. This is really an absolute bread-and-butter class for anyone considering to write high scalable applications (always stateless and leave everything in the server).

    And then, for those that can not help themselves, and insist on generating their own BSP applications: CL_BSP_API_GENERATE.

    There are times that people would like to get stuff in and out of the MIME repository. Here a colleague wrote an excellent API (after one has tried to mess with LOIOs!): IF_MR_API and CL_MIME_REPOSITORY_API (I can not remember if we did port this down onto 640).

    My personal favourite is CL_HTTP_EXT_BASE_HANDLER. This is the place where rubber meets the road and your first web service is done in 15 minutes. This is a base class that I use often to quickly write test programs with. See also: <a href="/people/brian.mckellar/blog/2003/09/30/bsp-in-depth-writing-an-http-handler">BSP In-Depth: Writing an HTTP Handler</a>.

    bye, brian

    Add a comment
    10|10000 characters needed characters exceeded

    • There are a few more interfaces that I would like to recommend: IF_HTTP_HEADER_FIELDS (& SAP) and IFHTTP_FORM_FIELDS (& SAP). These interfaces contains constant strings of all header/form fields that we regularly use. It prevents typing mistakes like "ContentDisposition". Typical examples:

      request->get_header_field( if_http_header_fields=>host ).
      response->set_header_field( if_http_header_fields=>content_type ).


  • author's profile photo Former Member
    Former Member
    Posted on Jan 14, 2005 at 09:08 AM

    Hi Thomas,

    first of all: great weblog of yours. Looks like a good reference for coding BSPs... 😊

    Some days ago I looked for a method which allows me to send emails from BSP pages. I stumbled across CL_WUI_UTIL an made a few tests with the method SEND_EMAIL. Unfortunately I was not able to continue on this and therefor I cannot provide any details about this method at the moment.

    Anybody using the method of this class for sending emails?

    Do you think this fits into your weblog? I thought about writing a weblog about sending mails from BSP in the future. Looking at my todo-list this 'future' is not likely to happen anytime soon...



    Add a comment
    10|10000 characters needed characters exceeded

    • Try this weblog here. It has how to setup Email in your system, but also has a code sample. The classes you are are looking for are cl_bcs


      Although not specific to BSP, these class could be quite important to the BSP developer. I will add a link to this weblog.

  • author's profile photo Former Member
    Former Member
    Posted on Jan 14, 2005 at 12:31 PM


    -- methods --

    ADD_MESSAGE: insert a new message into the message list. If the message is already into the list is is overwritten.

    ASSERT: this method returns the message index for a given condition - every message could have a condition.

    ASSERT_MESSAGE: is has the same functionality that ASSERT but returns the MESSAGE instead of the message INDEX.

    ASSERT_SEVERITY: is has the same functionality that ASSERT but returns the message SEVERITY instead of the message INDEX.

    GET_MESSAGE: given the message index, returns the entire message information.

    NUM_MESSAGES: returns the number of messages of the message list.

    DELETE_MESSAGE: deletes a message from the message list. You must indicate the message condition.

    RESET: deletes ALL messages from the message list.

    MODIFY_MESSAGE: it allows to change a message.

    MERGE: appends an instance of CL_BSP_MESSAGES into another instance of CL_BSP_MESSAGES.

    -- Sample --




    condition = 'mtv'

    message = 'File uploaded succesfully'

    severity = page->messages->co_severity_info ).



    <phtmlb:horizontalDivider hasRule="TRUE" separationHeight="MEDIUM" width="100%"/>

    <%-- system messages --%>

    <% IF page->messages->num_messages( ) NE 0. %>

    <% DATA: text TYPE string,

    messtyp TYPE i.



    INDEX = 1


    MESSAGE = text

    SEVERITY = messtyp ).


    <htmlb:gridLayout rowSize="1" columnSize="1" cellSpacing="0" width="100%">

    <htmlb:gridLayoutCell columnIndex="1" rowIndex="1" width="100%">

    <% IF messtyp EQ page->messages->co_severity_error. %>

    <phtmlb:messageBar id="errMessage" text="<%=text%>" type="ERROR"></phtmlb:messageBar>

    <% ELSE. %>

    <phtmlb:messageBar id="infoMessage" text="<%=text%>" type="OK"></phtmlb:messageBar>

    <% ENDIF.%>



    <phtmlb:horizontalDivider hasRule="FALSE" separationHeight="SMALL" width="100%"/>

    <% ENDIF. %>

    Add a comment
    10|10000 characters needed characters exceeded

    • Thanks, Ariel, for reminding me of that class - maybe I can provide a somewhat more extensive example of this as a weblog (after our Going-Live-Phase has calmed down).

      I use this class quite a lot, combined it with a tray to have the ability to display more than just a few messages without messing up the display of the rest of the page.

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.