Grouping - and page break

Post Author: Gerd
CA Forum: General
Hey,
i have a group and the situation looks like this
PageBeginn**************************************
A
NameA1   ValueA1
NameA2   ValueA2
B
NameB1  ValueB1
NameB2  ValueB2
H
NameH1  ValueH1
PageEnd*********************************
PageBeginn******************************
NameH2  ValueH2
NameH2  ValueH2
PageEnd*********************************
I want that there is no page break between a group. In the example above is a part of the group (H) on one page and a part
on the other page. How it is possible that the page break is not inside a group ?
I have set at the section (Section Expert)
GroupHeader --> to Keep Together
Details --> to keep Together
GroupFooter --> to keep Together
--> This doesn't works
thanks,

Hi,
Try the following:
1. Build your sorting criteria. Pass this to ALV FM.
  gs_sort-fieldname = 'VENDOR'.
  gs_sort-group = '*'. "new page
  gs_sort-up = 'X'.
  APPEND gs_sort TO gt_sort.
2. Add event group level change. Pass this to ALV FM
  gs_event-name = 'GROUPLEVEL_CHANGE'.
  gs_event-form = 'GROUPLEVEL_CHANGE'.
  APPEND gs_event TO gt_event.
Inside the form, retrieve your vendor details.
FORM grouplevel_change USING gs_lineinfo
                             gs_groups TYPE kkblo_grouplevels.
  DATA: l_index     TYPE i.
  IF gs_groups-level = 1.
    l_index = gs_groups-index_to + 1.
    READ TABLE gt_display INDEX l_index  INTO gw_display.   
  ENDIF.
3. In the event top-of-page, display vendor details using write statements. For the first record, your structure (gw_display) will be blank, read from your data table first
FORM top_of_page.
  IF gw_display IS INITIAL.
    READ TABLE gt_display INDEX 1 INTO l_display.
    IF sy-subrc = 0.
      WRITE: / l_display-vendor
    ENDIF.
  ELSE.
    WRITE: / gw_display-vendor.
    CLEAR: gw_display.
  ENDIF.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
      i_callback_program       = sy-repid
      i_callback_pf_status_set = 'SET_STATUS'
      i_callback_user_command  = 'USER_COMMAND'
      is_layout                = gs_layout
      it_fieldcat              = gt_fcat[]
      it_sort                  = gt_sort[]
      i_save                   = 'A'
      it_events                = gt_event
    TABLES
      t_outtab                 = gt_display[]
    EXCEPTIONS
      program_error            = 1
      OTHERS                   = 2.
Hope this helps.

