Multiple  section in ALV

Hi Guys,
My exiting program displays an ALV in Grid form. One my requirement is to display an ALV grid with 3 different sections with seprate headers and data and subheadings for each. Is it possible?? If so how??... Please help.... Answers will be suitably rewarded.

Hi,
displaying alv grid in different sections using FMs is not possible.for that u need to go for OOALV.or u can display alv list ini different sections.
*& Report  ZBHALV_BLOCK_LIST                                           *
REPORT  ZBHALV_BLOCK_LIST.
TABLES:LFA1,EKKO.
SELECT-OPTIONS:LIFNR FOR LFA1-LIFNR.
DATA:BEGIN OF ITAB OCCURS 0,
     LIFNR LIKE LFA1-LIFNR,
     NAME1 LIKE LFA1-NAME1,
     LAND1 LIKE LFA1-LAND1,
     ORT01 LIKE LFA1-ORT01,
     REGIO LIKE LFA1-REGIO,
END OF ITAB.
DATA:BEGIN OF JTAB OCCURS 0,
     LIFNR LIKE EKKO-LIFNR,
     EBELN LIKE EKKO-EBELN,
     BUKRS LIKE EKKO-BUKRS,
     BSTYP LIKE EKKO-BSTYP,
     EKORG LIKE EKKO-EKORG,
     BSART LIKE EKKO-BSART,
END OF JTAB.
SELECT * FROM LFA1 INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE LIFNR
IN LIFNR.
SELECT * FROM EKKO INTO CORRESPONDING FIELDS OF TABLE JTAB WHERE LIFNR
IN LIFNR.
TYPE-POOLS:SLIS.
DATA:LAYOUT TYPE slis_layout_alv.
DATA:EVE TYPE slis_t_event WITH HEADER LINE.
DATA:EVE1 TYPE slis_t_event WITH HEADER LINE.
DATA:HEAD TYPE slis_t_listheader WITH HEADER LINE.
DATA:FCAT TYPE slis_t_fieldcat_alv.
DATA:FCAT1 TYPE slis_t_fieldcat_alv.
LAYOUT-ZEBRA = 'X'.
LAYOUT-colwidth_optimize = 'X'.
LAYOUT-WINDOW_TITLEBAR = 'VENDOR DETAILS SCREEN'.
EVE1-NAME = 'TOP_OF_PAGE'.
EVE1-FORM = 'TOP_OF_PAGE1'.
APPEND EVE1.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
   I_LIST_TYPE           = 0
IMPORTING
   ET_EVENTS             = EVE[]
EXCEPTIONS
   LIST_TYPE_WRONG       = 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.
READ TABLE EVE WITH KEY NAME = 'TOP_OF_PAGE'.
EVE-FORM = 'TOP_OF_PAGE'.
MODIFY EVE TRANSPORTING FORM WHERE NAME = 'TOP_OF_PAGE'.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
  EXPORTING
    I_CALLBACK_PROGRAM             = SY-REPID
*   I_CALLBACK_PF_STATUS_SET       = ' '
*   I_CALLBACK_USER_COMMAND        = ' '
*   IT_EXCLUDING                   =
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
   I_PROGRAM_NAME               = SY-REPID
   I_INTERNAL_TABNAME           = 'ITAB'
*   I_STRUCTURE_NAME             =
*   I_CLIENT_NEVER_DISPLAY       = 'X'
   I_INCLNAME                   = SY-REPID
*   I_BYPASSING_BUFFER           =
*   I_BUFFER_ACTIVE              =
  CHANGING
    CT_FIELDCAT                  = FCAT
* EXCEPTIONS
*   INCONSISTENT_INTERFACE       = 1
*   PROGRAM_ERROR                = 2
*   OTHERS                       = 3
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
  EXPORTING
    IS_LAYOUT                        = LAYOUT
    IT_FIELDCAT                      = FCAT
    I_TABNAME                        = 'ITAB'
    IT_EVENTS                        = EVE[]
