Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Page 1 of 8
Share
More
Next Blog
Create Blog
Sign In
Followers
Already a member?Sign in
Recent Comments
Good one.... Thank you very much for such an good ... - 16 June 2013 Deepak very-very good! Thanx! 07 June 2013 - Anonymous thanks a lot for this article ! - 06 June 2013 Yuri Kostin Really good. Crystal clear. Keep up the good work.... 24 May 2013 - ashish kapale have you defined screen 100, titlebar and pf statu... - 21 May 2013 Pawan Kesari
Below is the code for above screen shot. REPORT zreport. TABLES : scarr . DATA : it_scarr TYPE TABLE OF scarr . DATA : ob_custom ob_split1 ob_split2 ob_grid1 ob_grid2 ob_grid3 TYPE TYPE TYPE TYPE TYPE TYPE REF REF REF REF REF REF TO TO TO TO TO TO cl_gui_custom_container , cl_gui_easy_splitter_container , cl_gui_easy_splitter_container , cl_gui_alv_grid , cl_gui_alv_grid , cl_gui_alv_grid .
SELECT-OPTIONS : s_carrid FOR scarr-carrid . START-OF-SELECTION . SELECT INTO FROM WHERE * TABLE it_scarr scarr carrid IN s_carrid .
CALL SCREEN 100 . *&---------------------------------------------------------------------* *& Module status_0100 OUTPUT *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------*
http://sample-code-abap.blogspot.com/2008/06/displaying-two-alv-grid-on-screen.html
2013/06/19
Page 2 of 8
MODULE status_0100 OUTPUT. SET TITLEBAR 'ZTITLE01' . SET PF-STATUS 'ZPF01' . * This will create a container CREATE OBJECT ob_custom EXPORTING container_name = 'CONTAINER' . * This spit the container OB_CUSTOM into two CREATE OBJECT ob_split1 EXPORTING parent = ob_custom orientation = cl_gui_easy_splitter_container=>orientation_vertical . * * * * * Now we have two container OB_SPLIT1->TOP_LEFT_CONTAINER OB_SPLIT1->BOTTOM_RIGHT_CONTAINER Since these two are itself a container we can further devide them into two. Let try to divide OB_SPLIT1->BOTTOM_RIGHT_CONTAINER into two CREATE OBJECT ob_split2 EXPORTING parent = ob_split1->bottom_right_container orientation = cl_gui_easy_splitter_container=>orientation_horizontal . * * * * * * * Now we have total 3 container available with us OB_SPLIT1->TOP_LEFT_CONTAINER OB_SPLIT2->TOP_LEFT_CONTAINER OB_SPLIT2->BOTTOM_RIGHT_CONTAINER Note that OB_SPLIT1->BOTTOM_RIGHT_CONTAINER is not available because we divided that into two. Now Put a grid in each container CREATE OBJECT ob_grid1 EXPORTING i_parent = ob_split1->top_left_container . CREATE OBJECT ob_grid2 EXPORTING i_parent = ob_split2->top_left_container . CREATE OBJECT ob_grid3 EXPORTING i_parent = ob_split2->bottom_right_container . CALL METHOD ob_grid1->set_table_for_first_display EXPORTING i_structure_name = 'SCARR' CHANGING it_outtab = it_scarr. CALL METHOD ob_grid2->set_table_for_first_display EXPORTING i_structure_name = 'SCARR' CHANGING it_outtab = it_scarr. CALL METHOD ob_grid3->set_table_for_first_display EXPORTING i_structure_name = 'SCARR' CHANGING it_outtab = it_scarr. ENDMODULE. " status_0100 OUTPUT *&---------------------------------------------------------------------* *& Module user_command_0100 INPUT *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* MODULE user_command_0100 INPUT. IF sy-ucomm = 'BACK' OR sy-ucomm = 'EXIT' . FREE : ob_grid1 , ob_grid2 , ob_grid3 , ob_split1 , ob_split2 , ob_custom . LEAVE TO SCREEN 0 . ENDIF. ENDMODULE. " user_command_0100 INPUT
Recommended blogs Display ALV Grid (OOP) Fullscreen Use of Application Log FMs to display Message List/Log Creating custom page format for sapscript/smartform Reset ALV Export Option for User Posted by Pawan Kesari Labels: ALV List, SAP ABAP, Tutorial
24 comments:
http://sample-code-abap.blogspot.com/2008/06/displaying-two-alv-grid-on-screen.html
2013/06/19
Page 3 of 8
Great explanation! I was curious whether you could essentially split a screen into thirds (top/middle/bottom) by splitting vertically twice. Can you do this, or does a secondary split have to be opposite of the first? Thanks!!! Reply
Pawan Kesari
I think in above code if you replace the second split by CREATE OBJECT ob_split2 EXPORTING parent cl_gui_easy_splitter_container=>orientation_vertical . then you will get the desire result. Reply = ob_split1->bottom_right_container orientation =
Luis December 10, 2009 at 6:56 AM Hi, I'm getting an error: ASSERTION_FAILED scrolling down in the first ALV Grid. Have you ever got it???? Reply
Pawan Kesari
Anonymous April 4, 2010 at 4:23 AM when i run the code am getting error Dynpro does not exist. Reply
Pawan Kesari
Have you defined screen 100 with custom container in it? Reply
orgy May 11, 2010 at 4:37 PM how to identify in wich ALV we triggered event? (in my case double click) Reply
Pawan Kesari
Usually we write a local class with method and assiciate that method double click of ALV grid. Write a local class for each ALV grid and register their method with double click. Reply Replies Anonymous November 26, 2012 at 1:35 PM Could you explain this in detail. I need to create different action buttons for different ALVs. Thanks & Regards Amit Pal Mob:+91-9999026862
Reply
Anonymous May 25, 2010 at 4:22 PM clearly explained, but i need to know abt the screen 100 used here, do we need to draw the windows on the screen or is it a empty screen. Reply
Pawan Kesari
You need to create screen 100. Put a custom container with name 'CONTAINER' Reply
http://sample-code-abap.blogspot.com/2008/06/displaying-two-alv-grid-on-screen.html
2013/06/19
Page 4 of 8
i tried with this example.It is working fine.Here when i divide the Container (using split container using TOP_LEFT and BOTTOM_RIGHT) it is dividing the screen into two equal portions. How can i control this. I want the top Container to be minimal and below as bigger one. Can i control this. I tried with SET_HEIGHT method.But did't work. Can you look into this if get time. Thanks in Advance. Reply
Pawan Kesari
If you are using class CL_GUI_EASY_SPLITTER_CONTAINER as shown in above example, just pass SASH_POSITION parameter in constructor to control the position. Its position in percentage Reply
Jason September 22, 2010 at 3:16 PM Is there a way to make it dynamic? As in a scenario where there are multiple company code records and each company code is a separate ALV grid Reply
SakDaMan September 22, 2010 at 11:30 PM is there a way to make it dynamic...so we could control the no. of ALV grids based on the data in the internal table? Reply
firdaush February 7, 2011 at 12:25 PM hi, nice code. i'have tried and it works!. But i'm searching the abap code to display this such result using OOP ALV without using Screen/Container Reply
Anonymous March 29, 2011 at 1:23 AM Is it necessary to use CL_GUI_EASY_SPLITTER_CONTAINER? Can't we use CL_GUI_SPLITTER_CONTAINER? What is the difference between the two? Reply
Anonymous July 22, 2011 at 4:22 AM Is it possible to i_structure_name = 'st', where 'st' is define in the abap code and not in the dictionary? Reply
Pawan Kesari
Is it possible to i_structure_name = 'st', where 'st' is define in the abap code and not in the dictionary? i_structure_name = 'ST' , ST should be defined in dictionary. Reply
Baju Muslimah August 28, 2012 at 4:41 AM oh, ok thanks bro Reply
kiruphagar heartbeats May 21, 2013 at 11:02 AM Its not working , so kindly explain me to do.......... Reply Replies Pawan Kesari May 21, 2013 at 5:13 PM
Reply
http://sample-code-abap.blogspot.com/2008/06/displaying-two-alv-grid-on-screen.html
2013/06/19
Page 5 of 8
Publish
Preview
Newer Post
Home
Older Post
Blog Archive
2013 (10) 2012 (6) 2011 (16) 2010 (11) 2009 (23) 2008 (39) December (1) November (1) October (1) September (5) July (9) June (12) Transporting Table Entry Sample/Demo code availble in SAP SELECT-OPTION in Module Pool Screen Add your own pattern in SE38 Call Transaction in New Window Minimum Code Required to Send SAP Mail Calculate Tax of Purchase order Line Item Send report as attachment in background Button on Selection-Screen Displaying Two ALV Grid on Screen Function Module for getting information of Diction... HR ABAP 02 - Getting Started - LDB PNP May (3) February (4) January (3)
Labels
Search
Abap Objects (5) ALV List (10) Config (10) Customer-exit (1) Date (3) Dynamic (4) EDI (6) Enhacement (2) Excel (2) Formatting (2) HR ABAP (2) MD04 (1) Module Pool (6) OLE
Quick Reference (46) Report (12) Rounding Issue (1) Sample Code (53) SAP ABAP (71) SAP
Automation (1) Open Dialog Box (1) Performance (2)
Basis (4) SAP FI (3) SAP Mail (2) SAP MM (13) SAP Notes (3) SAP QM (2) SAP SD (11) Sapscript (9) Screen-exit (1) Selection-Screen (6) Smartforms (7) Standard Text (2) Translation (1) Tutorial (10) Upload Download (2) Utility (5) VAT (1) Web service (2) xml to ABAP (1) XSLT (1)
You are most welcome to use any information available in this blog. Any usage of the information or sample code is at your own risk. I do take care of accuracy and relevance of blog before publishing. However, I do not guarantee that information and code are accurate and bug free, their can be alternate and better way of doing same thing so please use information as reference only. Relevance of code and instructions can possibly change with time, check the blog post date before using this information. This is my personal blog, recommendation and opinions expressed in this blog are mine and not of any company of any of my employer. I do moderate comments and publish as soon as I check them. You can post questions as well, which I will try best to solve. I will anyway publish your questions in case others readers might have answer. Thanks for coming here and reading the blogs :)
http://sample-code-abap.blogspot.com/2008/06/displaying-two-alv-grid-on-screen.html
2013/06/19
Page 6 of 8
http://sample-code-abap.blogspot.com/2008/06/displaying-two-alv-grid-on-screen.html
2013/06/19
Page 7 of 8
http://sample-code-abap.blogspot.com/2008/06/displaying-two-alv-grid-on-screen.html
2013/06/19
Page 8 of 8
http://sample-code-abap.blogspot.com/2008/06/displaying-two-alv-grid-on-screen.html
2013/06/19