Similar Messages

  • Grouping and Page Break in ALV using Function Modules

    Hi all,
    I am trying to develop an ALV Report that will be grouped by vendor, some vendor information to be displayed on header. And, after each vendor;s records there should be a page break.
    It should be something like this:
    Vendor Number: 00012345454
    Vendor Name: ABC Technologies, Inc
    Vendor Country: USA
    Item....Price...... Descriptopm
    123....100,00......this is description
    124....120.00......this is another description
    PAGE BREAK
    Vendor Number: 000123456545
    Vendor Name: My Bank
    Vendor Country: USA
    Item....Price..... Descriptopm
    223....32,00......this is my description
    224....120.00......this is another description
    Can anybody give some sample code for it ? I have tried a few codes from web, but they are not working.
    Thanks.

    Hi,
    Try the following:
    1. Build your sorting criteria. Pass this to ALV FM.
      gs_sort-fieldname = 'VENDOR'.
      gs_sort-group = '*'. "new page
      gs_sort-up = 'X'.
      APPEND gs_sort TO gt_sort.
    2. Add event group level change. Pass this to ALV FM
      gs_event-name = 'GROUPLEVEL_CHANGE'.
      gs_event-form = 'GROUPLEVEL_CHANGE'.
      APPEND gs_event TO gt_event.
    Inside the form, retrieve your vendor details.
    FORM grouplevel_change USING gs_lineinfo
                                 gs_groups TYPE kkblo_grouplevels.
      DATA: l_index     TYPE i.
      IF gs_groups-level = 1.
        l_index = gs_groups-index_to + 1.
        READ TABLE gt_display INDEX l_index  INTO gw_display.   
      ENDIF.
    3. In the event top-of-page, display vendor details using write statements. For the first record, your structure (gw_display) will be blank, read from your data table first
    FORM top_of_page.
      IF gw_display IS INITIAL.
        READ TABLE gt_display INDEX 1 INTO l_display.
        IF sy-subrc = 0.
          WRITE: / l_display-vendor
        ENDIF.
      ELSE.
        WRITE: / gw_display-vendor.
        CLEAR: gw_display.
      ENDIF.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program       = sy-repid
          i_callback_pf_status_set = 'SET_STATUS'
          i_callback_user_command  = 'USER_COMMAND'
          is_layout                = gs_layout
          it_fieldcat              = gt_fcat[]
          it_sort                  = gt_sort[]
          i_save                   = 'A'
          it_events                = gt_event
        TABLES
          t_outtab                 = gt_display[]
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
    Hope this helps.

  • ALV: How do I suppress repeating values and page breaks on printed output?

    Good day, everyone!
    First, I've done a LOT of searching trying to find the answer to my question, but I'm not finding an answer.  If this has already been answered and you can point me to a URL, I would appreciate it.
    Here's my issue:  I have a rather simple ALV report.  It has the columns of Person ID, Personnel Number, For Period, In Period, and Amount.  I sort by Person ID and Personnel Number, and if the value repeats on the next line of the report, I want to suppress it (make it blank).
    I thought the answer was in the following code, where I set the GROUP attribute to asterisk:
      CLEAR sortcat_ln.
      sortcat_ln-spos      = '1'.
      sortcat_ln-fieldname = 'PERSONID_EXT'.
      sortcat_ln-up        = c_true.
      sortcat_ln-group     = '*'.
      APPEND sortcat_ln TO sortcat.
      CLEAR sortcat_ln.
      sortcat_ln-spos      = '2'.
      sortcat_ln-fieldname = 'PERNR'.
      sortcat_ln-up        = c_true.
      sortcat_ln-group     = '*'.
      APPEND sortcat_ln TO sortcat.
    It looks PERFECT on the screen -- the values are suppressed if they repeat, and everything appears together on one screen.  However, when I print the report, two things happen:  1) The values repeat on each row, even if they are the same, and 2) I get a page break after each Person ID / Personnel Number combination.
    I now realize that I can't use the GROUP attribute.  Is there some other way in ALV to blank these repeating values and keep all the rows together on one page, rather than page breaking after each value change?
    Thanks!
    Dave

    Hi
    Same requirement i had before, when i try to print preview. the output of the grid display is in grouping is ok, but when i print preview or print it doesnt cater the grouping and page breaks, so what i did i modify the internal table use in alv , after hitting the print preview/print with the format desired by the user. you can do that in user-command. see code below
    FORM user_command USING r_ucomm TYPE syucomm
                            rs_selfield TYPE slis_selfield.
      DATA lt_sort TYPE lvc_t_sort.
      CASE r_ucomm.
        WHEN '&RNT_PREV' OR '&RNT'.
          t_final_x[] = t_final[].
          PERFORM clear_redundant.
          PERFORM set_sort_criteria USING lt_sort.
        WHEN '&F03' OR '&PRINT_BACK_PREVIEW'.
          t_final[] = t_final_x[].
        WHEN OTHERS.
      ENDCASE.
    ENDFORM.                    "user_command
    hope it helps

  • Prevent Occurence of list header and page breaks in spool file of ALV Grid

    Prevent Occurence of list header and page breaks in spool file of ALV Grid  Display.
    When we run the ALV in background and create spool request then:
    Spool file output is coming like this.
    Column1 Column2 Column3 Column4
    data        data        data       data
    data        data        data       data
    data        data        data       data
    Column1 Column2 Column3 Column4
    data        data        data       data
    data        data        data       data
    data        data        data       data
    But the required is like this
    Column1 Column2 Column3 Column4
    data        data        data       data
    data        data        data       data
    data        data        data       data
    data        data        data       data
    data        data        data       data
    data        data        data       data
    Please suggest a posible answer

    Hello all,
    if you have not yet solved this on your own, here is my solution: use a format type that has 60000 lines per page for your spool output device.
    It all depends on the format type that was used for creating the spool output.
    By default (in our system), we have 65 lines per page. And after each page the column headings of the ALV will appear.
    What i did:
    create a new format type via transaction SPAD->full administration->device types->format types (copy an existing one)
    change"Number of Rows" to 60000 or something applicable
    edit the device type of your output device (e.g. LOCL) to contain the newly created format type (via SPAD; Button "Formats" in device type maintenance).
    That's it! Be sure to use this format type for your output device in the "Background Print Parameters" window (-> Button "Properties").
    Regards
    Daniel Klein
    All other parameters you discussed before didn't do it. All ALV-Settings will be overwritten by the output device settings and its print properties.

  • Unable to group with page breaks when creating pivot table in BIP

    Hi,
    I'm using BIP 10.1.3.4 and I need some assistance with report with pivot tables. I used the wizard to successfully create the pivot table but i need to add a group and break the page on that group. Is there any way i can do this?
    Thanks.

    HI Bala,
    I am Durgaprasad from Pune-INDIA, working as a OBIEE developer, I have one query which I mentioned below can you please go threw it.
    I have done migration Discoverer Admin EUL Layer into OBIEE repository using below methodology.
    Navigate to the <installdrive>\OracleBI\server\Bin directory. There are two important files in this directory: the migration assistant executable file named MigrateEUL.exe and a properties configuration file named MigrationConfig.properties.
    Could you please help me how to migrate discoverer plus workbooks and worksheets into OBIEE Answers?
    go through below link, It will show navigation steps for migrating of EUL from Discoverer to OBIEE.But i need migration of workbooks and worksheets from Discoverer into OBIEE Answers.
    http://www.oracle.com/technology/obe/obe_bi/discoverer/discoverer_1012/discomigration/migrate_disco_biee.htm
    This is very great full help to me …
    Advance thanks for your suggestions.
    Regards
    Duraga Prasad.

  • InDesign Data Merge - Data Grouping or Page Breaks

    I'm working on a plant catalog for a landscaper. I want to group the plants in the catalog by their plant type (i.e. Groundcovers, Trees, Shrubs, etc). Each plant name in the data source is assigned a plant type and I've sorted the data so the plant types are grouped together. I'm successfully using data merge to create a document with multiple records and I want to use the "Plant Type" as a header per group of plants that match that type. I'd be very happy if I could also create a page break between plant types. Is there a way to accomplish this with InDesign? I can accomplish this with Word's data merge but I'd much rather use InDesign.
    Additionally, I'm currently using a text variable at the top of the page and thought this would be the solution to my problem but I'm only able to set this up using the "First on Page" option. This doesn't work well because I frequently have items at the bottom of the page that aren't in the same category as the first item on the page. I'm basically running a merge for every plant type then putting the separate documents together in a PDF... its a little time consuming but not impossible.
    I hope I've explained my situation clearly. Any guidance will be appreciated.

    Data Merge is very primitive. It doesn't do anything but put unlinked frames with data on the page.
    That said, there are scripts, such as the text liner at Rorohiko.com that will link the frames in logical sequence, and paragraph styles can be set to start on next page, or you can add anther field to the data file and put a symbol or text sting into it only where you want a page break, then do a find change and repalce with the break after the merge.
    Are you doing a lot of this? There are catlog pugins which might make your life a lot easier, but they're pricey.

  • Multi page report in design view and page breaks

    Hey,
    I have designed a report that spans more then a single 8X11 page in design view. The report has one parent frame and 2 child frames. The parent data prints first and then there is a page break before each child's data. The trouble I am having is that where the report is designed over 2 pages in design view the first child's data prints on the 3rd page because of the page break, and then if there is another child it will start to print on the 5th page, etc. Another problem is with the actual page numbering and that page 1 according to the print out actually is 2 pages because of the 2 page design view. I am looking for a way to design a report on 2 pages in design view but have it to print on only 1 page per parent and child depending on how much data there is. If I could fit all of the data elements on a single page in design view it would be easy, but using 2 pages is making it difficult.
    Does this make sense? Any suggestions?
    Thanks

    Try doing the page break by setting the Page Protect property to Yes, not by Page Break before/after.

  • Trouble with format of files exported from pages as .doc - when opened on a pc they have extra spaces and pages breaks inserted after each line?  Can be manually deleted, but defeats sharing purpose. advice?

    Hi all, I have trouble with the format of files exported by email as .doc from pages - when opened in MS word on a PC or other device, they have extra spaces and pages inserted after each line - can be deleted manually, but defeats sharing purpose.  Any advice?  Not the most sophisticated user.

    Got it. I tried booting with MOD_AUTOLOAD set to yes, and it was working fine. Looks like I needed to specify some more modules in my list.

  • Cell sizing and page breaking

    Hi
    Firstly, sorry if this is somewhere but I have very slow wireless internet.
    I have created a form in adobe adcrobat pro 8.
    Question 1:
    I know how to have text go across more than one line - is there a way to make the cell and/or row expand to accomodate extra text/lines?
    Question 2:
    I have set up a table that allows unlimited rows to be added by the end user. I have marked it as allows break across pages however when I add more rows it just goes off the bottom of the page over the 'footer' and everything.
    Any help would be greatly appreciated.
    PeitaC

    Usually you can control the display area using the Subform in the Master Page. And then you need to set your root subform to Flowed content type.
    Try these two otpions and if you still have issues send the form to [email protected] so I can have a look at it.
    Thanks
    Srini

  • Cell size and page breaking

    Hi
    Firstly, sorry if this is somewhere but I have very slow wireless internet.
    I have created a form in adobe adcrobat pro 8.
    Question 1:
    I know how to have text go across more than one line - is there a way to make the cell and/or row expand to accomodate extra text/lines?
    Question 2:
    I have set up a table that allows unlimited rows to be added by the end user. I have marked it as allows break across pages however when I add more rows it just goes off the bottom of the page over the 'footer' and everything.
    Any help would be greatly appreciated.
    PeitaC

    Post your questions in the forum for LiveCycle Designer.

  • Page Break After doesn't work???

    I have a report with a query like foll.
    select Region, District, sum(col1), sum(col2), ...
    from t1, t2, t3....
    where
    ....<< some conditions>>
    Group by Region, District;
    Foll is the sample output:
    Region District Col1 Col2
    R1 D1 100 200
    D2 100 200
    Totals/Avg xx xx xx
    R2 D3 100 200
    D4 100 200
    D5 100 200
    Totals/Avg xx xx xx
    R3 D6 100 200
    D7 100 200
    Totals/Avg xx xx xx
    I created a group Left report on Region.
    Now i need each region to appear on a new page for that i selected the Region Repeating frame & set the property Max Records per page = 1 & Page break after = yes. After doing that i see only first Region on first page & rest of the data disappears. I don't know why but data is hiding. when i remove these properties, my data comes back.
    Any kind of suggestion will be appriciated.
    Thanks

    Hi,
    Try to increase the size of repeating frame, as I follow this strategy in my report find the outermost repeating frame and increase its size to whole page than increase the size of your required repeating frame if you want to break page on this group, no need to set max record and page break properties(as I saw page break property never works).
    Thanks.
    Khawar

  • Dynamically insert page breaks (runtime)

    Hi,
    I have 3 repeating frames within each other in Oracle Reports. In the 1st frame I have Product groups. I want to give the user the option (from Oracle Forms) to have all the product groups without page breaks or each product group on one seperate page.
    I only found the "Maximum records per page" property but this can't be set in runtime. I also tried to put a boilerplate on the repeating frame and gave it the property "Page break before". It worked pretty well except on page 2 it repeated the first product group and on page 3 it repeated the second productgroup and so on.
    Does anybody have a solution for my problem?
    Thanks

    I did this long time back.
    1. keep repeating frame with field(value null or line) with page break..
    2. using Format Trigger show or hide this field.

  • Keeping Groups and their Details together when printing a report

    So I created my Groups...[Claim #], [Rec #], [Line #], and [Service_Date] and set the Group Properties Page Break and checked
    Between each instance of a group. I also made the
    Keep Together property to True for all my Row groups and details then.
    When I run in Preview it looks PERFECT!. Then when I actually go to print the report, the grouping is printing on one page and the details on the following page. This is unacceptable.
    Then I Googled and found this...
    https://connect.microsoft.com/SQLServer/feedback/details/428595/keep-together-property-not-working-in-ssrs-2008
    Which makes it seems as though the Keep Together Property has a bug. Unless the
    Keep Together implies in Report Design View. But it does say
    KeepTogther Indicates whether to keep all sections of the data region together on one page. Yeah...but "page" meaning viewable page or printable page...
    I also found this work around which I really don't understand as to what I'm supposed to do.
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/692d85d3-87fe-483f-8267-98213795ef1e/third-major-flaw-with-reporting-services?forum=sqlreportingservices
    Has anyone else experienced this issue? Is this still a problem in SSRS? And can anyone please help me with the work around?
    Thanks in advance and am hopeful for a reply.
    ITBobbyP85

    Hi ITBobbyP,
    According to your description, you have Groups [Claim #], [Rec #], [Line #], and [Service_Date] in the report, and added Page Break to the groups. The report looks normal when you preview it, but when you go to print the report, the groups displayed on one
    page and the details on the following page.
    Based on my knowledge, the issue is due to report size. Page orientation of report is Portrait(8.5in X 11in). If the width of tablix is larger than report page, the groups and details will be displayed on different pages. In this case, we need to change
    paper size to a certain value, please refer to the following steps:
    Right-click outside of the report body and click Report Properties.
    In Page Setup, select a value from the Paper Size list. Each option populates the Width and Height properties. You can also specify a custom size by typing numeric values in the Width and Height boxes. Click OK.
    For more information about setting page size, please refer to the following document:
    https://community.dynamics.com/crm/b/magnetismsolutionscrmblog/archive/2013/10/30/ssrs-using-page-size-and-interactive-size-to-manage-printing.aspx
    If you have any questions, please feel free to let me know.
    Best Regards,
    Wendy Fu

  • Pages to ePub... why so difficult? where are my page breaks?

    So my book is at the editors and I wanted to start to look into publishing to iBooks. So from pages I exported to ePub and the final book looked terrible. So I went through all the forums and I have got to say that there is no step by step guide to accomplish this. So I put it out there to see if someone can help.
    My book is all text, it has 18 chapters and countless page breaks. How can I make the ePub look and work like my pages? Lets start simple no HTML or PDF.
    1. Should I open up a new pages document and set it up a certain way then copy paste from my original pages to this new pages. If so how should this be set up?
    2. Is there a font that I should write in that will not make ePub bonkers
    3. Page breaks... how do I keep these when exporting to ePub?
    4. the Apple template to Export to ePub... I just don't understand how to use this... is there a step by step guide?
    Lastly, I was very surprised this is so difficult to accomplish... sure Apple makes it simple to export to ePub but the final product is nothing like what I have in pages... so is there a program that I can use where tweaking is not nessesary?
    Thanks to all for any help!

    Thanks Tom,
    I did jump on this but I don't know what I am doing wrong. I figured that there could be a set up (when you start a new pages project) one can do before starting a project with pages so exporting to ePub can be seemless (choosing the right fonts etc.) I followed the instructions but the chapters never show up in the table of contents before I export. I have used both page break and section break and started with chapter name (i write in my own chapter name in the same font still does not show up.
    And don't get me started on page breaks! when I cant even get my chapters to start on a new page! BTW I export to itunes then use iBooks...
    A step by step youtube video guide would be nice... all I have found is this:
    http://www6.district125.k12.il.us/staffdev/tutorial/using_pages_to_create_epub_f iles.pdf
    And I follow it but I must be doing something wrong...
    Do you have a suggestion on chapter and page breaks?

  • My Microsoft Word inserts a page break when I hit return

    If I press delete to remove the page break, it brings the sentence back into the previous paragraph.  If I hit return again to make the sentence into a new paragraph, as it is supposed to be, the computer/program inserts a page break, vaulting me onto the next page and leaving the previous half-page (or a bit more) blank. 
    Ideas?  I have restarted.
    Thanks.

    Hi c,
    Try the following:
    Select the paragraph following the unwanted page break.
    On the Format menu, click Paragraph, and then click the Line and Page Breaks tab.
    Clear the Keep lines together, Keep with next, and Page break before check boxes.

Maybe you are looking for

  • How to HD content into Apple TV

    How do you HD video on the Apple TV? What are users doing to do this? (The only source I have see is the download movie trailiers (720p) via the Apple site)

  • I want to change from DVD to App-Store - how do i deinstall to sell?

    Hello, I want to change from DVD installation to the App-Store version. How do I deinstall in order to sell the DVD version but to keep all my data and folders etc.? Kind regards Juergen Kijek

  • Where can I get CS4 (Windows) install media?

    I am migrating from one PC to another, and I want to install my registered CS4 Master Collection onto the new machine. Unfortunately I cannot find my install DVDs! I have contacted Adobe and have spoken to Provantage, the reseller where I purchased t

  • Sales Order Line Number printing as it appears in UI

    Hi, I am trying to get the Line number in sales orders as it appears in the UI,but when i fetch the data from the underlying table i am getting a different value.Can any one help me out how to get the value as is from UI at line level. For Eg: The Sa

  • Did your ipod bend of it's own accord too?

    So I've had my ipod nano for about a month and it has warped and bent entirely of it's own accord.  There are two 1mm paint chips on the corners which indicates that there had never been any impact. There are no scratches on the screen and the screen