ALV: Refreshing Header Info

Hello Guru's,
i've got a Report which lists some Employes. The Data is displayed in an ALV. The Header of this ALV displays the Count of Employes displayed.
My Problem: Is there any posibility to refresh the Employee Count in the Header when maybe a Filter on the ALV is set and the displayed Count of Employes changed?
Regards

Try implementing the AFTER_USER_COMMAND event of CL_GUI_ALV_GRID class.
In its implementation checked if the filter was selected, determine the number of the rows filtered.
There is method get_filtered_entries in class cl_gui_alv_grid which returns a table of all entries hidden by the filter. This will help you in determining the number of records hidden by the filter and so you can calculate the number of records shown as a result of filter.
Hope this helps.
Reward points if helpful.
Thanks,
Balaji
Edited by: Balaji Ganapathiraman on Feb 20, 2008 12:57 PM

Similar Messages

  • Refresh ALV HTML header

    Is it possible to refresh the ALV HTML header?
    ex: When I click in a button of the ALV Toolbar, I want the html header to refresh...
    Thanks.
    Alexandre

    Hi
    An internal table can be converted into an HTML Template using the function Module WWW_HTML_FROM_LISTOBJECT. This will create an HTML template which will be stored in SMW0->(Zero)
    Now you can call this template in your header.
    Regards,
    Vara

  • Traffic lights in ALV list header

    how do i display traffic lights as icons in ALV list header. for example, in the code below, i want to display a green icon at the end of closed items and a red icon at the end of the open items:
                closed : 4 [green-icon]
                open   : 2  [red-icon]
    CLEAR header_alv_wa-info.
      header_alv_wa-key  = 'closed:'.
      header_alv_wa-info = gv_closed.
      header_alv_wa-typ  = 'S'.
      APPEND header_alv_wa TO headeralv.
      CLEAR header_alv_wa-info.
      header_alv_wa-typ  = 'S'.
      header_alv_wa-key  = 'open:'.
      header_alv_wa-info = gv_open.
      APPEND header_alv_wa TO headeralv.

    Hi,
    http://www.sapfans.com/forums/viewtopic.php?t=79424
    http://www.sapfans.com/forums/viewtopic.php?t=24512
    the above links will give u the code for the same..
    Regards,
    Aparna

  • Writing selections in  alv list header

    Hi,
    in alv list header i have to show the values entered in selection screen.
    ex.
    Current year    : 2008
    current period  : 03
    report ID          : R_123
    company code : I BT  AA to BB
                            I BT  CC to DD
                            I EQ  FF
    in the above example first three are parameters and  company code is select-option, for parameters i can display what i want, but for company code( which is select option) it is showing only first line and not showing other lines.
    at the time of filling list header table for select-option, i am looping the select-option, first i am filling with  typ, key and info and for other i am filling only info, if i fill typ, key also for other recoreds also it is showing the  company code in all lines  as below ....
    company code  : I BT  AA to BB
    company code : I BT  CC to DD
    company code : I EQ  FF
    can any one suggest to get the list header as shown at the begining....
    thanks,
    bhushan

    Hi,
    Check this sample code. Here plant and date are selection screen paramters.
    Plant
      lwa_header-typ  = 'S'.
      lwa_header-key  = text-t47.
    If the select option for plant is 'EQ'
      LOOP AT s_werks.                                       "#EC *
        IF s_werks-option = 'EQ'.
          lwa_plant-werks = s_werks-low.
          APPEND lwa_plant TO lt_plant.
          CLEAR lwa_plant.
    If the select option for plant is 'BT'
        ELSEIF s_werks-option = 'BT'.
          CONCATENATE s_werks-low
                      text-t50
                      s_werks-high
            INTO lf_plant.
          lwa_header-info = lf_plant.
          APPEND lwa_header TO gt_header.
          CLEAR lwa_header.
        ENDIF.
      ENDLOOP.
      IF s_werks-option = 'EQ'.
        READ TABLE lt_plant INTO lwa_plant INDEX 1.
        lwa_header-info = lwa_plant-werks.
        APPEND lwa_header TO gt_header.
        CLEAR lwa_header.
        LOOP AT lt_plant INTO lwa_plant FROM 2.
          lwa_header-typ   = 'S'.
          lwa_header-key   = ''.
          lwa_header-info  =  lwa_plant-werks.
          APPEND lwa_header TO gt_header.
          CLEAR: lwa_header.
        ENDLOOP.
      ENDIF.
    Post date Range
      lwa_header-typ   = 'S'.
      lwa_header-key   = text-t33.
    If the select option for post date is 'EQ'
      LOOP AT s_budat.                                      "#EC *
        IF s_budat-option = 'EQ'.
          CONCATENATE s_budat-low+6(2) '.'
                      s_budat-low+4(2) '.'
                      s_budat-low(4) INTO lf_range.
        For multiple values
          IF lf_date_tmp IS INITIAL.
            lwa_date-date = lf_range.
            APPEND lwa_date TO lt_date.
          ELSE.
            lwa_date-date = lf_range.
            APPEND lwa_date TO lt_date.
          ENDIF.
      If the select option for post date is 'BT'
        ELSEIF s_budat-option = 'BT'.
          CONCATENATE s_budat-low+6(2) '.'
                      s_budat-low+4(2) '.'
                      s_budat-low(4) text-t49
                      s_budat-high+6(2) '.'
                      s_budat-high+4(2) '.'
                      s_budat-high(4) INTO lf_range .
          lwa_header-info  =  lf_range.
          CLEAR lf_range.
        ENDIF.
      ENDLOOP.
      IF s_budat-option = 'EQ'.
        READ TABLE lt_date INTO lwa_date INDEX 1.
        lwa_header-info  =  lwa_date-date.
        APPEND lwa_header TO gt_header.
        CLEAR: lwa_header.
        LOOP AT lt_date INTO lwa_date FROM 2.
          lwa_header-typ   = 'S'.
          lwa_header-key   = ''.
          lwa_header-info  =  lwa_date-date.
          APPEND lwa_header TO gt_header.
          CLEAR: lwa_header.
        ENDLOOP.
      ENDIF.
    Appending work area to the header table
      APPEND lwa_header TO gt_header.
      CLEAR lwa_header.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = gt_header.
    <REMOVED BY MODERATOR>
    Regards,
    Ramya
    Edited by: Alvaro Tejada Galindo on Apr 8, 2008 4:30 PM

  • Alv list header problem

    Hai Friends,
    In my ALV List header..i am writing date , time and my program name.
    but all are coming on left side.
    can i get date on left side, program name on centered and time on write side.
    my code is like this.
    FORM list_headers.
          lists-typ = 'H'.
          lists-info = text-010.
          APPEND lists.
          CLEAR lists.
          lists-typ = 'S'.
          lists-key = text-011.
          CONCATENATE sy-datum+6(2) '/'
                      sy-datum+4(2) '/'
                      sy-datum+0(4) INTO lists-info.
          APPEND lists.
          CLEAR lists.
          lists-typ = 'S'.
          lists-key = text-012.
          CONCATENATE sy-uzeit+0(2) ':'
                      sy-uzeit+2(2) ':'
                      sy-uzeit+4(2) INTO lists-info.
          APPEND lists.
          CLEAR lists.
    ENDFORM.

    Hi again,
    1. first of all how are u writing / displaying
       the alv header ?
    2. using documentary write ?
       then also, u can use one variable of
      length 100 and use this concept.
    3. If u are using top_of_page
      event,
      in this event, WE CAN use WRITE.
      (i have used it, and it
      works fantastic)
                  (not in case of alv grid)
    4. My point is, what ever u are using,
       use on variable of length 100.
      WRITE value INTO variable.
      using offset
      and then proceed further.
    regards,
    amit m.

  • Split ALV Column heading into two

    Hello All,
    I have a ALV Column Header - ALV LIST - SAP 46C.
    Material   |  Info Type |  Quantity |  Price etc..
    Due to space contraints and other reason client needs to split the Info type column into two.
    Material   |  Info  |  Quantity |  Price etc..
               | Type   |
    The data records should not have any additional blank lines.
    How to achieve this?
    Thanks,

    You have to assign X to layout property no_colhead.
    Then write your heading using write statements.
    Here is the exact example you are looking for [Create Multiple Lines Header In ALV List Report|http://www.freesaptutorial.com/create-multiple-lines-header-in-alv-list-report/]

  • ALV Grid Header Problem.

    Hi All,
    I want to display the header of the ALV Grid as:
    Material                          111/11823
    Plant/Usage/Alt               2845/3/5
    Description                      ABI CAB
    Base Qty.                        23.000
    The values are to be taken from variables
    Please suggest how to do this.
    Thanks

    *& Report  ZDEMO_ALVGRID                                               *
    *& Example of a simple ALV Grid Report with grand total                *
    *& The basic requirement for this demo is to display a number of       *
    *& fields from the EKKO table.                                         *
    REPORT  zdemo_alvgrid                 .
    TABLES:     ekko.
    type-pools: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    data: fieldcatalog type slis_t_fieldcat_alv with header line,
          gd_tab_group type slis_t_sp_group_alv,
          gd_layout    type slis_layout_alv,
          gd_repid     like sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
    perform data_retrieval.
    perform build_fieldcatalog.
    perform build_layout.
    perform display_alv_report.
    perform top-of-page.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    form build_fieldcatalog.
    There are a number of ways to create a fieldcat.
    For the purpose of this example i will build the fieldcatalog manualy
    by populating the internal table fields individually and then
    appending the rows. This method can be the most time consuming but can
    also allow you  more control of the final product.
    Beware though, you need to ensure that all fields required are
    populated. When using some of functionality available via ALV, such as
    total. You may need to provide more information than if you were
    simply displaying the result
                  I.e. Field type may be required in-order for
                       the 'TOTAL' function to work.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
    fieldcatalog-do_sum      = 'X'.
    fieldcatalog-no_zero     = 'X'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      fieldcatalog-col_pos     = 5.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-do_sum      = 'X'.        "Display column total
      fieldcatalog-datatype     = 'CURR'.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    endform.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    form build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
    gd_layout-totals_only        = 'X'.
    gd_layout-f2code            = 'DISP'.  "Sets fcode for when double
                                            "click(press f2)
    gd_layout-zebra             = 'X'.
    gd_layout-group_change_edit = 'X'.
    gd_layout-header_text       = 'helllllo'.
    endform.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    form display_alv_report.
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
               i_callback_user_command = 'USER_COMMAND'
               i_grid_title           = outtext
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
               it_special_groups       = gd_tabgroup
               IT_EVENTS                = GT_XEVENTS
                i_save                  = 'X'
               is_variant              = z_template
           tables
                t_outtab                = it_ekko
           exceptions
                program_error           = 1
                others                  = 2.
      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_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    form data_retrieval.
    select ebeln ebelp statu aedat matnr menge meins netpr peinh
    up to 10 rows
      from ekpo
      into table it_ekko.
    endform.                    " DATA_RETRIEVAL
    Form  TOP-OF-PAGE                                                 *
    ALV Report Header                                                 *
    Form top-of-page.
    *ALV Header declarations
    data: t_header type slis_t_listheader,
          wa_header type slis_listheader,
          t_line like wa_header-info,
          ld_lines type i,
          ld_linesc(10) type c.
    Title
      wa_header-typ  = 'H'.
      wa_header-info = 'EKKO Table Report'.
      append wa_header to t_header.
      clear wa_header.
    Date
      wa_header-typ  = 'S'.
      wa_header-key = 'Date: '.
      CONCATENATE  sy-datum+6(2) '.'
                   sy-datum+4(2) '.'
                   sy-datum(4) INTO wa_header-info.   "todays date
      append wa_header to t_header.
      clear: wa_header.
    Total No. of Records Selected
      describe table it_ekko lines ld_lines.
      ld_linesc = ld_lines.
      concatenate 'Total No. of Records Selected: ' ld_linesc
                        into t_line separated by space.
      wa_header-typ  = 'A'.
      wa_header-info = t_line.
      append wa_header to t_header.
      clear: wa_header, t_line.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
           exporting
                it_list_commentary = t_header.
               i_logo             = 'ideas'.
    endform.

  • Page No in ALV GRID Header disply ?

    Hi,
    How to display the page No in ALV GRID Header display.
    Thanks & Regards,
    Amir.

    hai
    I think u can use this funtion... Using this funtion u can find som solution for ur problem
    *&      Form  BUILD_EVENTTAB
          text
         -->P_EVENTS[]  text                                             *
    form build_eventtab using p_events type slis_t_event.
      data: ls_event type slis_alv_event.
      call function 'REUSE_ALV_EVENTS_GET'
           exporting
                i_list_type = 0
           importing
                et_events   = p_events.
      read table p_events with key name = slis_ev_top_of_page
                               into ls_event.
      if sy-subrc = 0.
        move formname_top_of_page to ls_event-form.
        append ls_event to p_events.
      endif.
    endform.                               " BUILD_EVENTTAB
    *&      Form  BUILD_COMMENT
          text
         -->P_HEADING[]  text                                            *
    form build_comment using p_heading type slis_t_listheader.
      data: hline type slis_listheader,
            text(60) type c,
            test_date TYPE string,
           test_date1 TYPE string,
           sep(20) type c.
      clear: hline, text.
      hline-typ  = 'H'.
      write: text-101 to text+23.
      hline-info = text.
      append hline to p_heading.
      clear text.
      write: 'User: ' to text,
             sy-uname to text+6,
             'Date: ' to text+25,
             sy-datum to text+31,
             'Page: ' to text+50,
             sy-pagno to text+56.
      hline-info = text.
      append hline to p_heading.
    endform.                    " BUILD_COMMENT
          FORM TOP_OF_PAGE                                              *
    form top_of_page.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
           exporting
                it_list_commentary = heading.
    endform.
    regard
    nawa

  • How to Include "all" header info when you Reply and ReplyAll

    Using Mail 3.5, when I Reply or ReplyAll I need to have "all" header info included automatically (From, To, CC, Subject, Date) which does occur when Forwarding but not when Replying to one or all. A REAL issue in the corporate world. Is there any way to accomplish this???
    Thanks,

    Did you ever get a reply to this question or did you manage to solve the issue in any way or shape? I am experiencing the same so eager to hear a solution.
    Thanks!

  • Java Mail header info displayed in email results

    I am having problems with the output generated by the send() method in javamail. The out contains unwanted email header info within the email. Please review code and email output. The Cc: thru Content-Transfer-Encoding should not display
    -Thanks....
    Greg
    Code :
    +++++
    Session session2 = null;
    Properties props = new Properties();
    if (ConfigInfo.getBatchJob() == false) {                       
         InitialContext ic = new InitialContext();
         Session session = (Session) ic.lookup("myMailSession");
         props.put("mail.from", fromAddress);
         session2 = Session.getInstance(props);
    } else // email from batch job
         props.put("mail.store.protocol", "pop3");
         props.put("mail.transport.protocol", "smtp");
         props.put("mail.host", ConfigInfo.getMailHost());
         props.put("mail.smtp.host", ConfigInfo.getMailHost());
         props.put("mail.from", fromAddress);
         session2 = Session.getInstance(props);
    Message msg = new MimeMessage(session2);
    msg.setFrom();
    msg.setRecipients(Message.RecipientType.TO, InternetAddress
              .parse(toEmailAddress, false));
    msg.setRecipients(Message.RecipientType.CC, InternetAddress
              .parse(copyEmail, false));
    msg.setRecipient(Message.RecipientType.CC, new InternetAddress(
              copyEmail));
    msg.setSubject(subject);
    msg.setSentDate(sentDate);
    msg.setContent(content, "text/plain");
    Transport.send(msg);
    Output:
    +++++
    ....... Unwanted email header info <<<<<<<<<<
    Cc: [email protected]
    Mime-Vesrion 1.0
    Content-Type: text/plain
    Content-Transfer-Encoding: 7bit
    ----

    Hi,
    Thanks for the info.
    The Extra Text is not to be seen now. That’s good. But I have another issue now. The email skips new lines.
    If I have a new line in between the two blocks , the email skips the new line.
    e.g. If I had to sent the following data:
    "Line1
    Line2"
    It appears as "Line1 Line2" in the end. The new line is skippeed.
    Appreciate if someone can tell me the reason/solution.
    Regards,
    ParagJ

  • How to output header info. by using DMEE?

    Hi,
    When I am using DMEE to output payment file, I need to put a header info. before the itemlized transactions. For bank like Citibank, only need each transaction lines, so no header need to put. But some bank, need a header info. in front of the itemlized transactions. So could you guide if how I could set a header?
    I tried to use level and change the repetition, but did not succeed.
    Thank you very much!

    I've find out the solution. Just create another segment as the header, and set this segment as level 1, the same level as the father segment group. And this will just only output once.
    > Hi,
    >
    > When I am using DMEE to output payment file, I need
    > to put a header info. before the itemlized
    > transactions. For bank like Citibank, only need each
    > transaction lines, so no header need to put. But some
    > bank, need a header info. in front of the itemlized
    > transactions. So could you guide if how I could set a
    > header?
    >
    > I tried to use level and change the repetition, but
    > did not succeed.
    >
    > Thank you very much!

  • Gethttprequestdata() not returning all header info. with CF10, should it?

    Our Single SignOn agent (SiteMinder) places a custom variable, HTTP_EMPLOYEEID in the header.  Using ASP, I can dump the header info and see that variable/value. But, with a similar CF script, some info, including HTTP_EMPLOYEEID is not there.  Any ideas?

    Thanks for the help. Unfortunately it didn't work.  I'm working with my IT people, who installed and configured SiteMinder(user authentication agent) so I haven't dug into that, but they insist the problem lies with CF10.  Using the following ASP script I can read the custom header variable EMPLOYEEID:   <%= Request.ServerVariables("HTTP_EMPLOYEEID") %>  But, with my CF script there doesn't appear to be a header variable by that name.      I tried:
    GetHttpRequestData().headers.employeeid, then 
    GetPageContext().getRequest().getHeader("HTTP_EMPLOYEEID"),
    and
    CGI.HTTP_EMPLOYEEID
    Is there any reason why CF10 would not read the entire header content?  When I cfdump the header I see other variables, but not EMPLOYEEID. Strange.

  • Not able to Pass header info to Microsoft MapPoint WebService using WLS10

    We are passing some Header info to the MapPoint Web Service from our client Web Service which is hosted in Weblogic 10, however we are not sure if the info is getting passed.
    The actual soap header which we are trying to postis as below:
    <env:Header xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <m:CustomerInfoFindHeader xmlns:m="http://s.mappoint.net/mappoint-30/">
    <m:CustomLogEntry>2</m:CustomLogEntry>
    </m:CustomerInfoFindHeader>
    </env:Header>
    We are using the below code snippet for setting the header:
    Document doc = null;
    try
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    factory.setNamespaceAware(true);
    doc = factory.newDocumentBuilder().newDocument();
    catch(ParserConfigurationException pce)
    System.out.println("ERROR -> " + pce.getMessage());
    Element header = doc.createElementNS("http://schemas.xmlsoap.org/soap/envelope/", "SOAP-ENV:Header");
    Element headerContent = doc.createElementNS("http://s.mappoint.net/mappoint-30/","m:CustomerInfoFindHeader");
    Element headerChildContent = doc.createElementNS("http://s.mappoint.net/mappoint-30/", "m:CustomLogEntry");
    headerChildContent.appendChild(doc.createTextNode("2"));
    headerContent.appendChild(headerChildContent);
    header.appendChild(headerContent);
    Attr nsAttr = doc.createAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:m");
    nsAttr.setValue("http://s.mappoint.net/mappoint-30/");
    headerContent.setAttributeNodeNS(nsAttr);
    findServiceControl.setOutputHeaders(new Element[] {header});
    Here findServiceControl is the Service Control object.
    Even if the code is not throwing any error/exception I am not able to see the header portion which invoking the Mappoint Web Service (using the weblogic test client for testing the webservice).
    Is there any other methodology for setting the header.
    Regards
    Sanjeev Singh

    If you're not sure the header is being created properly, you should switch to using a javax.xml.transform.stream.StreamSource and javax.xml.transform.dom.DOMResult. For instance:
    import java.io.ByteArrayInputStream;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.dom.DOMResult;
    import javax.xml.transform.stream.StreamSource;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    StringBuffer xml = new StringBuffer()
    .append("<env:Header ")
    .append("xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\">")
    .append("<m:CustomerInfoFindHeader xmlns:m=\"http://s.mappoint.net/mappoint-30/\">")
    .append("<m:CustomLogEntry>2</m:CustomLogEntry>")
    .append("</m:CustomerInfoFindHeader>")
    .append("</env:Header>);
    TransformerFactory xformFactory = TransformerFactory.newInstance();
    Transformer transformer = xformFactory.newTransformer();
    ByteArrayInputStream bais = new ByteArrayInputStream(xml.toString().getBytes());
    DOMResult result = new DOMResult();
    transformer.transform(new StreamSource(bais), result);
    Document document = (Document)result.getNode();
    findServiceControl.setOutputHeaders(new Element[] {document.getDocumentElement()});
    If you want to see the SOAP request being sent to the Mappoint Web Service, add the following to the JAVA_OPTIONS environment variable (in the startWebLogic.cmd file), and bounce it:
    -Dweblogic.wsee.verbose=*
    -Dweblogic.log.RedirectStdoutToServerLogEnabled=true
    This will write the SOAP request (and SOAP response) to the server log of the WebLogic Server instance, which the service control is running in.

  • Unable to get Http Header info in webservice Handler

    Hi,
    I have been trying to get the Header info in my custom Handler unsuccessfully
    for the past few days.
    Upon web search, I am constantly redirected to use a Servlet filter to get the
    headers. I have to use the Weblogic Native SOAP engine and not any Servlet Filters.
    In Axis, I can do a (HttpServletRequest)messageContext.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST)
    which returns the HttpServletRequest and then I can get the headers off that.
    I can't find something similar in WebLogic. Any ideas?
    Any help in helping me track this problem down would be much appreciated.
    Thanks,
    Sridhar.

    Yes, you are correct that you are taking a risk by using the "__BEA_PRIVATE_BINDING_PROP"
    property, on the MessageContext object. The mechanism I provided is the recommended
    (and supported) way to get the HTTP headers, as it only uses "documented" class.
    Some developers think you are trying to "hide" something with undocumented classes,
    but I don't think this is the case with BEA. There are good reasons and the point
    you made about the likelihood of an unannouced future change breaking your code,
    is probably pretty high on the list :-)
    Getting the REMOTE_ADDR (or REMOTE_HOST) would most likely require the "undocumented"
    approach you've taken. You could get the HttpServletRequest from this same HttpServerBinding
    object, and call the getRemoteAddr() method on it. However, I really, really,
    really think you should consult our "fantabulous" BEA support department, to see
    if doing this will be supported.
    Regards,
    Mike Wooten
    "Sridhar" <[email protected]> wrote:
    >
    Michael,
    Thanks a bunch for your reply. I have been going crazy over this and
    your reply
    made my day.
    I still have a slight problem with this though. This does not seem to
    give me
    the Client IP etc. Any ideas to get that?
    Thanks again for the code. It was a great help.
    Sridhar.
    PS BTW, I found another way of getting the same info:
    HttpServerBinding httpBinding = (HttpServerBinding) messageContext.getProperty("__BEA_PRIVATE_BINDING_PROP");
    Enumeration headerEnum = httpBinding.getRequest().getHeaderNames();
    while (headerEnum.hasMoreElements()) {
    String header = (String) headerEnum.nextElement();
    System.out.println("header = " + header);
    System.out.println("header Value = " + httpBinding.getRequest().getHeader(header));
    But, I am guessing BEA doesn't want me to go this route as they might
    change the
    implementation and my code will immediately break.
    "Michael Wooten" <[email protected]> wrote:
    Hi Sridhar,
    You should be able to get at the HTTP Headers that were sent by theconsumer
    of
    your web service, by using the following code in your JAX-RPC handler:
    import java.util.Iterator;
    import javax.xml.rpc.handler.MessageContext;
    import javax.xml.rpc.handler.soap.SOAPMessageContext;
    import javax.xml.rpc.JAXRPCException;
    import javax.xml.soap.MimeHeaders;
    import javax.xml.soap.MimeHeader;
    import javax.xml.soap.SOAPMessage;
    public boolean handleRequest(MessageContext mc)
    SOAPMessageContext messageContext = (SOAPMessageContext) mc;
    try
    SOAPMessage original = messageContext.getMessage();
    MimeHeaders mimeheaders = original.getMimeHeaders();
    MimeHeader mimeheader = null;
    Iterator iter = mimeheaders.getAllHeaders();
    for (; iter.hasNext();)
    mimeheader = (MimeHeader) iter.next();
    System.out.println("name=" + mimeheader.getName() + ", value="
    + mimeheader.getValue());
    catch (Exception e)
    e.printStackTrace();
    throw new JAXRPCException(e);
    Here's the output from the System.out.println():
    name=Content-Type, value=text/xml
    name=SOAPAction, value=""
    name=User-Agent, value=Java1.4.1_05
    name=Host, value=localhost:7001
    name=Accept, value=text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
    name=Connection, value=Keep-Alive
    name=Content-Length, value=505
    Regards,
    Mike Wooten
    "Sridhar" <[email protected]> wrote:
    Hi,
    I have been trying to get the Header info in my custom Handler unsuccessfully
    for the past few days.
    Upon web search, I am constantly redirected to use a Servlet filterto
    get the
    headers. I have to use the Weblogic Native SOAP engine and not any
    Servlet
    Filters.
    In Axis, I can do a (HttpServletRequest)messageContext.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST)
    which returns the HttpServletRequest and then I can get the headersoff
    that.
    I can't find something similar in WebLogic. Any ideas?
    Any help in helping me track this problem down would be much appreciated.
    Thanks,
    Sridhar.

  • Mac Mail header info gone

    How do you put the header info back? Sender, Subject, Attachment save option etc are suddenly missing from incoming email.
    The email just displays the letter portion only.

    Open up the Mail preferences. Go to the "Viewing" section. There is a dropdown listbox for Header Details. You can set that back to default.

Maybe you are looking for

  • Can login, but can't get Kerberos ticket

    Hi, This is on OS X Server 10.5.8, all up to date, and an OS X Client 10.6.4, all up to date. One user in particular can login, however they can't get a kerberos ticket (iChat and other apps fail to login). They can use the Ticket Viewer app to see t

  • Can't re-install HP Officejet 7500 E910

    Hi, Got in this morning and the printer wasn't working. I tried to fix it using the various steps in this forum but without a luck. Next I removed the printer, re-set the printer's wireless network and now trying to re install it. However, when I tri

  • Just like starting over?

    My anchor file in Dreamweaver is 2008. I update to a wip site only before it is moved by someone else to the actual website. Recently the person who updates the actual site reorganized the files on the wip server. Now all html file are in a folder ca

  • Is it better to use bapi_salesorder_getlist than select statements?

    hi experts, in terms of performance, which is better in getting a list of salesorders is it better bapi_salesorder_getlist or select statements? for bapi_salesorder_getlist, i will not get all of the fields so i would still use select. Message was ed

  • Dynamic Safety Stock - Custom logic

    Hi, Are there any exits / enhancements where we can build customer specific logic to periodically update Safety Stock values in the Material Master (MRP Area)? Thanks. Raj