ALV Dynamic header

LAYOUT FORMAT
Program Title
Client Name     Run Date/Time :
Program            : Program Name
User ID              : Page                  : X of Y
Pernr:                                                            
Name:
IC Number:
RBAF / Reference Number:
Rank:
Service:
Unit:
Sub Unit:
No.|  Position| Leave Taken| From|Leave Taken To| Type of Leave|
Leave Entitlement| No. Of Leave Taken|     Present Balance of Leave|
Please help to program dynamic alv header for above format. I have used page break on Pernr but the header is not coming according to pernr. Though I managed
dynamic header when we press Print Preview. But that is not a solution.

Hi,
I did something very similar to your requirement.
There is a predefined event for Reuse_alv_list_display called 'BEFORE_LINE_OUTPUT'. In the event table, you have to specify the <event>-name = 'BEFORE_LINE_OUTPUT' and the <event>-form = 'ALV_BEFORE_LINE_OUTPUT'.
Then you need a form like
FORM alv_before_line_output
  USING ps_lineinfo TYPE kkblo_lineinfo.                    "#EC CALLED
  FIELD-SYMBOLS:
    <prot> TYPE typ_prot.
  READ TABLE gt_prot INDEX ps_lineinfo-tabindex
    ASSIGNING <prot>.
  CHECK g_file_no <> <prot>-file_no.
  g_file_no = <prot>-file_no.
  NEW-PAGE.
ENDFORM.                    "alv_before_line_output
In my program the global table displayed in ALV was gt_prot (of line type typ_prot) and the requirement was to start a new page for each file processed. The form stores the file processed in
g_file_no. If a new file is processed, a NEW-PAGE will trigger the TOP_OF_PAGE event of the alv. I will not copy the form here because we also issued some statistical values, system and user informations and so on.
But I hope you get it done.
The only remaining issue may be that the before_line_output event will cost some time because it is triggered for every output line. But my report was still quite fast.
regards,
Clemens