*   IT_SORT                          =
*   I_TEXT                           = ' '
  TABLES
    T_OUTTAB                         = ITAB
* EXCEPTIONS
*   PROGRAM_ERROR                    = 1
*   MAXIMUM_OF_APPENDS_REACHED       = 2
*   OTHERS                           = 3
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
   I_PROGRAM_NAME               = SY-REPID
   I_INTERNAL_TABNAME           = 'JTAB'
*   I_STRUCTURE_NAME             =
*   I_CLIENT_NEVER_DISPLAY       = 'X'
   I_INCLNAME                   = SY-REPID
*   I_BYPASSING_BUFFER           =
*   I_BUFFER_ACTIVE              =
  CHANGING
    CT_FIELDCAT                  = FCAT1
* EXCEPTIONS
*   INCONSISTENT_INTERFACE       = 1
*   PROGRAM_ERROR                = 2
*   OTHERS                       = 3
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
  EXPORTING
    IS_LAYOUT                        = LAYOUT
    IT_FIELDCAT                      = FCAT1
    I_TABNAME                        = 'JTAB'
    IT_EVENTS                        = EVE1[]
*   IT_SORT                          =
*   I_TEXT                           = ' '
  TABLES
    T_OUTTAB                         = JTAB
* EXCEPTIONS
*   PROGRAM_ERROR                    = 1
*   MAXIMUM_OF_APPENDS_REACHED       = 2
*   OTHERS                           = 3
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
* EXPORTING
*   I_INTERFACE_CHECK             = ' '
*   IS_PRINT                      =
*   I_SCREEN_START_COLUMN         = 0
*   I_SCREEN_START_LINE           = 0
*   I_SCREEN_END_COLUMN           = 0
*   I_SCREEN_END_LINE             = 0
* IMPORTING
*   E_EXIT_CAUSED_BY_CALLER       =
*   ES_EXIT_CAUSED_BY_USER        =
* 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.
FORM TOP_OF_PAGE.
REFRESH HEAD.
     HEAD-TYP = 'H'.
     HEAD-INFO = 'VENDORS DETAILS'.
     APPEND HEAD.
     CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
       EXPORTING
         IT_LIST_COMMENTARY       = HEAD[]
*        I_LOGO                   =
*        I_END_OF_LIST_GRID       =
ENDFORM.
FORM TOP_OF_PAGE1.
REFRESH HEAD.
     HEAD-TYP = 'H'.
     HEAD-INFO = 'PURCHASE DOCCUMENTS DETAILS'.
     APPEND HEAD.
     CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
       EXPORTING
         IT_LIST_COMMENTARY       = HEAD[]
*        I_LOGO                   =
*        I_END_OF_LIST_GRID       =
ENDFORM.
rgds,
bharat.

