Displaying two blocks in a single screen
Hi all,
I want to dispaly two screens in a single with as-usual properties.
Please give your suggestions with steps.
Thansk in advance,
Regards,
Balaaji.
hi balaji ,
create a main screen and in which create two sub screens . like this .
REPORT ZSUBSCREEN.
TABLES: USR02, "Logon data
SSCRFIELDS. "FIELDS ON SELECTION SCREENS
SUBSCREEN 1
SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-010.
SELECT-OPTIONS: USERNAME FOR USR02-BNAME.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN END OF SCREEN 100.
SUBSCREEN 2
SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-020.
SELECT-OPTIONS: LASTLOGI FOR USR02-TRDAT.
SELECTION-SCREEN END OF BLOCK B2.
SELECTION-SCREEN END OF SCREEN 200.
SUBSCREEN 3
SELECTION-SCREEN BEGIN OF SCREEN 300 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-030.
SELECT-OPTIONS: CLASSTYP FOR USR02-CLASS.
SELECTION-SCREEN END OF BLOCK B3.
SELECTION-SCREEN END OF SCREEN 300.
STANDARD SELECTION SCREEN FOR SCROLLING LEFT AND RIGHT
SELECTION-SCREEN: FUNCTION KEY 1,
FUNCTION KEY 2.
SELECTION-SCREEN: BEGIN OF TABBED BLOCK SUB FOR 15 LINES,
END OF BLOCK SUB.
START-OF-SELECTION.
SELECT * FROM USR02 WHERE BNAME IN USERNAME
AND ERDAT IN LASTLOGI
AND CLASS IN CLASSTYP.
WRITE: / 'User ', USR02-BNAME,
'Last Login Date ', USR02-TRDAT,
'Last Login Time ', USR02-LTIME,
'CLASS ', USR02-CLASS.
ENDSELECT.
END-OF-SELECTION.
INITIALIZATION.
SCREEN ICON LEFT AND RIGHT
SSCRFIELDS-FUNCTXT_01 = '@0D@'.
SSCRFIELDS-FUNCTXT_02 = '@0E@'.
SUB-PROG = SY-REPID.
SUB-DYNNR = 100.
AT SELECTION-SCREEN.
CASE SY-DYNNR.
WHEN 100.
IF SSCRFIELDS-UCOMM = 'FC01'.
SUB-DYNNR = 300.
ELSEIF SSCRFIELDS-UCOMM = 'FC02'.
SUB-DYNNR = 200.
ENDIF.
WHEN 200.
IF SSCRFIELDS-UCOMM = 'FC01'.
SUB-DYNNR = 100.
ELSEIF SSCRFIELDS-UCOMM = 'FC02'.
SUB-DYNNR = 300.
ENDIF.
WHEN 300.
IF SSCRFIELDS-UCOMM = 'FC01'.
SUB-DYNNR = 200.
ELSEIF SSCRFIELDS-UCOMM = 'FC02'.
SUB-DYNNR = 100.
ENDIF.
ENDCASE.
regard,
sandeep patel
reward point if helpful
Similar Messages
-
Displaying two pages on a single screen on iPad
In the desktop version Adobe Reader can display two pages of a document on a single screen within the app. I hope Adobe will bring that feature on iPad which will be available if the iPad is in the landscape mode.
In the desktop version Adobe Reader can display two pages of a document on a single screen within the app. I hope Adobe will bring that feature on iPad which will be available if the iPad is in the landscape mode.
-
Hi Experts,
I want to display two graphs in a single screen. It should be a pie chart.
Currently I did one pie chart using GRAPH_MATRIX_2D.
It is working fine.
But i want to display another PIE Chart within the same screen.
Can anyone help me sort out?
Thanks in advanceHi Vimal,
Go throungh the following code. it will help you.
REPORT Z_3DGRAPH.*structure declaration for performance measurementTYPES: BEGIN OF ty_performance,
company(15) TYPE c,
q1 TYPE i,
q2 TYPE i,
q3 type i,
q4 type i,
END OF ty_performance.*structure declaration for options table
types : BEGIN OF ty_opttable,
options(30) TYPE c,
END OF ty_opttable.*Internal table and work area declarations
DATA: it_performance TYPE STANDARD TABLE OF ty_performance,
wa_performance TYPE ty_performance.DATA : it_opttable type standard table of ty_opttable,
wa_opttable type ty_opttable.*initialization event
INITIALIZATION.*start of selection event
START-OF-SELECTION.*clearing the work areas
CLEAR WA_PERFORMANCE.
CLEAR wa_opttable.*appending values into the performance internal table
wa_performance-company = 'Company A'.
wa_performance-q1 = 78.
wa_performance-q2 = 68.
wa_performance-q3 = 79.
wa_performance-q4 = 80.append wa_performance to it_performance.wa_performance-company = 'Company B'.
wa_performance-q1 = 48.
wa_performance-q2 = 68.
wa_performance-q3 = 69.
wa_performance-q4 = 70.append wa_performance to it_performance.wa_performance-company = 'Company C'.
wa_performance-q1 = 78.
wa_performance-q2 = 48.
wa_performance-q3 = 79.
wa_performance-q4 = 85.append wa_performance to it_performance.*appending values into the options internal tablewa_opttable-options = 'P3TYPE = TO'.
APPEND wa_opttable TO it_opttable.wa_opttable-options = 'P2TYPE = VB'.
APPEND wa_opttable TO it_opttable.wa_opttable-options = 'TISIZE = 1'.
APPEND wa_opttable TO it_opttable.*calling the graph function module
CALL FUNCTION 'GRAPH_MATRIX_3D'
EXPORTING
col1 = 'Quarter 1'
col2 = 'Quarter 2'
col3 = 'Quarter 3'
col4 = 'Quarter 4'
dim1 = 'In Percentage%'
set_focus = 'X'
titl = 'Company Performances'
TABLES
data = it_performance
opts = it_opttable
EXCEPTIONS
others = 1.
Regards,
Rajesh Kumar -
How to display List and Image on Single Screen?
Hi Friends,
I wanna display Image and List on single screen.
Its not possible using Form which will contain both. either I can list or form which contain image as far I know.
I have seen one J2ME application which contain Image and below that there is list. Can anybody tell me how?
Thanks,
Rohan ChandaneHi,
Are you able to put a list and image into a form.
If so plz let me know the method to do tht.
thanks. -
Displaying ALV and Graphs on single screen
Hi Experts ,
I want to display the ALV/List and its graphs on a single screen how it can be possible.
Can anyone give me steps or example code.
Thanks.......
Edited by: RNIDHI on Dec 6, 2011 11:14 AMHi,
I am attaching Code which i executed earlier and i got output correctly.
REPORT ZALVMLTP.
DATA: Splitter_1 TYPE REF TO cl_gui_splitter_container,
Splitter_2 TYPE REF TO cl_gui_splitter_container,
Container TYPE REF TO cl_gui_custom_container,
Container_1 TYPE REF TO cl_gui_container,
Container_2 TYPE REF TO cl_gui_container,
Container_3 TYPE REF TO cl_gui_container,
Grid1 TYPE REF TO cl_gui_alv_grid,
Grid2 TYPE REF TO cl_gui_alv_grid,
Grid3 TYPE REF TO cl_gui_alv_grid.
DATA: Gt_sflight_1 TYPE TABLE OF sflight,
Gt_sflight_2 TYPE TABLE OF sflight,
Gt_sflight_3 TYPE TABLE OF sflight,
G_container TYPE scrfname VALUE 'CCONTAINER'.
DATA: ok_code TYPE sy-ucomm.
fetching data from table for different internal tables
SELECT * FROM sflight INTO TABLE gt_sflight_1.
SELECT * FROM sflight INTO TABLE gt_sflight_2 UP TO 18 ROWS.
SELECT * FROM sflight INTO TABLE gt_sflight_3 UP TO 9 ROWS.
CALL SCREEN 9010.
*& Module STATUS_9010 OUTPUT *
MODULE status_9010 OUTPUT.
SET PF-STATUS 'TEST'.
*creating object reference for container
CREATE OBJECT container
EXPORTING
container_name = 'CCONTAINER'.
*splitting the main container into 1 row & 2 coloum
CREATE OBJECT splitter_1
EXPORTING
Parent = container
Rows = 1
Columns = 2.
*getting the reference for the splited container (row 1 & col 1 container)
CALL METHOD splitter_1->get_container
EXPORTING
Row = 1
Column = 1
RECEIVING
Container = container_1.
*getting the reference for the splited container (row 1 & col 2 container)
CALL METHOD splitter_1->get_container
EXPORTING
Row = 1
Column = 2
RECEIVING
Container = container_2.
*splitting the 2nd coloum container in to 2 rows & 1 coloum
CREATE OBJECT splitter_2
EXPORTING
Parent = container_2
Rows = 2
Columns = 1.
*getting the reference for the splited container2 (row 1 & col 2 container)
CALL METHOD splitter_2->get_container
EXPORTING
Row = 1
Column = 1
RECEIVING
Container = container_2.
*getting the reference for the splited container2 (row 2 & col 1 container)
CALL METHOD splitter_2->get_container
EXPORTING
Row = 2
Column = 1
RECEIVING
Container = container_3.
*populating first internal table to the container
CREATE OBJECT container
EXPORTING
container_name = g_container.
CREATE OBJECT grid1
EXPORTING
i_parent = container_1.
CALL METHOD grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'SFLIGHT'
CHANGING
it_outtab = gt_sflight_1.
*populating second internal table
CREATE OBJECT container
EXPORTING
container_name = g_container.
CREATE OBJECT grid2
EXPORTING
i_parent = container_2.
CALL METHOD grid2->set_table_for_first_display
EXPORTING
i_structure_name = 'SFLIGHT'
CHANGING
it_outtab = gt_sflight_2.
*populating third internal table
CREATE OBJECT container
EXPORTING
container_name = g_container.
CREATE OBJECT grid3
EXPORTING
i_parent = container_3.
CALL METHOD grid3->set_table_for_first_display
EXPORTING
i_structure_name = 'SFLIGHT'
CHANGING
it_outtab = gt_sflight_3.
ENDMODULE.
*& Module EXIT INPUT *
MODULE exit INPUT.
*free the container memory when exit
CALL METHOD container->free.
LEAVE PROGRAM.
ENDMODULE.
*& Module USER_COMMAND_9010 INPUT *
MODULE user_command_9010 INPUT.
CALL METHOD cl_gui_cfw=>dispatch.
CASE SY-UCOMM.
WHEN 'BACK'.
LEAVE SCREEN.
WHEN 'CANCEL'.
LEAVE PROGRAM.
WHEN 'EXIT'.
LEAVE SCREEN.
ENDCASE.
ENDMODULE.
This code will provide total information.
Warm Regards,
PavanKumar.G -
Display two fields in one single cell in a BEx report.
In a BEx 7 query, we need to display 'First name' and 'Last name' in one cell/column called "Name". The 'First name' and 'Last name' are two different info objects in the multiprovider on which the query is built. These are navigational attributes for Char - Employee. The entire flow is in 7.0 version.
Any pointers to how this can be done in the query designer?
Thanks.Hi,
Follow the following steps:
1. Create a Variable and in General Tab Set Processing By As Customer Exit.
2. Now go to CMOD & Write the following code doing some custom changes specific to your requirement:
WHEN "Variable Name"
"Here you can write a code to select the value from Infocube table and Loop it in a work area"
Loop it_tab INTO wa
concatenate S_date s_tstmp into s_val_new separated by space.
l_s_range-low = s_val_new.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND l_s_range TO e_t_range.
END LOOP
Note: l_s_range is a structure and holds a single line whereas E_T_range stands for internal table and have multiple values . in customer exit (used for variable ) holds the derived value for the variable .
You can go to query and there u can drag this Characteristic on which you created this custom exit variable -
Keyboard displays about two inches higher than expected in portrait and landscape. No Bluetooth devices associated to iPad and the iPad has been 'rebboted' - problem persists.
iPad keyboard is not docked to screen, to resolve press and hold the keyboard key (bottom-rightmost) and select to dock.
-
Two table views in single screen
Hi,
are we able to put two Table views in one UI window?
My requirement is if i click on one cell on 1st table view then 2nd table view cell's in the same UI window has to be updated with required values.
is that possible?
Please let me know the solution if anyone know.
Thanks in advance.Just go to interface builder and drop two table views in.
Presto! You're done. -
Two grid display in a single screen
We need to display two grids in a single screen. In first grid we will display the line items and in the other one we need to display the error logs encounterd during the execution of program. Can anyone let us know any way we can do this.
Hi,
In one screen . Put 2 containers with different names.
cont1,cont2
on each of the container call grid,grid1 like below .
1. this is for item line display
IF g_r_grid IS INITIAL.
CREATE OBJECT g_r_cont
EXPORTING container_name = 'CONT1'.
g_r_variant = sy-repid.
*--Build field catalog
PERFORM build_field_catalog.
*--Layout selection
g_r_layo-cwidth_opt = g_c_set.
g_r_layo-no_rowmark = g_c_set.
g_r_layo-sel_mode = space.
CALL METHOD g_r_grid->set_table_for_first_display
EXPORTING
i_buffer_active = g_c_set
is_variant = g_r_variant
is_layout = g_r_layo
i_save = g_c_set
i_default = g_c_set
CHANGING
it_outtab = g_t_alv
it_fieldcatalog = g_t_fieldcat
it_sort = g_t_sort.
endif
1. this is for error data display
IF g_r_grid1 IS INITIAL.
CREATE OBJECT g_r_cont
EXPORTING container_name = 'CONT2'.
g_r_variant = sy-repid.
*--Build field catalog
PERFORM build_field_catalog.
*--Layout selection
g_r_layo-cwidth_opt = g_c_set.
g_r_layo-no_rowmark = g_c_set.
g_r_layo-sel_mode = space.
CALL METHOD g_r_grid->set_table_for_first_display
EXPORTING
i_buffer_active = g_c_set
is_variant = g_r_variant
is_layout = g_r_layo
i_save = g_c_set
i_default = g_c_set
CHANGING
it_outtab = g_t_error
it_fieldcatalog = g_t_fieldcat
it_sort = g_t_sort.
endif -
Need to display two ALV GRIDs in a single screen
Hi,
I have a question, i'm using version 4.6. I want to display 2 ALVs in a single screen or by calling.
Step 1 : The internal table (which holds the data for the ALVs has to be populated before calling ALV1 or ALV2)
Step 2 : Display In a single report
ALV1 report (Editable ,Has to be a GRID)
ALV2 report (Non Editable, Has to be a GRID)
(or)
Step 1 : The internal table (which holds the data for the ALVs has to be populated before calling ALV1 or ALV2)
Step 2 :
ALV1 report (Editable ,Has to be a GRID, with a custom button to call ALV2 hiding the ALV1 ie not visible to user)
ALV2 report (Non Editable ,Has to be a GRID, with a custom button to call ALV1 hiding the ALV2 ie not visible to user)
Please help me <b><REMOVED BY MODERATOR></b>
Message was edited by:
Alvaro Tejada GalindoHi
ABAP List Viewer
Simple ALV report
http://www.sapgenie.com/abap/controls/alvgrid.htm
http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
ALV
1. Please give me general info on ALV.
http://www.sapfans.com/forums/viewtopic.php?t=58286
http://www.sapfans.com/forums/viewtopic.php?t=76490
http://www.sapfans.com/forums/viewtopic.php?t=20591
http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
2. How do I program double click in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=11601
http://www.sapfans.com/forums/viewtopic.php?t=23010
Check the program in the following link:
http://sap-img.com/abap/display-secondary-list-using-alv-grid.htm
3. How do I add subtotals (I have problem to add them)...
http://www.sapfans.com/forums/viewtopic.php?t=20386
http://www.sapfans.com/forums/viewtopic.php?t=85191
http://www.sapfans.com/forums/viewtopic.php?t=88401
http://www.sapfans.com/forums/viewtopic.php?t=17335
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_basic.htm
4. How to add list heading like top-of-page in ABAP lists?
http://www.sapfans.com/forums/viewtopic.php?t=58775
http://www.sapfans.com/forums/viewtopic.php?t=60550
http://www.sapfans.com/forums/viewtopic.php?t=16629
5. How to print page number / total number of pages X/XX in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
http://www.sapfans.com/forums/viewtopic.php?t=64320
http://www.sapfans.com/forums/viewtopic.php?t=44477
7. How can I set the cell color in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=52107
8. How do I print a logo/graphics in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=81149
http://www.sapfans.com/forums/viewtopic.php?t=35498
http://www.sapfans.com/forums/viewtopic.php?t=5013
9. How do I create and use input-enabled fields in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=84933
http://www.sapfans.com/forums/viewtopic.php?t=69878
10. How can I use ALV for reports that are going to be run in background?
http://www.sapfans.com/forums/viewtopic.php?t=83243
http://www.sapfans.com/forums/viewtopic.php?t=19224
11. How can I display an icon in ALV? (Common requirement is traffic light icon).
http://www.sapfans.com/forums/viewtopic.php?t=79424
http://www.sapfans.com/forums/viewtopic.php?t=24512
12. How can I display a checkbox in ALV?
http://www.sapfans.com/forums/viewtopic.php?t=88376
http://www.sapfans.com/forums/viewtopic.php?t=40968
http://www.sapfans.com/forums/viewtopic.php?t=6919
13. Top-of-page in ALV
selection-screen and top-of-page in ALV
14. ALV Group Heading
http://www.sap-img.com/fu037.htm
How to add list heading like top-of-page in ABAP lists?
http://www.sapfans.com/forums/viewtopic.php?t=58775
http://www.sapfans.com/forums/viewtopic.php?t=60550
http://www.sapfans.com/forums/viewtopic.php?t=16629
15. ALV output to PDF conversion
It has an example code for PDF Conversion.
http://www.erpgenie.com/abap/code/abap51.htm
converting the output of alv in pdf
Go thru these programs they may help u to try on some hands on
ALV Demo program
BCALV_DEMO_HTML
BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
BCALV_GRID_DEMO Simple ALV Control Call Demo Program
BCALV_TREE_DEMO Demo for ALV tree control
BCALV_TREE_SIMPLE_DEMO
BC_ALV_DEMO_HTML_D0100
The common features of report are column alignment, sorting, filtering, subtotals, totals etc. To implement these, a lot of coding and logic is to be put. To avoid that we can use a concept called ABAP List Viewer (ALV).
This helps us to implement all the features mentioned very effectively.
Using ALV, We can have three types of reports:
1. Simple Report
2. Block Report
3. Hierarchical Sequential Report
There are some function modules which will enable to produce the above reports without much effort.
All the definitions of internal tables, structures and constants are declared in a type-pool called SLIS.
1. SIMPLE REPORT.
The important function modules are
a. Reuse_alv_list_display
b. Reuse_alv_fieldcatalog_merge
c. Reuse_alv_events_get
d. Reuse_alv_commentary_write
e. Reuse_alv_grid_display
A. REUSE_ALV_LIST_DISPLAY : This is the function module which prints the data.
The important parameters are :
I. Export :
i. I_callback_program : report id
ii. I_callback_pf_status_set : routine where a user can set his own pf status or change the functionality of the existing pf status
iii. I_callback_user_command : routine where the function codes are handled
iv. I_structure name : name of the dictionary table
v. Is_layout : structure to set the layout of the report
vi. It_fieldcat : internal table with the list of all fields and their attributes which are to be printed (this table can be populated automatically by the function module REUSE_ALV_FIELDCATALOG_MERGE
vii. It_events : internal table with a list of all possible events of ALV and their corresponding form names.
II. Tables :
i. t_outtab : internal table with the data to be output
B. REUSE_ALV_FIELDCATALOG_MERGE : This function module is used to populate a fieldcatalog which is essential to display the data in ALV. If the output data is from a single dictionary table and all the columns are selected, then we need not exclusively create the field catalog. Its enough to mention the table name as a parameter(I_structure name) in the REUSE_ALV_LIST_DISPLAY. But in other cases we need to create it.
The Important Parameters are :
I. Export :
i. I_program_name : report id
ii. I_internal_tabname : the internal output table
iii. I_inclname : include or the report name where all the dynamic forms are handled.
II Changing
ct_fieldcat : an internal table with the type SLIS_T_FIELDCAT_ALV which is
declared in the type pool SLIS.
C. REUSE_ALV_EVENTS_GET : Returns table of possible events for a list type
Parameters :
I. Import :
Et_Events : The event table is returned with all possible CALLBACK events
for the specified list type (column 'NAME'). For events to be processed by Callback, their 'FORM' field must be filled. If the field is initialized, the event is ignored. The entry can be read from the event table, the field 'FORM' filled and the entry modified using constants from the type pool SALV.
II. Export :
I_List_type :
0 = simple list REUSE_ALV_LIST_DISPLAY
1 = hierarchcal-sequential list REUSE_ALV_HIERSEQ_LIST_DISPLAY
2 = simple block list REUSE_ALV_BLOCK_LIST_APPEND
3 = hierarchical-sequential block list
REUSE_ALV_BLOCK_LIST_HS_APPEND
D. REUSE_ALV_COMMENTARY_WRITE : This is used in the Top-of-page event to print the headings and other comments for the list.
Parameters :
I. it_list_commentary : internal table with the headings of the type slis_t_listheader.
This internal table has three fields :
Typ : H header, S selection , A - action
Key : only when typ is S.
Info : the text to be printed
E. REUSE_ALV_GRID_DISPLAY : A new function in 4.6 version, to display the results in grid rather than as a preview.
Parameters : same as reuse_alv_list_display
This is an example for simple list.
2. BLOCK REPORT
This is used to have multiple lists continuously.
The important functions used in this report are:
A. REUSE_ALV_BLOCK_LIST_INIT
B. REUSE_ALV_BLOCK_LIST_APPEND
C. REUSE_ALV_BLOCK_LIST_HS_APPEND
D. REUSE_ALV_BLOCK_LIST_DISPLAY
A. REUSE_ALV_BLOCK_LIST_INIT
Parameters:
I. I_CALLBACK_PROGRAM
II. I_CALLBACK_PF_STATUS_SET
III. I_CALLBACK_USER_COMMAND
This function module is used to set the default gui status etc.
B. REUSE_ALV_BLOCK_LIST_APPEND
Parameters :
Export :
I. is_layout : layout settings for block
II. it_fieldcat : field catalog
III. i_tabname : internal table name with output data
IV. it_events : internal table with all possible events
Tables :
i. t_outtab : internal table with output data.
This function module adds the data to the block.
Repeat this function for all the different blocks to be displayed one after the other.
C. REUSE_ALV_BLOCK_LIST_HS_APPEND
This function module is used for hierarchical sequential blocks.
D. REUSE_ALV_BLOCK_LIST_DISPLAY
Parameters : All the parameters are optional.
This function module display the list with data appended by the above function.
Here the functions REUSE_ALV_FIELDCATALOG_MERGE, REUSE_ALV_EVENTS_GET, REUSE_ALV_COMMENTARY_WRITE can be used.
3. Hierarchical reports :
Hierarchical sequential list output.
The function module is
A. REUSE_ALV_HIERSEQ_LIST_DISPLAY
Parameters:
I. Export:
i. I_CALLBACK_PROGRAM
ii. I_CALLBACK_PF_STATUS_SET
iii. I_CALLBACK_USER_COMMAND
iv. IS_LAYOUT
v. IT_FIELDCAT
vi. IT_EVENTS
vii. i_tabname_header : Name of the internal table in the program containing the
output data of the highest hierarchy level.
viii. i_tabname_item : Name of the internal table in the program containing the
output data of the lowest hierarchy level.
ix. is_keyinfo : This structure contains the header and item table field
names which link the two tables (shared key).
II. Tables
i. t_outtab_header : Header table with data to be output
ii. t_outtab_item : Name of the internal table in the program containing the
output data of the lowest hierarchy level.
slis_t_fieldcat_alv : This internal table contains the field attributes. This internal table can be populated automatically by using REUSE_ALV_FIELDCATALOG_MERGE.
Important Attributes :
A. col_pos : position of the column
B. fieldname : internal fieldname
C. tabname : internal table name
D. ref_fieldname : fieldname (dictionary)
E. ref_tabname : table (dictionary)
F. key(1) : column with key-color
G. icon(1) : icon
H. symbol(1) : symbol
I. checkbox(1) : checkbox
J. just(1) : (R)ight (L)eft (C)ent.
K. do_sum(1) : sum up
L. no_out(1) : (O)blig.(X)no out
M. outputlen : output length
N. seltext_l : long key word
O. seltext_m : middle key word
P. seltext_s : short key word
Q. reptext_ddic : heading (ddic)
R. ddictxt(1) : (S)hort (M)iddle (L)ong
S. datatype : datatype
T. hotspot(1) : hotspot
Regards
Anji -
Two report outputs in a single screen
Hi,
I am looking at giving outputs of two reports in a single screen.
I mean one below the other.
We are using web reports and I want to have two reporst made out of differect cubes appear one below the other.
Kindly let me know if this is possible.
Suggestions will definitely be rewarded by giving points.
Regards,
NaveenHi Naveen,
In WAD, you can use Generic Navigation Block web item for displaying the Characteristics/Free Characteristics available in the Query.
In the specific properties tab(Web Item Properties->Specific->List of Characteristics) of this web item, you can specify the Characteristics/Free Characteristics which you want to be displayed in the web report.
Since you want the table web item(which shows the report having the free characteristics) to be affected by the drill down in Navigational block, then specify the data provider of table web item in the <b>Affected Data Provider</b> of the Navigation Block web item.
Naveen, it's not mandatory to check the affected data providers if the data providers for both Navigational Block web item and the Table web item are same.
Hope this helps.
Regards
Hari
Message was edited by: Hari Krishnan K -
Displaying contents of two int. tables in same screen using grid display
Hello everyone,
Can anyone give me any idea how we can print contents of two internal tables of different structures in same screen while we are using GRID display fm. This is working fine in LIST display with fm's like REUSE_ALV_BLOCK_LIST_INIT , BLOCK_LIST_APPEND and BLOCK_LIST_DISPLAY. But what about the same in Grid display?Hi,
You have to define two containers in a single Screen.
Define two containers on a single screen
DATA: ok_code LIKE sy-ucomm,
g_container TYPE scrfname VALUE 'CUSTOM2',
grid1 TYPE REF TO cl_gui_alv_grid,
g_custom_container TYPE REF TO cl_gui_custom_container.
DATA: i_cat TYPE kkblo_t_fieldcat,
i_fieldcatalog TYPE lvc_t_fcat,
ws_fcat TYPE lvc_s_fcat,
wa_layout TYPE lvc_s_layo.
DATA:
g_container1 TYPE scrfname VALUE 'CUSTOM3',
grid2 TYPE REF TO cl_gui_alv_grid,
g_custom_container1 TYPE REF TO cl_gui_custom_container.
DATA: i_cat1 TYPE kkblo_t_fieldcat,
i_fieldcatalog1 TYPE lvc_t_fcat,
wa_layout1 TYPE lvc_s_layo.
Display firstALV
wa_layout-grid_title = text-029.
wa_layout-zebra = 'X'. "Output rows with alternating colors
wa_layout-no_author = 'X'. "Allow users to enter global layouts
wa_layout-sel_mode = 'A'.
wa_layout-cwidth_opt = 'X'.
ws_repid = sy-repid.
*Function module to get the field catalog in the kkblo_t_fieldcat format
CALL FUNCTION 'K_KKB_FIELDCAT_MERGE'
EXPORTING
i_callback_program = ws_repid
i_tabname = 'WS_OPEN_SUM'
i_inclname = ws_repid
CHANGING
ct_fieldcat = i_cat
EXCEPTIONS
inconsistent_interface = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE e000 WITH text-003.
ENDIF.
*Function module to get the field catalog in the lvc_t_fieldcat format
CALL FUNCTION 'LVC_TRANSFER_FROM_KKBLO'
EXPORTING
it_fieldcat_kkblo = i_cat
IMPORTING
et_fieldcat_lvc = i_fieldcatalog
EXCEPTIONS
it_data_missing = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE e000 WITH text-003.
ENDIF.
LOOP AT i_fieldcatalog INTO ws_fcat.
IF ws_fcat-fieldname = 'BALANCE'. "#CCE
#CCE - IF required
ws_fcat-do_sum = 'X'.
MODIFY i_fieldcatalog FROM ws_fcat.
ENDIF.
ENDLOOP.
IF g_custom_container IS INITIAL.
CREATE OBJECT g_custom_container
EXPORTING container_name = g_container.
CREATE OBJECT grid1
EXPORTING i_parent = g_custom_container.
CALL METHOD grid1->set_table_for_first_display
EXPORTING
is_layout = wa_layout
CHANGING
it_fieldcatalog = i_fieldcatalog
it_outtab = i_open_sum.
ENDIF.
Display second ALV
wa_layout1-grid_title = 'SAP R/3 (GLPCT) Totals'.
wa_layout1-zebra = 'X'. "Output rows with alternating colors
wa_layout1-no_author = 'X'. "Allow users to enter global layouts
wa_layout1-sel_mode = 'A'.
wa_layout1-cwidth_opt = 'X'.
ws_repid = sy-repid.
*Function module to get the field catalog in the kkblo_t_fieldcat format
CALL FUNCTION 'K_KKB_FIELDCAT_MERGE'
EXPORTING
i_callback_program = ws_repid
i_tabname = 'WS_GLPCT_CHK'
i_inclname = ws_repid
CHANGING
ct_fieldcat = i_cat1
EXCEPTIONS
inconsistent_interface = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE e000 WITH text-003.
ENDIF.
*Function module to get the field catalog in the lvc_t_fieldcat format
CALL FUNCTION 'LVC_TRANSFER_FROM_KKBLO'
EXPORTING
it_fieldcat_kkblo = i_cat1
IMPORTING
et_fieldcat_lvc = i_fieldcatalog1
EXCEPTIONS
it_data_missing = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE e000 WITH text-003.
ENDIF.
LOOP AT i_fieldcatalog1 INTO ws_fcat.
CASE ws_fcat-fieldname.
WHEN 'HSLVT'.
ws_fcat-do_sum = 'X'.
WHEN 'HSL01' OR 'HSL02' OR 'HSL03' OR 'HSL04' OR
'HSL05' OR 'HSL06' OR 'HSL07' OR 'HSL08' OR
'HSL09' OR 'HSL10' OR 'HSL11' OR 'HSL12' OR
'HSL13' OR 'HSL14' OR 'HSL15' OR 'HSL16' .
ws_fcat-no_out = 'X'.
WHEN 'RBUKRS' OR 'RACCT' OR 'RPRCTR' .
ws_fcat-key = 'X'.
ENDCASE.
MODIFY i_fieldcatalog1 FROM ws_fcat.
ENDLOOP.
IF g_custom_container1 IS INITIAL.
CREATE OBJECT g_custom_container1
EXPORTING container_name = g_container1.
CREATE OBJECT grid2
EXPORTING i_parent = g_custom_container1.
CALL METHOD grid2->set_table_for_first_display
EXPORTING
is_layout = wa_layout1
CHANGING
it_fieldcatalog = i_fieldcatalog1
it_outtab = i_glpct_chk.
ENDIF.
Then call the screen
Call Screen 9000.
Regards
Subramanian -
How to display two or more links in a single column
Hi,
Is there a way to display two links in a single column in a sql query report . I am able to specify one but I am not able to add links to the same column . I want to take the same column id and redirect the user to different pages based on the values selected .
ThanksThere is no way to this declaratively that I know of. Some alternatives...
1. Put the conditional branching logic in the report SQL itself. e.g. case when ... then '< a href=..' else '< a href=...' end and make sure the column display type is Standard Report column
2. Have the declarative column link go to a dummy/intermediate page and setup On Load: Before-Header branches on that page to redirect to the desired page based on the item value(s) passed in to the intermediate page. -
3 ALV on a single screen.
Hi,
I need to display 3 alv on a single screen.
There is a FM called 'REUSE_ALV_BLOCK_LIST_APPEND' which can do it but in the documentation its advised not to use it,since it has still not been released.
Is there some other way to display 3 alvs on a screenhai chitrantan,
check out whether this satisfies your condition.
EXAMPLE:
DEFINE m_fieldcat.
ls_fieldcat-fieldname = &1.
ls_fieldcat-ref_tabname = &2.
append ls_fieldcat to lt_fieldcat.
END-OF-DEFINITION.
DEFINE m_sort.
ls_sort-fieldname = &1.
ls_sort-up = 'X'.
append ls_sort to lt_sort.
END-OF-DEFINITION.
TYPE-POOLS: slis. " ALV Global types
SELECTION-SCREEN :
SKIP, BEGIN OF LINE,COMMENT 5(27) v_1 FOR FIELD p_max. "#EC NEEDED
PARAMETERS p_max(2) TYPE n DEFAULT '02' OBLIGATORY.
SELECTION-SCREEN END OF LINE.
DATA:
gs_layout TYPE slis_layout_alv,
1st Table
BEGIN OF gt_kna1 OCCURS 0, " Data displayed
kunnr LIKE kna1-kunnr, " Customer number
ernam LIKE kna1-ernam, " Name of Person who Created
erdat LIKE kna1-erdat, " Creation date
name1 LIKE kna1-name1, " Name 1
END OF gt_kna1,
2nd Table
BEGIN OF gt_mara OCCURS 0,
ernam LIKE mara-ernam, " Name of Person who Created
matnr LIKE mara-matnr, " Material number
ersda LIKE mara-ersda, " Creation date
brgew LIKE mara-brgew, " Gross weight
END OF gt_mara,
3rd Table
BEGIN OF gt_vbak OCCURS 0,
vkorg LIKE vbak-vkorg, " Sales organization
kunnr LIKE vbak-kunnr, " Sold-to party
vbeln LIKE vbak-vbeln, " Sales document
netwr LIKE vbak-netwr, " Net Value of the Sales Order
waerk LIKE vbak-waerk, " SD document currency
END OF gt_vbak.
INITIALIZATION.
v_1 = 'Maximum of records to read'.
START-OF-SELECTION.
Read data
SELECT * FROM kna1
UP TO p_max ROWS
INTO CORRESPONDING FIELDS OF TABLE gt_kna1.
SELECT * FROM mara
UP TO p_max ROWS
INTO CORRESPONDING FIELDS OF TABLE gt_mara.
SELECT * FROM vbak
UP TO p_max ROWS
INTO CORRESPONDING FIELDS OF TABLE gt_vbak.
PERFORM f_display_data.
FORM USER_COMMAND *
FORM user_command USING i_ucomm LIKE sy-ucomm
is_selfield TYPE slis_selfield. "#EC CALLED
CASE i_ucomm.
WHEN '&IC1'. " Pick
CASE is_selfield-sel_tab_field(7).
WHEN 'GT_MARA'.
WHEN 'GT_KNA1'.
WHEN 'GT_VBAK'.
READ TABLE gt_vbak INDEX is_selfield-tabindex.
IF sy-subrc EQ 0.
SET PARAMETER ID 'AUN' FIELD gt_vbak-vbeln.
CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
ENDCASE.
ENDFORM. " USER_COMMAND
Form f_display_data
FORM f_display_data.
DATA :
ls_fieldcat TYPE slis_fieldcat_alv,
lt_fieldcat TYPE slis_t_fieldcat_alv, " Field catalog
ls_sort TYPE slis_sortinfo_alv,
lt_sort TYPE slis_t_sortinfo_alv, " Sort table
lt_events TYPE slis_t_event,
ls_event TYPE slis_alv_event.
gs_layout-group_change_edit = 'X'.
gs_layout-colwidth_optimize = 'X'.
gs_layout-zebra = 'X'.
gs_layout-detail_popup = 'X'.
gs_layout-get_selinfos = 'X'.
Build field catalog and sort table
m_fieldcat 'KUNNR' 'KNA1'.
m_fieldcat 'ERNAM' 'KNA1'.
m_fieldcat 'ERDAT' 'KNA1'.
m_fieldcat 'NAME1' 'KNA1'.
m_sort 'KUNNR'.
Build Event Table
MOVE 'TOP_OF_PAGE' TO ls_event-name.
MOVE 'TOP_OF_PAGE' TO ls_event-form.
APPEND ls_event TO lt_events.
MOVE 'END_OF_LIST' TO ls_event-name.
MOVE 'END_OF_LIST' TO ls_event-form.
APPEND ls_event TO lt_events.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
i_callback_user_command = 'USER_COMMAND'
it_fieldcat = lt_fieldcat
is_layout = gs_layout
it_events = lt_events
it_sort = lt_sort
TABLES
t_outtab = gt_kna1.
ENDFORM. " F_DISPLAY_DATA
FORM top_of_page *
FORM top_of_page. "#EC CALLED
ULINE.
WRITE : sy-uname, sy-title(56) CENTERED, sy-datum.
ULINE.
ENDFORM. " TOP_OF_PAGE
FORM End_of_list *
FORM end_of_list. "#EC CALLED
DATA :
ls_fieldcat TYPE slis_fieldcat_alv,
lt_fieldcat TYPE slis_t_fieldcat_alv, " Field catalog
ls_sort TYPE slis_sortinfo_alv,
lt_sort TYPE slis_t_sortinfo_alv, " Sort table
lt_events TYPE slis_t_event,
ls_event TYPE slis_alv_event.
Build field catalog and sort table
m_fieldcat 'MATNR' 'MARA'.
m_fieldcat 'ERNAM' 'MARA'.
m_fieldcat 'ERSDA' 'MARA'.
m_fieldcat 'BRGEW' 'MARA'.
m_sort 'MATNR'.
Build Event Table
MOVE 'END_OF_LIST' TO ls_event-name.
MOVE 'END_OF_LIST_2' TO ls_event-form.
APPEND ls_event TO lt_events.
gs_layout-list_append = 'X'.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
it_fieldcat = lt_fieldcat
is_layout = gs_layout
it_sort = lt_sort
it_events = lt_events
TABLES
t_outtab = gt_mara.
ENDFORM. " END_OF_LIST
FORM End_of_list_2 *
FORM end_of_list_2. "#EC CALLED
DATA :
ls_fieldcat TYPE slis_fieldcat_alv,
lt_fieldcat TYPE slis_t_fieldcat_alv, " Field catalog
ls_sort TYPE slis_sortinfo_alv,
lt_sort TYPE slis_t_sortinfo_alv, " Sort table
lt_events TYPE slis_t_event,
ls_event TYPE slis_alv_event.
Build field catalog and sort table
m_fieldcat 'VBELN' 'VBAK'.
m_fieldcat 'VKORG' 'VBAK'.
m_fieldcat 'KUNNR' 'VBAK'.
m_fieldcat 'NETWR' 'VBAK'.
m_fieldcat 'WAERK' 'VBAK'.
m_sort 'VBELN'.
Build Event Table
MOVE 'TOP_OF_PAGE' TO ls_event-name.
MOVE 'TOP_OF_PAGE' TO ls_event-form.
APPEND ls_event TO lt_events.
gs_layout-list_append = 'X'.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
it_fieldcat = lt_fieldcat
is_layout = gs_layout
it_sort = lt_sort
it_events = lt_events
TABLES
t_outtab = gt_vbak.
ENDFORM.
HOPE THIS IS HELPFUL.
regards,
praba. -
Display 2 different structured internal tables in single screen using ALV
Hi,
I have two internal tables. Both has different structures. My requirement is to display both the internal tables in single screen using ALV Grid but NOT using OO ALV Grid display.
Is there any way of spliting the Final ALV display screen into two with two different headers and details as shown below.
Header1 for internal table 1
Data of internal table 1
Header1 for internal table 2
Data of internal table 2
Can anyone suggest a better way to display this.
Regards,
Senthilhi
first think i can say ALV GRID means only for OO ALV it is not possible to display two I.T. data in singr report screen.
better to use of the fm: REUSE_ALV_BLOCK_LIST_DISPLAY
so that u can display both I.T. data in separate report list under single screen
Check the example programs:
BALVBT01 Testprogram ALV: Block list
BCALV_TEST_BLOCK_LIST Program BCALV_TEST_BLOCK_LIST
Regards,
deepak
Maybe you are looking for
-
My old PC broke, it was the only pc my classic was sync with. New PC only shows 1 song (recent purchase) so am worried about syncing to new PC in case I lose the list on my iPod, which is still intacted. How can I transfer my list to new PC?
-
I'm running WL Express 5.1SP9 on a NT 4 server, Oracle 8.1.7 and an j2EE application from an editor. With the previous version of the application i wasn't having any problem, since I installed the new version in the same environnement, I'm getting th
-
Monitoring sessions invoked by a user SQL Developer
Hello Everyone , I am a DBA and lot of developers use SQL Developer for their tasks. Off late we have been facing few issues with SQL Developer. Developers close the working session by "alt+f4" and strangely their sessions are active in the DB's. Wha
-
Buisness scenario for Predictive Analysis
Hi All, I am new to SAP Predictive Analysis. I have gone through all the algorithms present in predictive analysis client tool about when should they be used. Now I planned to try implementing it on some business scenario. But the problem I am facing
-
If i play back ANY audio file, be it MP3, CD, something I've purchased from the iTunes store, it doesn't matter, I get a static hiss on the left chanels. Right ones are clear. Everything was fine under iTunes 6x but as soon as they went to the 7x ver