How to display message in Servlet

I try to display an error message for user to see.
Please help me on that to develop the servlet program. Thanks

servlet is server side , if u wan't to inform the client that an erros has accured u can do that in two simple ways :
a. when an exception has been cought responseredirect him to let's say error.jsp and display and appropiate message
b. include a div which has a <p> in the bottom of it when default value of visibility is set to hidden and when an error has accured for example failure on sever side validation stick appropiate attribute to session and return back to jsp ....
BOL.

Similar Messages

  • Display Message using Servlet

    I tried to display message prompt to the user using servlet. Can anyone has this code or guideline that can guide me??

    what you need to do is
    request.setAttribute("error", "search item doesnot exist") if surname, designation is null or invalid and forward request to results.jsp page.
    In results.jsp page, check this attribute "error".. if its null then display results present in "arraylist" attribute else display "error" attribute value.
    When you are catching exception, in catch block redirect to error.jsp.

  • How to display message when no return values in powershell script?

    Hello,
    I have written following command that returns "Failed" timer job titles for previous day :
    $FailedSPTimerJobs = Get-SPTimerJob | % { $_.HistoryEntries } | Where-Object {($_.StartTime -gt $YesterdayStartDateTime) -and ($_.To -lt $YesterdayEndDateTime) -and ($_.Status -eq 'Failed')}| Select JobDefinitionTitle | ConvertTo-Html -Fragment
    ConvertTo-Html -Body "<font color = blue><H4><B>Report </B></H4></font>$FailedSPTimerJobs " -Title "Test Report" -CssUri C:\style.CSS | Out-File "E:\Reports\Test.html"
    However, I need to display Message ( "There are no Failed Jobs recorded") when records are NULL.
    Would you please let me know how can I achieve this ?
    Thanks and Regards,
    Dipti Chhatrapati

    You could just do something like
    if ($FailedSPTimerJobs){ 
    $FailedSPTimerJobs
    = "There are no Failed Jobs recorded"
    should have been 
    if (!$FailedSPTimerJobs){ 
    $FailedSPTimerJobs
    = "There are no Failed Jobs recorded"

  • How to display message in Default Frame work Page (Page Title bar)

    Dear Guru,
                    I want to display message in Page Title Bar , and that message should move like(Marquee in html) . So please any one suggest how to do and that message should be display for certain time.
    Thanks and regards
    Kumar Rakesh.

    Kumar,
    create a bsp application and create an iview from it and put it in default framework page
    code for the same
      <%@extension name="htmlb" prefix="htmlb" %>
    <%@extension name="bsp" prefix="bsp" %>
    <htmlb:content design="design2003" >
      <htmlb:document>
        <htmlb:documentHead>
        <htmlb:headInclude />
        <style type="text/css">
        .urBdyStd { background-color: "#455F55"; }
        </style>
        </htmlb:documentHead>
        <htmlb:documentBody>
    <marquee scrollamount="3" >
    <%-- <htmlb:textView
    encode ="true"
    id="a"
    textColor = "white"
    text = "BI Reports are currently down" />--%>
    <b><font size="2" color="red"><%=wa_rep-s_message%></font></b>
    </marquee>
        </htmlb:documentBody>
      </htmlb:document>
    </htmlb:content>

  • How to display message in Ajax Model pop-up extender/overlay on click of a link button

    I am dynamically create the link button using reapeter control and each link assign to different type of content.i want to show the content in  a overlay / Ajax modal pop-up extender. ( Content Type: Video/PDF/Text).
    I need to know how to display the content in overlay/Modal pop-up on click of the link button.

    Hi,
    According to your description, my understanding is that you want to display the content of Video/PDF/Text in a pop-up dialogue when clicking the link button.
    I suggest you can use the Jquery media plugin to open the file content in a pop up dialogue.
    Here is a detailed code demo for your reference:
    Jquery: Open PDF File in browser with Modal Popup using Jquery Media Plugin
    Thanks
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to display - Message Length more than 100 characters

    Hi,
    I am displaying a message string which gets generated dynamically. Which means I donno theolength of that. It may go upto 200 characters also.
    However, In message display, the number of characters have some limit.
    Could you please let me know, How can I achieve this?
    MESSAGE E000 with lv_string.
    Thanks,
    Sandeep

    Hi Srini,
    I have already 4 place holders. And one of the place holder will be populated dynamically which I mentioned above. And more than 4 place holders, it is not accepting.
    Could you please help me.
    Thanks,
    Sandeep

  • How to display messages in status bar

    Hello,
    Im developing some forms that will be published in EBS 12.1.1
    Im using Oracle Forms Builder v 10.12.0.2.
    Those forms are based on the Template form.
    I have the following problem: Messages are not displayed in the status bar (for example messages about how many records were affected when the user press Save)
    Do you know if I need to set up any property or another task that I need to do in order to see the messages ?
    Thanks in advance,
    Sergio Maestri

    Sergio,
    Even though your form is based on the Apps Template form, double-check to ensure it has all of the triggers it should have, like the Form level Key-Commit. The easiest way to make this comparison would be to open your custom form and then open one of the EBS forms like "ARXCUDCI". If your comparison shows no significant differences you might be dealing with a situation when the message is displaying in the Console (status bar) but something else is clearing the console. Check for any Clear_Message calls.
    Hope this helps.
    Craig...
    If my response or the response of another was helpful, please mark it accordingly

  • Web ADI - How to display messages in Excel

    Hi,
    I'm building a group validator in java in WebADI and I run into two problems:
    1) One row in Excel can have both errors and warnings. The colour of the smiley depends on which message was uploaded last. But if I have an error I don't want to have it displayed as a warning (if the last message is a warning)!
    Now I have a check so that if I find an error I will not upload the warning message. But if the error is found by another validator, how can I see that? Is there any way? Are the error messages stored anywhere?
    2) I want to upload messages to the rows in Excel even if the upload was successful. There is the possibility to upload error and warning messages but I want a green smiley and a message on the row level. Does anyone know how to do that?
    Thanks a lot!
    Best wishes
    Kerstin

    Hi Seshu,
    Disable the parent iviews message area before calling the child(popup) window. Then you can get the message in the child(popup) window.
    According to documentation, oldest (parent) message area would be used if there are more than one windows (in a layout).
    Thanks,
    Raags
    PS: If useful reward points

  • How to display message in the alert box

    hi every  one,
    i am inserting some data into the fields and selecting the button to insert.
    but it is inserting even fields are empty..
    i want to display "so and so field is empty.. please enter"
    it should display  a box and return if u press ok.
    how to do this

    Hi,
    I think this code will help you.
    public void onActionAddressSelected(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionAddressSelected(ServerEvent)
              String dialogText = "Would you like to fetch this EmaiId ?";
             IWDConfirmationDialog dialog = wdThis.wdGetLoginController().wdGetAPI().getWindowManager().createConfirmationWindow(dialogText,wdThis.wdGetAPI().getViewInfo().getViewController().findInEventHandlers("Yes"),"Yes");
              dialog.addChoice(wdThis.wdGetAPI().getViewInfo().getViewController().findInEventHandlers("Cancel"),"Cancel");
              //dialog.addChoice(eventHandler,"OK");
              dialog.setWindowPosition(WDWindowPos.CENTER);
              dialog.open();
              //wdThis.wdGetLoginComponentController().fireAddressSelectedEvent();
        //@@end
    Regards,
    Karthick

  • How to display message using default lock in ORACLE 9i?

    I am using ORACLE 9i I am inserting a same record in a same table (which is having primary key) of same user with different sql editor (or from different machines).
    with same time.
    One person is able to insert the record..
    But other one is in processing state, once the inserted person give commit,then only other person got the message "Primary key constraint voilated".
    This is bcoz of concurrency in oracle. For this purpose Oracle uses default lock.
    Is it possible to give message to other person like "One user is using this table..", after a record is inserted and before commit is get issued by the inserted user?
    how can i do this?
    Thanks a lot for your help

    [url http://forums.oracle.com/forums/thread.jspa?threadID=543335&tstart=0]duplicate thread

  • How To Display Message Dialog when the Database is Empty

    Hello everybody...Im writing a mini app which uses swing GUI and JDBC. the program is a mini contacts book which adds data to the database thru the textfields and retrives the data to the textfield.now what i want to do is when the menu "show record" is clicked and then there is no data in the database, it should display "no records found" because the database is empty. how do i do that?I need urgent help thanks...

    Scrolling of results can be done in 2 ways.
    if ur result set are small, read them in one go and display as PREV / NEXT button is pressed,
    Or if ur result set is very large, maintain internal counters, and navigate with them.
    When u are at first / last entry, better dissable those button actions.
    I hope this will help you.
    Regards
    BS

  • How to display message

    Hi experts,
    I have a internal table with values, in that field t_data-NAFAZ condains records with plus and mines values, while executing the program if the field i_data-nafaz contains mines values user need a error message. for that how i can give the condition?
    This field condains mines values raise the massege....
    any one plz help this.
    Mohana

    Hi,
    As NAFAZ is a decimal field you can use;
    IF t_data-NAFAZ LT 0.
      Error
    ENDIF.
    or
    IF t_data-NAFAZ < 0.
      Error
    ENDIF.
    Regards,
    Nick

  • How to display weicome message in sap logon screen?

    Hello experts,
       how to  display message " welcome to company name" in the sap logon screen.
    while typing userid and password in the same screen (right hand side ) , i want to display welcome message.
    Pls give me the procedure.
    Moderator message: easy to find via google, system administration, not related to ABAP development, please search for available information/documentation before asking.
    locked by: Thomas Zloch on Oct 11, 2010 11:44 AM

    If you want to give an error message on some processing you can raise the message in the event at selection-screen.
    If you want to display information message also ,the same can be done in at selection screen
    In case you want to do the processing selectively like only when the execute button is pressed, then you can do the processing based on SY-UCOMM. (value will be 'ONLI' )

  • How to display Some message in the BEX Explorer

    Hi Experts,
    We have a scenario where we will check for a condition in the User Exit Variable.
    Depending on the condition we need to stop the execution of the query and display some message.
    Can any one please help me in explaining me how to display message in the BEX and stop the Query Execution.
    Thanks in Advance,
    Premkumar

    Somenath,
    I think from what I gathered in the other posts on SDN about exceptions that it can be used only within a function module and not directly ..
    http://help.sap.com//saphelp_470/helpdata/EN/9f/dbaa0635c111d1829f0000e829fbfe/content.htm
    Try creating a Z Function module to display the exception but then the exception would stop only your Z Function module and not the user exit from going further..
    Arun
    P.S some more dope on the same with regard to raising exceptions in programs ( in your case ZXSRU01)
    http://help.sap.com/saphelp_nw04/helpdata/en/55/bff20efe8c11d4b54a006094b9456f/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/83/636d2012fc11d5991e00508b5d5211/content.htm
    Message was edited by:
            Arun Varadarajan

  • How to save message into internal table?

    Hi,everyone!
    I have a problem when I'm coding.I want to store messages into a internal table.Can you help me?
    Thanks!

    Hello Feng
    If you are already working on SAP basis release >= 6.20 I would recommend the most versatile message handler of all: interface <b>IF_RECA_MESSAGE_LIST</b>
    Perhaps you will find the following sample report ZUS_SDN_APOLLO_13
    (see also: <a href="https://wiki.sdn.sap.com/wiki/display/profile/2007/07/09/MessageHandling-FindingtheNeedleintheHaystack">Message Handling - Finding the Needle in the Haystack</a>) useful.
    *& Report  ZUS_SDN_APOLLO_13
    REPORT  zus_sdn_apollo_13
      LINE-SIZE 200.
    TYPE-POOLS: abap.
    TYPES: BEGIN OF ty_s_outtab.
    TYPES:   status     TYPE exception.
    INCLUDE TYPE bapiret2  AS msg.
    TYPES: END OF ty_s_outtab.
    TYPES: ty_t_outtab  TYPE STANDARD TABLE OF ty_s_outtab
                        WITH DEFAULT KEY.
    DATA:
      gs_layout         TYPE lvc_s_layo,
      gt_outtab         TYPE ty_t_outtab.
    DATA:
      gd_title          TYPE lvc_title,
      gd_msgv           TYPE symsgv,
      gd_msg            TYPE bapi_msg,
      gs_msg            TYPE recamsg,
      gs_return         TYPE bapiret2,
      gt_return         TYPE bapirettab,
      go_msglist        TYPE REF TO if_reca_message_list,
      go_random         TYPE REF TO cl_random_number,
      gif_random        TYPE REF TO if_random_number.
    PARAMETERS:
      p_opt1  RADIOBUTTON GROUP radi  DEFAULT 'X',
      p_opt2  RADIOBUTTON GROUP radi,
      p_opt3  RADIOBUTTON GROUP radi.
    SELECTION-SCREEN ULINE.
    PARAMETERS:
      p_opt4  RADIOBUTTON GROUP radi,
      p_opt5  RADIOBUTTON GROUP radi,
      p_opt6  RADIOBUTTON GROUP radi.
    SELECTION-SCREEN ULINE.
    PARAMETERS:
      p_count    TYPE numc3     DEFAULT '4',
      p_level    TYPE ballevel  DEFAULT '7'.
    DEFINE mac_build_msg.
      clear: gs_msg.
      gs_msg-msgty = &5.
      gs_msg-msgid = '00'.
      gs_msg-msgno = '398'.
      gs_msg-msgv1 = &1.
      gs_msg-msgv2 = &2.
      gs_msg-msgv3 = &3.
      gs_msg-msgv4 = &4.
      gs_msg-detlevel = &6.
    END-OF-DEFINITION.
    *  msgty
    *  msgid
    *  msgno
    *  msgv1
    *  msgv2
    *  msgv3
    *  msgv4
    *  msgv1_src
    *  msgv2_src
    *  msgv3_src
    *  msgv4_src
    *  detlevel
    *  probclass
    *  alsort
    *  time_stmp
    *  msg_count
    *  context
    *  params
    START-OF-SELECTION.
      " Create message handler
      go_msglist = cf_reca_message_list=>create( ).
      " Create random number instance
      CREATE OBJECT go_random TYPE cl_random_number.
      gif_random ?= go_random.
      gif_random->init( ).
      PERFORM message_handling_1.
      PERFORM message_handling_2.
      PERFORM message_handling_3.
      PERFORM message_handling_4.
    END-OF-SELECTION.
    *&      Form  MESSAGE_HANDLING_1
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM message_handling_1 .
      CHECK ( p_opt1 = abap_true ).
      gd_title = 'Information System 1 (IS1)'.
      SET TITLEBAR 'TITLE' WITH gd_title.
      WRITE: / 'Apollo 13 Mission'.
      WRITE: / syst-uline.
      WRITE: / 'Take-Off             -> ok'.
      WRITE: / 'Leaving Orbit        -> ok'.
      WRITE: / 'Trajectory           -> ok'.
      WRITE: /.
      FORMAT COLOR COL_NEGATIVE.
      WRITE: / 'Explosion happened   -> not ok'.
      WRITE: / 'Command and Service module (CSM) -> damaged'.
      FORMAT RESET.
      WRITE: / 'Lunar module (LM)    -> not affected, ok'.
      MESSAGE text-hou TYPE 'S'.
    ENDFORM.                    " MESSAGE_HANDLING_1
    *&      Form  message_handling_2
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM message_handling_2 .
    * define local data
      DATA:
        ld_success(6)  TYPE n,
        ld_warning(6)  TYPE n,
        ld_failure(6)  TYPE n,
        ld_total(6)    TYPE n.
      CHECK ( p_opt2 = abap_true ).
      gd_title = 'Information System 2 (IS2)'.
      SET TITLEBAR 'TITLE' WITH gd_title.
      PERFORM generate_messages.  " simulation of messages
      CALL METHOD go_msglist->get_list_as_bapiret
        IMPORTING
          et_list = gt_return.
      " Calculate message types and total
      ld_total   = 0.
      ld_success = 0.
      ld_warning = 0.
      ld_failure = 0.
    " Print messages as WRITE list
      LOOP AT gt_return INTO gs_return.
        IF ( gs_return-type = 'E' ).
          ADD 1 TO ld_failure.
        ELSEIF ( gs_return-type = 'W' ).
          ADD 1 TO ld_warning.
        ELSE.
          ADD 1 TO ld_success.
        ENDIF.
      ENDLOOP.
      ld_total = ld_success + ld_warning + ld_failure.
      WRITE: / 'Total Message =', ld_total.
      WRITE: / 'Failures      =', ld_failure.
      WRITE: / 'Warnings      =', ld_warning.
      WRITE: / 'Successes     =', ld_success.
      WRITE: / syst-uline.
      SKIP.
    " Colouring depending on message type
      LOOP AT gt_return INTO gs_return.
        IF ( gs_return-type = 'E' ).
          FORMAT COLOR COL_NEGATIVE.
        ELSEIF ( gs_return-type = 'W' ).
          FORMAT COLOR COL_TOTAL.
        ELSE.
          FORMAT RESET.
        ENDIF.
        WRITE: / gs_return-type, gs_return-message+0(100).
      ENDLOOP.
    ENDFORM.                    " message_handling_2
    *&      Form  message_handling_3
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM message_handling_3 .
    * define local data
      DATA:
        ls_outtab    TYPE ty_s_outtab.
      DATA:
        ld_success(6)  TYPE n,
        ld_warning(6)  TYPE n,
        ld_failure(6)  TYPE n,
        ld_total(6)    TYPE n.
      CHECK ( p_opt3 = abap_true ).
      gd_title = 'Information System 3 (IS3)'.
      SET TITLEBAR 'TITLE' WITH gd_title.
      PERFORM generate_messages.  " simulation of messages
      CALL METHOD go_msglist->get_list_as_bapiret
        IMPORTING
          et_list = gt_return.
      REFRESH: gt_outtab.
      " Calculate message types and total
      ld_total   = 0.
      ld_success = 0.
      ld_warning = 0.
      ld_failure = 0.
    " Define the logic for setting exception status (LED)
      LOOP AT gt_return INTO gs_return.
        CLEAR: ls_outtab.
        ls_outtab-msg = gs_return.
        IF ( gs_return-type = 'E' ).
          ls_outtab-status = '1'.  " red
          ADD 1 TO ld_failure.
        ELSEIF ( gs_return-type = 'W' ).
          ls_outtab-status = '2'.  " yellow
          ADD 1 TO ld_warning.
        ELSE.
          ls_outtab-status = '3'.  " green
          ADD 1 TO ld_success.
        ENDIF.
        APPEND ls_outtab TO gt_outtab.
      ENDLOOP.
      ld_total = ld_failure + ld_warning + ld_success.
      CLEAR: gs_layout.
      gs_layout-cwidth_opt = abap_true.
      gs_layout-zebra      = abap_true.
      gs_layout-excp_fname = 'STATUS'.
      gs_layout-excp_led   = abap_true.
      gs_layout-smalltitle = abap_true.
      CONCATENATE 'T(' ld_total   ')  '
                  'E(' ld_failure ')  '
                  'W(' ld_warning ')  '
                  'S(' ld_success ')  '
        INTO gd_title SEPARATED BY space.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
        EXPORTING
          i_structure_name = 'BAPIRET2'
          i_grid_title     = gd_title
          is_layout_lvc    = gs_layout
        TABLES
          t_outtab         = gt_outtab
        EXCEPTIONS
          OTHERS           = 1.
    ENDFORM.                    " message_handling_3
    *&      Form  message_handling_4
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM message_handling_4 .
    * define local data
      CHECK ( p_opt4 = abap_true   OR
              p_opt5 = abap_true   OR
              p_opt6 = abap_true ).
      IF ( p_opt4 = abap_true ).
        gd_title = 'Information System 4 (IS4)'.
        SET TITLEBAR 'TITLE' WITH gd_title.
      ELSEIF ( p_opt5 = abap_true ).
        gd_title = 'Information System 5 (IS5)'.
        SET TITLEBAR 'TITLE' WITH gd_title.
      ELSE.
        gd_title = 'Information System 6 (IS6)'.
        SET TITLEBAR 'TITLE' WITH gd_title.
      ENDIF.
      PERFORM generate_messages.  " simulation of messages
      PERFORM display_log.
    ENDFORM.                    " message_handling_4
    *&      Form  GENERATE_MESSAGES
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM generate_messages .
    * define local data
      mac_build_msg 'Apollo 13 Mission: Spacecraft'
                     space space space 'I' '1'.
    **  DEFINE mac_build_msg.
    **    clear: gs_msg.
    **    gs_msg-msgty = &5.
    **    gs_msg-msgid = '00'.
    **    gs_msg-msgno = '398'.
    **    gs_msg-msgv1 = &1.
    **    gs_msg-msgv2 = &2.
    **    gs_msg-msgv3 = &3.
    **    gs_msg-msgv4 = &4.
    **    gs_msg-detlevel = &6.
    **  END-OF-DEFINITION.
      go_msglist->add( is_message = gs_msg ).
      DO 6 TIMES.
        CASE syst-index.
          WHEN '1'.
            mac_build_msg 'Command and Service Module (CSM)'
               space space space 'I' '2'.
          WHEN '2'.
            mac_build_msg 'Lunar Module (LM)' space space space 'I' '2'.
          WHEN '3'.
            mac_build_msg 'Additional Module (M-1)'
              space space space 'I' '2'.
          WHEN '4'.
            mac_build_msg 'Additional Module (M-2)'
              space space space 'I' '2'.
          WHEN '5'.
            mac_build_msg 'Additional Module (M-3)'
              space space space 'I' '2'.
          WHEN '6'.
            mac_build_msg 'Additional Module (M-4)'
              space space space 'I' '2'.
          WHEN OTHERS.
            EXIT.
        ENDCASE.
        go_msglist->add( is_message = gs_msg ).
    "   recursive call of routine
        PERFORM generate_messages_1 USING syst-index 'Modul' '3'.
      ENDDO.
    ENDFORM.                    " GENERATE_MESSAGES
    *&      Form  GENERATE_MESSAGES_1
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM generate_messages_1
                         USING
                            value(ud_index)     TYPE i
                            value(ud_msgv)      TYPE symsgv
                            value(ud_detlevel)  TYPE ballevel.
    * define local data
      DATA:
        ld_integer         TYPE i,
        ld_msgty           TYPE symsgty,
        ld_msgv            TYPE symsgv,
        ld_detlevel        TYPE ballevel.
      DO p_count TIMES.
        WRITE syst-index TO ld_msgv NO-ZERO LEFT-JUSTIFIED.
        IF ( ud_detlevel = '3' ).
          CONCATENATE ud_msgv ld_msgv INTO ld_msgv
            SEPARATED BY space.
        ELSE.
          CONCATENATE ud_msgv ld_msgv INTO ld_msgv
            SEPARATED BY '.'.
        ENDIF.
        CONDENSE ld_msgv.
        gd_msgv = ld_msgv.
        IF ( ud_index = 1 ).
          ld_integer = gif_random->get_random_int( 300 ).
          IF ( ld_integer = 1 ).
            ld_msgty = 'E'.
            CONCATENATE gd_msgv 'failed' INTO gd_msgv SEPARATED BY ' -> '.
          ELSEIF ( ld_integer BETWEEN 1 AND 10 ).
            ld_msgty = 'W'.
            CONCATENATE gd_msgv 'check(?)' INTO gd_msgv SEPARATED BY ' -> '.
          ELSE.
            ld_msgty = 'S'.
            CONCATENATE gd_msgv 'OK' INTO gd_msgv SEPARATED BY ' -> '.
          ENDIF.
        ELSE.
          ld_msgty = 'S'.
          CONCATENATE gd_msgv 'OK' INTO gd_msgv SEPARATED BY ' -> '.
        ENDIF.
        mac_build_msg gd_msgv space space space ld_msgty ud_detlevel.
        go_msglist->add( is_message = gs_msg ).
        IF ( ud_detlevel < p_level ).
          ld_detlevel = ud_detlevel + 1.
          PERFORM generate_messages_1 USING ud_index ld_msgv ld_detlevel.
        ENDIF.
      ENDDO.
    ENDFORM.                    " GENERATE_MESSAGES_1
    *&      Form  DISPLAY_LOG
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM display_log .
    * define local data
      DATA:
        ld_handle           TYPE balloghndl,
        lt_log_handles      TYPE bal_t_logh,
        ls_profile          TYPE bal_s_prof.
    " Get log handle of collected message list
      ld_handle = go_msglist->get_handle( ).
      APPEND ld_handle TO lt_log_handles.
      IF ( p_opt4 = 'X' ).
    *   get a display profile which describes how to display messages
        CALL FUNCTION 'BAL_DSP_PROFILE_DETLEVEL_GET'
          IMPORTING
            e_s_display_profile = ls_profile.  " tree & ALV list
      ELSEIF ( p_opt5 = 'X' ).
    *   get standard profile to display one log
        CALL FUNCTION 'BAL_DSP_PROFILE_SINGLE_LOG_GET'
          IMPORTING
            e_s_display_profile = ls_profile.
      ELSE.
        CALL FUNCTION 'BAL_DSP_PROFILE_NO_TREE_GET'
          IMPORTING
            e_s_display_profile = ls_profile.
      ENDIF.
    * set report to allow saving of variants
      ls_profile-disvariant-report = sy-repid.
    *   when you use also other ALV lists in your report,
    *   please specify a handle to distinguish between the display
    *   variants of these different lists, e.g:
      ls_profile-disvariant-handle = 'LOG'.
      CALL FUNCTION 'BAL_DSP_LOG_DISPLAY'
        EXPORTING
          i_s_display_profile          = ls_profile
          i_t_log_handle               = lt_log_handles
        EXCEPTIONS
          profile_inconsistent         = 1
          internal_error               = 2
          no_data_available            = 3
          no_authority                 = 4
          OTHERS                       = 5.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " DISPLAY_LOG
    Regards
      Uwe

Maybe you are looking for

  • Problem In Invoice Printing...!!

    Hi all, I have a custom invoice which I've prepared using smartforms. It has got a bigger size & I have a new Page format to serve this purpose. I am able to see the print preview. Its fine. The page being used for printing has got the correct size.

  • JavaScript Links Don't Work

    I don't know if I'm in the right place to ask this question, but could someone please help me? I'm using Windows XP Professional Corporate Edition. When I first installed Windows everything worked fine. Then I downloaded Windows XP Service Pack 2. So

  • BEx Broadcasting through e-mail

    Dear Gurus, I have a situation where, we are supposed to broadcast reports  every month to the users e-mail. Report has to be broadcasted to different users with different Cost Centers . I have 3 selections for the  report of which 2 selections are p

  • YouTube won't work in any browser

    So I'm running 10.6.7 on my Mac and YouTube just doesn't work in any capacity, on the page itself (which doesn't load properly and seems to ignore that I have Flash and/or Java) or embedded. No, wait! I just spontaneously got two embedded videos to w

  • VPN Connection in PI

    Hello Frns, we will be integrating 3rd party FTP system using PI with SAP system for some sales order IDoc interfaces. We have only way to access the third party system is VPN.I don't know how it works and how it's different from normal FTP or SFTP s