Similar Messages

  • How to select multiple row in ALV report

    Hi friends,
    1. How to select multiple row in ALV report
                   ( How to set tab in ALV report and want to select multiple line.)
    Thanking you.
    Subash

    Hi Sahoo,
    If you are using the class CL_GUI_ALV_GRID. In methods SET_TABLE_FOR_FIRST_DISPLAY.
    in layout structure you will find field SEL_MODE
    pass :
    LS_LAYOUT-SEL_MODE = 'A'.
    In PAI.
      CALL METHOD GRID->GET_SELECTED_ROWS
        IMPORTING
          ET_INDEX_ROWS = T_ROWS
          ET_ROW_NO     = T_ROWID.
    Hope these will solve your problem.
    Regards,
    Kumar M.

  • Print multiple sections in report

    How do I print multiple sections in a report?
    For example, if I have 5 select statements in my data section and want to print them seperately, one after the other, how would I do that?
    I do not want to merge the data together. I want it to be like 5 reports concatenated together.
    Query1 Title
    Query1Results
    Query2 Title
    Query2Results
    ... etc ...

    What you need to do is create a new main frame for each query. The easy way that use to do this is create the section of the report and let the wizard create the frames for me. Then I move them around to make the section look the way I want it to. Then I open a new report. This one I'll build it using the second query. Then again use the wizard to setup the frames. Then you'll select the main frame from the second report using the frame selet button copy it and paste the layout into the first report. You will want to paste it under the first section. A little trick here is to first draw a small line right above where you want the second section. The paste the second section. This will make sure the the second section is close to where you want it. If you do not do this Reports will put it on top of the first section a lot of times. You'll have to recreate the data model again, but that is easier then setting up all the framing on a complex layout. Then repete the second report step until you have done all the queries or sections you want.
    I hope that helps,
    Tom

  • Multiple sections in a single file

    How would one design a datastore for a file that has multiple sections? Each of the sections have different structures and can appear x number of times?

    could you validate your instance against your schema.
    in the visual studio, select your schema and set the property "input instance file name" to your sample instance.
    and then try to validate your instance as shown below.  If it does not succeed, then it means your instance does not comply with your schema definition. you should make sure it succeeds.
    Right click on the schema file and set the 
    Please mark the post as answer if this answers your question. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • How to delete multiple sections?

    I imported a Pages doc and now it seems its too big since iBooks keeps on crashing...
    Size of the file is about 65M, iPad (1),
    I am trying to reduce the size of this doc by deleting "sections" but I can only delete one section at a time.
    Is there a way to delete multiple sections in one go...
    Also does someone know how to change the page numbers from Roman to Numbers?
    thanks in advance.

    Is there a way to change Page Number format for all the Sections at one time.
    Currently I have to do it one Section at a time..
    thanks

  • Word document with multiple sections generates multiple pdf?

    Hello everyone,
    I'm a new and happy Mac user, but not fully able to use this. I hope you can help.
    I have a Word document, with multiple sections that I want to convert into pdf. When I used to do this with the PC, I didn't have problems. I used to use Click to Convert and I normally used to get one single pdf file.
    Now, using the pdf button wit the Mac, I get separate pdf files, one for each section. Is there a way that I can create a single pdf, with all the sections in order? If not, how can I merge the pdf in one single pdf file?
    Thanks in advance.

    Hi,
    just to let you know I have sorted this.
    http://macintoshhowto.com/leopard/how-to-merge-pdf-files-with-preview-in-leopard .html
    Thanks.

  • SAPGUI JAVA 7.10 (OSX 10.5.1): cannot select multiple columns in ALV

    Hi,
    in sapgui java 7.10 (on mac osx 10.5.1) I cannot select multiple columns in ALV reports.
    I can do it only in some transactions (like SE16). But on all our custom reports (REUSE_ALV_GRID_DISPLAY) in does not work.
    Any hint?
    Many thanks,
    Lorenzo

    Hi Lorenzo,
    did you double check if selecting multiple columns works with SAP GUI for Windows in the same report?
    If yes, I suggest to file a bug report so we can do a remote logon to run your custom report.
    If not it might be because of REUSE_ALV_GRID_DISPLAY itself or your parameters calling REUSE_ALV_GRID_DISPLAY.
    Best regards
    Rolf-Martin

  • Create a pfd file from a word 2004 file containing multiple Sections.

    I just got a macbook pro, installed office 2004 and acrobat pro 8.1. However, when I want to print - using PDF 8.9 printer driver - a word file with multiple sections in it, I cannot get the full document in the pdf file but only the last Section.
    Some sections are portraits and others are landscapes.
    Any idea what is happening? Tried to play with various set-up but nothing works...... Help!

    Thanks, however, I tried and it does not work. Also I correct the printer driver is 8.0 not 8.9. I tried both ways you mentionned but I get the pdf files in multiple sections (one file per section), cannot get a full file with all sections at once.

  • Multiple Heading in ALV Grid

    Hello ,
    I have a requirement to display Multiple heading in ALV Grid, I am using the Class 'cl_gui_alv_grid'. please let me know if you have Any suggestions.
    Ex:
    |                 Divison                     |     
    Sub D:1
    Sub D: 2
    Sub D: 3
        Like wise i have few more divisions to display and Under we need to display the Sub Division also .
    Thanks in Advance..  Waiting for your suggestions.
    With Best Regards
    Nags

    Hi,
    I had attempted to do it in the object oriented way, but found no ready solution, so I settled for the below solution.
    Please use the function REUSE_ALV_COMMENTARY_WRITE.
    This allows you to print multiple lines in the header.
    I had a requirement of showing 5 lines in the header.
    So i went on like:
    DATA: it_list_commentary TYPE slis_t_listheader,
               wa_list_commentary TYPE slis_listheader.
    wa_list_commentary-typ = 'H'.
    wa_list_commentary-info = <text>.
    APPEND wa_list_commentary TO it_list_commentary.
    wa_list_commentary-typ = 'S'.
    wa_list_commentary-info = <text>.
    APPEND wa_list_commentary TO it_list_commentary.
    I fed he internal table with all 5 lines like above.
    Finally I called the function.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = it_list_commentary.
    Regards,
    Prosenjit.
    Edited by: prosenjit chaudhuri on Jan 28, 2009 6:14 AM

  • HELP!  Multiple sections document - ALL MY PICTURES HAVE CHANGED!!!!

    Hello,
    Does anyone know what the heck is going on here? I have a multiple sections document created yesterday, 150 pages (! over 10 + hours of work!!!), different articles copied from word documents, with about 3 different pictures per article. I spent the bulk of my time resizing and object wrapping many different photographs NOW ALL THE PICTURES (EVERY ONE IN ALL 150+ PAGES!) HAVE CHANGED TO THE SAME 5 PICTURES FROM THE LAST ARTICLE ADDED. Every picture is now changed!!! It did not look like this last night. PLEASE! ANYONE HELP HELP HELP. I'm calm now but seriously this was a lot of work to just throw out...

    OK, after looking further and running some tests, I have found an interesting situation. PAGES does NOT copy info when it copies a picture, why is this??? EX: Document "A" Has a paragraph of text and a picture called "house" - in the info portion of the inspector, it tells me it is called "house" when I click the picture. If I then copy and past the contents of the page, or drag and drop the picture, or copy and paste just the picture, the picture appears in Document "B" BUT NONE OF THE INFO FOR THAT PICTURE COPIES OVER. Why for the love of all...Why wouldn't it copy the info when it copies the picture? How can I make it do that? How can I paste the picture and make sure it has not only info but also actually MAKES it to the PACKAGE CONTENTS AREA!!!! Thank you for your help. Seriously, thank you to anyone who even attempts to figure this out.

  • How can I allow the application to line through a field that has been locked after being digitally signed?  We have multiple sections on a form with some fields being proposed information and other in another section having the approved information. once

    How can I allow the application to line through a field that has been locked after being digitally signed?
    We have multiple sections on a form with some fields being proposed information and other in another section having the approved information. once the approved information is entered we line through the proposed field so the data entry clerk won't pick up the wrong information.  However we are receiving an error when attempting to enter data  in the field which we have this edit.  Error property: line through cannot be set because doing so would violate the document permission setting.  any idea how we can get around this issue?

    You can control which fields are locked down after signing by setting up a collection. Then those that are not locked can be changed after signing. If this is not possible, then the line outs must occur prior to signing.

  • How to select multiple records in ALV with out pressing ctrl

    Hi Experts,
    Is there a way to select multiple records in ALV with out pressing ctrl button on the key board?
    Selection and deselection should allow multiple records.
    any clue is highly appreciated.
    regards,
    Ajay

    The keyboard always plays a role, although with the Shift key you can select blocks of records.
    ○       CTRLclick, CTRLspacebar
    Toggles a selection.
    ○       SHIFTclick, CTRLshift
    Selects the area from the lead selection to the row selected. If no lead selection is set, the selection starts from the first row. In the multiNoLead mode, the selection starts from the row last selected

  • Multiple headers in alv

    Hi All,
    I have the following requirement, need to display multiple headers in ALV display(not multiple lines in alv header).
    Header1.
    Row1
    Row2
    Row3
    Footer 1.
    Header2.
    Row1
    Row2
    Row3
    Footer 2.
    Header3.
    Row1
    Row2
    Row3
    Footer 3.
    To display this in hierarchal ALV the above given tables does not have header item relationship. To use Blocked ALV the number of blocks are not constant, Sometimes there can be only 2 blocks sometimes there can be 10 blocks and some times even more, there is no cap on Maximum number of blocks.
    I have searched in SDN N google but couldnt found suitable answer. If anyone has solved this type of issue before, can please through some light.
    Thanks in Advance.

    Hi All,
    I'm able to solve the above issue somewhat by using split technique. I want to know how to trigger top of page event in split. I want to trigger top of page event in same container where data is being displayed.
    I have created container on screen and splitted that container into 3 parts, as I need to display data in each container. Now I want to display top of page for each container.
    I have searched over internet and SDN but I'm able to find examples like split the containers into 2 parts and use 1 part for top of page and second part for data display.
    My case is little different. I need to display data in each container with separate header for each container. If the header is only single line I could have used Layout-Title, but the header for each container is multiple lines. So I must use top of page.
    If any body handled such kind of scenario, please provided some inputs.
    Thanks in advance.

  • Multiple levels in ALV Hierarchy

    Hi All
    How to display Multiple levels in ALV Hierarchy.
    I have header and Item Tables but Under Header Expansions I have to display one more Expansion.
    Means Multiple levels.

    Hi,
      I think you can check standard program BCALV_TEST_HIERSEQ_LIST
    Regards,
    Himanshu

  • How to avoid multiple selection in ALV tree control?

    Hi,
    Experts,
    I want to avoid multiple selections on Alv tree control after pressing control keyboard button(Ctrl). Even by pressing Ctrl keyword button i want to select only one row of a Alv tree control.i have used cl_salv_tree class for it is there any method to achieve this please pass some code/idea on it.
    Thanks in advance,
    Shabeer ahmed.

    I haven't tried it before but it should help.
    [https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/cda3992d-0e01-0010-90b2-c4e1f899ac01|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/cda3992d-0e01-0010-90b2-c4e1f899ac01]

Maybe you are looking for

  • Can I connect the displays of 2 mac book pros?

    I now have 2 macbook pros - one 2011 and another 2013 model, both running the latest OSX 10.9.4, can I hook up the monitors so one is an extended desktop of another?

  • Which compressor settings should i choose?

    Hi guys.  need a little help. I've edited a 40 minute summer camp video together and i've been using a HD camera that shoots in MTS files.  my final cut pro 7 has been converting all the footage to Apple Pro Res 422.    The problem is the file size i

  • Reason for Rejection getting Auto Populated

    Hi, I am creating an std order without reference to a preceding document, still the "reason for rejection" is auto populating in the Reason for rejection Tab. I dont want this to happen, please suggest. Sachin

  • Troubleshooting Point to Multipoint Wireless Bridge

    I have a customer which is a  Small RV Park that has Four 1242 Dual Band Access Points with external outdoor antennae.   All 4 APs are configured with a client SSID on the 802.11G radio, and an Infrastructure SSID on the 802.11A radio interface.   Th

  • How to set Bookmark element to expand

    Hi All, First I'll explain the solution so that you understand what I'm trying to accomplish. The solution involves several PDF files and each one is linked by the bookmark using the following DDX: <Bookmark>         <Action>               <Launch Ne