Similar Messages

  • Dynamic header in oo alv print_top_of_page based on current line

    I would expect this to be a common problem with the solution easily to google/find, but somehow...
    dynamic header generation during alv print_top_of_page:
    - i print an oo alv grid, sorted by kunnr
    - for each new kunnr a new page
    -> now I want during print-out to: at each top of page, read the first (or any) line of the current page, i.e. the current kunnr, and select data on basis of that kunnr to be written to the header.
    My problem is that sy-tabix is not being filled correctly (always 1).
    Strange thing is that in another report with a non-dynamic itab to display, sy-tabix is actuall being filled more or less correctly. (with the minor drawback that on the first page the tabix might not be 1 but more likely to be 2; but that's easy to fix and for the next pages sy-tabix is correct)
    Kind regards, A
    baanbrecher

    In the handle_print_top_of_page method, use :
    FIELD-SYMBOLS : <lv_line> TYPE ANY.
    ASSIGN ('(SAPLKKBL)G_INDEX') TO <lv_line>.
    if <lv_line> = 0. "First time, G_INDEX is equal to zero
       <lv_line> = 1.
    endif.
    So in <lv_line> you will always have the good index of your table.

  • Dynamic header in oo-alv

    Hi
    I have a requirement to display  Dynamical  header in ALV.
    I am displaying the SUM of my list in ALV header . This I am able to do , as I can calculate before displaying ALV for the first time.
    But when the user filters the list the SUM should change according to the new entries displayed after filtering .
    How can i do this .
    Line: -
    All the helpful answers will be rewarded for sure.
    Thanks.
    Regards,
    Sandeep.

             fieldname type slis_fieldname,
             tabname type slis_tabname,
             seltext(40),
             valuf(80),
             valut(80),
             valuf_int(80),
             valut_int(80),
             sign0(1),
             sign_icon(4),
             optio(2),
             stype(1),
             decimals like dfies-decimals,
             intlen like dfies-intlen,
             convexit like dfies-convexit,
             edit_mask type slis_edit_mask,
             lowercase like dfies-lowercase,
             inttype like dfies-inttype,
             datatype like dfies-datatype,
             exception(1) type c,
             no_sign(1) type c,
             or(1) type c,
             order type order,
             cqvalue(5) type c,
             ref_fieldname like dfies-fieldname,
             ref_tabname like dfies-tabname,
             ddic_outputlen like dfies-outputlen,
    The following are the example code for filter settings.
              lv_filter-fieldname = u2018FIELDNAMEu2019.
              lv_filter-valuf_int =  u2018VALUEu2019.
              lv_filter-sign0     = u2018SIGNu2019.
              lv_filter-optio     = u2018OPTIONu2019.
              APPEND lv_filter TO gt_filter_list.
    Where gt_filter_list is of type slis_t_filter_alv.
    This populated internal table is then passed as the import parameter u2018it_filteru2019 of the display ALV FM.
    I hope this help u...!

  • Display a dynamic header

    Dear Vinod,
    IMHO i don't think this is a spec dumping. I did try to search and even tried hands on it. Unfortunately i didn't get any luck with that.
    Morever i'm not asking for any spoon feeding...It's just about some pointer's or any ideas that would help me.
    Hope that clarifies much better.
    Thanks in advance,
    Arya.
    My selection screen has a parameter P_WEEK.
    Suppose if user enter's a week no for ex: 5. My ALV header should display as
    Week5  Week6  Week7  Week8  Week9  Week10
    i.e. Up to next 5 weeks. How to design a ALV that would display a dynamic header?
    Any ideas or suggestion would be of great help.
    Thanks,
    Arya
    Moderator message : Search for available information. Moved to basic(points-free) forum.
    Edited by: Vinod Kumar on Oct 19, 2011 3:37 PM
    Edited by: arya.soumya on Oct 19, 2011 12:22 PM
    Edited by: Suhas Saha on Oct 19, 2011 4:08 PM

    Hi,
    you just try to write below logic in TOP-OF-PAGE routine in your program.
    parameter: p_week(3) type c.
    Form top_of_page .
    do p_week times.
    pass the required data to your internal table and append it.
    enddo.
    Endform.
    Ram.

  • Dynamic Header help in PDF Portfolio

    Need some help please, to create and load a Dynamic Header when creating a PDF Portfolio in LiveCycle ES2.  Have input parameter of a [name] and an [image file] to place in the Header.  Process flowing out of Assembler (PDF Generator).  Currently other PDFs being inserted within the Portfolio, and Navigation parameter being received ok, and setting up custom navigation.  Any help w/ creating Dynamic Header is very much appreciated.

    By "Dynamic Header" do you mean the PDF cover page, or the interactive portfolio navigator?
    If its the cover page then it should be a fairly easy thing to do.  You can create a form (XDP or PDF template) with a field for the name and one for the image.  Then you would use something like LC Forms or Form Data Integration to merge the data (image and name) with the template.
    The one thing you would have to do is to put the image and data into an XML format before you merge it with the form. That means you will need to convert the image to a base64 encoded format.  Fortunately there is a built in function for doing the conversion in a SetValue operation (its under Document Object Functions).
    If you are talking about the Navigator (portfolio shell) then it gets a bit more tricky.  The navigator is actually a Flex application and not a PDF.  You'll have to code a new one using Flash Builder, then import the resulting .nav file into your LiveCycle application. Merging the data with it is not something I've done before, but it should be possible (the LiveCycle Interactive Statement Solution Accelerator does something similar).
    If it is new navigator you need, check out some of the following links:
    http://joelgeraci.com/adobe/devjunkie/web/portfolios_p1_outer.shtml
    http://acrobatusers.com/tutorials/modifying-pdf-portfolio-navigator
    http://acrobatusers.com/navigator-contest-faq  (for the development software links)

  • 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

  • SSRS 2008 R2 - Dynamic header data stays the same when exporting

    Background:
    I have a SSRS 2008 R2 report with a single Tablix.
    The data is grouped by InvoiceID, with each appearing on a separate page.
    I'm displaying some of the detail data in the group header row using Expressions similar to the following:
    ="Invoice # "  & ReportItems!InvoiceID.Value"
    The data referred to by my ReportItems statements are all hidden in the detail row (Advanced Mode, the Hidden Value for the Static Row Group is set to false).
    Problem:
    When I Preview the report in Visual Studio, everything looks as it should - the dynamic header data changes correctly with each group.
    However, whenever I export the results (I've tried all the formats), the header data is the same for every group - its taking the values from the first group and using it in all the groups.
    I've copied the same expressions into my Totals row, and the data is correct when exported; its only happening in my header rows.
    Any help in resolving this is greatly appreciated, thank you.

    Hi Alex,
    According to your description, you have a header with expression contains ReportItems. Now you find it shows incorrect result when exporting to a file. Right?
    In Reporting Services, it has reported some similar issue that the ReportItem returns unexpected result when exporting.  In this scenario, since you just want to show the group name in each page as a header for detail rows. So you can make the
    detail rows group on the Group. Then delete the Group column but still keep the group. After that add a row above detail row (Out side of group) and put in "=Fields!InvoiceID.Value". Now it will show the corresponding Group name
    when you set page break between each group instance. We have tested this case in our local environment. Here are screenshots for your reference:
    Reference:
    SSRS
    field expressions using ReportItem refrences have unexpected results when exporting
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Variable Text not working as dynamic header in Crystal report

    Dear Experts,
    I'm working Crystal report that connected to Query BEX SAP BW trough SAP integration kit,
    currently i have case that need report dynamic header using variable text from BEX query, but seem the variable text not working in Crystal reports. the header in Crystal report shown as Desription\technical name, not result from the variable text in Query BEX in SAP.
    In https://wiki.sdn.sap.com/wiki/display/BOBJ/Crystal%20Reports%20and%20BW%20query%20elements stated that the "Text variable" with "replacement path" is supported, but i don't know in my query is not working.
    i already set in Database -> options->  table and fields -> Show Both, but the text variable still not working.
    can you help me
    Crystal Reports 2008 12.2.0.290
    SAP Integration KIT 12.1.0.890
    Thanks
    Luqman

    Post your question BEX and B1 and classic SAP data source issues to the Integration Kit forum

  • Dynamic Header for a website.    DOUBLE POINTS FOR ANSWER!!

    I don't even know where to start with this one, let me try explain this:
    I am looking for ideas on how to create some sort of dynamic header for an affiliate website, we have launched a new affiliate program for http://www.africancures.com/ the affiliate program is done through 1shoppingcart.com and each affiliate is given an ID like:
    http://www.1shoppingcart.com/app/?af=812264
    Once the affiliate signs up they choose their own website URL like: mikeshealth.com, then we point the affiliate URL mikeshealth.com to http://www.1shoppingcart.com/app/?af=812264 which in turn comes to our main website: http://www.africancures.com/ now here is where the problem comes in, how do I make the website display Mikes Health instead of African Cures .
    I hope I was able to explain this well enough as it seems to be a bit confusing to me when I write it down. I really hope there is someone out there who has worked on something like this before or if there is someone who thinks they know how to do this.
    Thank you
    So here is something else I was thinking of, but I am not much of a programmer anymore:
    Have a list of all the affiliate ids and their corresponding website names, eg:
    Affiliate ID=812264 Website name= Mikes Health, then when someone comes to the site the jave works out which affiliate id sent them to the site, eg
    Get(AffiliateID)from Refering.URL then Display.Header(AffiliateID) on main page, do you think you could help me now Sabre150?

    I'm still trying to see what this has to do with Java. Each host name such as mikeshealth.com will need to be registered with name servers with the IP address of www.1shoppingcart.com. Your web server will then need to be configured to perform perform any mapping.
    Again, what has this to do with Java?

  • Dynamic header / footer

    Hi all,
    I created an Adobe Form and defined on the MasterPage a header, a footer and a main area (content are) in-between. The areas were defined with a fixed size (somehow it was the only way because "fit height" and "fit width" was innactive).
    Because the form is used in different countries the amount of information in the different areas is not the same. Therefore I am looking for a dynamic header and footer (and main area). That should help to optimise the space exploitation on a page. The header should grow from top of the page down, the footer bottom up and the main area fill the gap.
    I know that this is a very sophisticated demand. Nevertheless, I hope that someone else had similar ideas and could solve that task.
    I appreciate any help, hints and good advices which leads to a solution of my problem.
    Thanks & regards,
    Phil

    Hi Andres,
    thanks a lot for your quick answer!
    In your MasterPage, add only the items that will remain static during the execution.
    Every object that will behave in a dynamic manner should go in the BodyPage.
    Very good hint, thanks!
    What you can do is set a Subform with flowed Western Text between your Header/Footer
    (Static) of your MasterPage. Within that main Subform set three more, "Western Text" as well.
    One will be for your Dynamic Header, the middle one for your Main and the bottom one for your
    Dynamic Footer.
    I think I did not really get it! As far as I understand this works for one page...my form - when filled with data - can have more than one page!
    Some questions came up when I read your solution:
    1) why is the flowed content "western text" and not "top to bottom"?
    2) what happens exactly with the area of the static header / footer? It's above the dynamic header and below dynamic footer -> is that space not wasted in the end?
    3) The dynamic footer is directly below the main area - not necessarily at the bottom of the page!?
    4)  How is the "pagination" defined for each of the three dynamic areas (header / main / footer)?
    I hope you'll find the time to answer my question soon!
    Thanks & regards,
    Phil

  • 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.

  • Section Break conflicts with Dynamic Header in RTF which loads XML data

    Hi,
    I have dynamic header in my rtf file which loads data from XML generated by rdf file.
    I have section break on start group of body. but it does not display dynamic header value. If i remove section break then it display dynamic header.
    I have to display dynamic header and section break is also required there.
    Please give me solution of this issue.
    Regards
    Farooq
    Edited by: user8849418 on Jun 27, 2012 12:05 AM

    flyeminent wrote:
    However in my particular case, the dynamic list is not known until the user choose to view a table. Then move the call from the getter to the bean's action method.

  • Dynamic Header (OBI report)

    Hi
    I have just started working on OBIE. Need some suggestions. Is there a way to put a dynamic header in the report.
    Eg: I want to display a text in the header as "Sales Report for Alabama" where Alabama is the state coming from the State prompt.
    I dont find any formula editor in the edit Title view. Where can i write a formula to display this text.
    I would appreciate any suggestions.
    Thank You

    You have successfully created your presentation variable in the prompt? I guess it will be something as 'State'
    Now you go to your report and you edit the title view of your report;
    In the title you put @{State} (the name of your presentation variable is case sensitive!)
    Save your report and put it together with the prompt on the dashboard. Once you select a state in the prompt, the report title should change automatically.
    KR,
    A

  • Bex dynamic header problem

    Hi All,
    I have 2 problems..
    1) I have to print the vendor statement of account for 1 year. Now for each vendor the vendor code name and address comes followed by other columns of account information related to it. My requirement is that i want the vendor code name and address to appear in header line and then all other information for that vendor comes beneath it. Meaning the vendor name and address comes in 1st line , and from 2nd line all account information related to that vendor comes. then say on 60th line another vendor name and address comes...and from 61st line accoutn information of the 2nd vendor comes.
    How to do it???
    2) i want to ghet dynamic header in the bex report based on the iunformation filled in the selection option. Eg: if user entered a posting date then that posting date should appear in the report header.
    both these are urgent requirements....Plz help soon
    Thanks & regards
    Akash

    Hi , thanks for ur reply but the Report designer is not working , givng me error
    RFC destination NOT_CONFIGURED.
    The main problem is i have to display the name and address of Vendor in a separate row i.e. vendor name and address shud appear in the row and then in following rows the other details.
    Eg.
    11000 Shashi Kapoor  Jaipur         31.12.2006     doc no type etc
    12000 Kamla Verma    Mumbai      12.10.2006    doc no type etc
    Now final putput will be like
    11000
    Shashi Kapoor
    Jaipur
    31.12.2006    .................................
    12000
    Kamla Verma
    Mimbai
    12.10.2006.........................................
    Thanks .

Maybe you are looking for

  • Having trouble setting the look and feel

    hi, i've almost finished my app and am trying to improve it's appearance. I'm trying to change the look and feel but i can't seem to get any changes to take effect. i've been reading through the tutorial on L&F but obviously am not 'getting' somethin

  • How to create Entity objects using xml as a datasource

    Hi All, How to create EO(ADF Business components) using XML as a datasource instead of database tables..Pls do reply..Its an urgent requirement Thanks in Advance Edited by: 1000899 on Apr 25, 2013 12:01 AM Edited by: 1000899 on Apr 25, 2013 12:02 AM

  • New Hire Data Transfer from E-Rec to ECC via PA48

    Hi, We have requirement where we need to use the basic new hire data transfer from erec to ecc using PA48. Could someone help me by listing the step by step process that is required to configure in both EREC & ECC? I know there is pdf document availa

  • Inter company stock transport PGI problem

    While doning the PGI after the inbount delivery and picking I am getting this error "Fld selectn for mvmt type 643 / acct 400020 differs for Business Area (033) Message no. M7093 Diagnosis Comparison of the field selection strings from movement type

  • How do I install fonts?

    I'm having trouble making X recognize a bunch of fonts that I have installed. I installed "ttf-apple-fonts" and I see the files in /usr/share/fonts/TTF along with other fonts that are recognized and show up in xfontsel. I installed artwiz-fonts as we