Dynamic multiple alv
hi all,
I am able to display dynamic alv, but i have 2 lists to display.
Since both lists are field symbols rather than internal tables, am unable to use reuse_block_list_append.
Thanks,
Srikar
Hi Srikar,
You can use dockingcontainer and split into ToP and Bottom and display the two lists.
Refer sample code:
*-- ALV Grid data declaration
DATA : o_splitter TYPE REF TO cl_gui_splitter_container,
<b>o_alvgrid1</b> TYPE REF TO cl_gui_alv_grid,
<b>o_alvgrid2</b> TYPE REF TO cl_gui_alv_grid,
o_dockingcontainer TYPE REF TO cl_gui_docking_container,
o_container TYPE REF TO cl_gui_custom_container,
cont_on_100 TYPE scrfname VALUE 'SCREEN', " SCREEN
o_container1 TYPE REF TO cl_gui_container,
o_container2 TYPE REF TO cl_gui_container,
i_fieldcat TYPE slis_t_fieldcat_alv,
<b>i_fldcatalog1</b> TYPE lvc_t_fcat,
<b>i_fldcatalog2</b> TYPE lvc_t_fcat,
v_ratio TYPE i,
w_layout1 TYPE lvc_s_layo,
w_layout2 TYPE lvc_s_layo,
w_fldcatalog TYPE lvc_s_fcat,
ok_code LIKE sy-ucomm.
*& Form f0420_create_objects
Create ALV Objects
FORM f0420_create_objects.
v_ratio = 95.
PERFORM objects_create USING:
'o_dockingcontainer' '' v_ratio '' '',
'o_splitter' o_dockingcontainer '' '2' '1'.
IF cl_gui_alv_grid=>offline( ) IS INITIAL.
CALL METHOD o_splitter->get_container EXPORTING row = 1
column = 1
RECEIVING container = o_container1.
CALL METHOD o_splitter->get_container EXPORTING row = 2
column = 1
RECEIVING container = o_container2.
Set where the splits on the screen comes
CALL METHOD o_splitter->set_row_height
EXPORTING
id = 1
height = 65
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
IF NOT sy-subrc IS INITIAL.
PERFORM error_handle USING text-024.
ENDIF.
ENDIF.
Create the alv grids
PERFORM objects_create
USING: <b>'o_alvgrid1' o_container1</b> '' '' '',
<b>'o_alvgrid2' o_container2</b> '' '' ''.
ENDFORM. " f0420_create_objects
*& Form objects_create
Create Objects
FORM objects_create USING value(pobject)
pparent
value(pratio)
value(prows)
value(pcolumns).
CASE pobject.
WHEN 'o_dockingcontainer'.
IF cl_gui_alv_grid=>offline( ) IS INITIAL.
IF o_dockingcontainer IS INITIAL.
CREATE OBJECT o_dockingcontainer
EXPORTING
ratio = pratio "amount of screen
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
others = 6.
CHECK NOT sy-subrc EQ 0.
PERFORM error_handle USING text-022.
ENDIF.
ENDIF.
WHEN 'o_splitter'.
IF cl_gui_alv_grid=>offline( ) IS INITIAL.
IF o_splitter IS INITIAL.
CREATE OBJECT o_splitter
EXPORTING
parent = pparent
rows = prows
columns = pcolumns
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
others = 3.
CHECK NOT sy-subrc EQ 0.
PERFORM error_handle USING text-023.
ENDIF.
ENDIF.
WHEN 'o_alvgrid1'.
IF <b>o_alvgrid1</b> IS INITIAL.
CREATE OBJECT o_alvgrid1
EXPORTING
i_parent = pparent.
CHECK NOT sy-subrc EQ 0.
PERFORM error_handle USING text-024.
ENDIF.
WHEN <b>'o_alvgrid2'.</b>
IF o_alvgrid2 IS INITIAL.
CREATE OBJECT o_alvgrid2
EXPORTING
i_parent = pparent.
CHECK NOT sy-subrc EQ 0.
PERFORM error_handle USING text-024.
ENDIF.
WHEN OTHERS.
do nothing
ENDCASE.
ENDFORM. " objects_create
*& Form f0430_set_layout
Set Grid Layout
FORM f0430_set_layout.
w_layout1-grid_title = sy-title.
w_layout1-zebra = c_x.
w_layout1-sel_mode = 'A'.
w_layout1-cwidth_opt = c_x.
w_layout2-grid_title = 'Error Records'.
w_layout2-zebra = c_x.
w_layout2-sel_mode = 'A'.
w_layout2-cwidth_opt = c_x.
w_layout2-no_toolbar = c_x.
w_variant-report = sy-repid.
ENDFORM. " f0430_set_layout
*& Form f0440_alv_output
Display output in ALV Grid
FORM f0440_alv_output.
PERFORM <b>display_data_grid1</b> TABLES <i_table>
i_fldcatalog1
USING w_layout1.
DELETE ADJACENT DUPLICATES FROM i_error COMPARING ALL FIELDS.
PERFORM <b>display_data_grid2</b> TABLES i_error
i_fldcatalog2
USING w_layout2.
ENDFORM. " f0440_alv_output
*& Form display_data
ALV Grid Display
FORM display_data_grid1 TABLES p_output
p_fieldcat
USING value(p_layout).
CALL METHOD o_alvgrid1->set_table_for_first_display
EXPORTING
is_variant = w_variant
i_save = c_a
is_layout = p_layout
CHANGING
it_outtab = p_output[]
it_fieldcatalog = p_fieldcat[]
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE i004 WITH text-026.
LEAVE LIST-PROCESSING.
ENDIF.
ENDFORM. " display_data_grid1
*& Form display_data
ALV Grid Display
FORM display_data_grid2 TABLES p_output
p_fieldcat
USING value(p_layout).
CALL METHOD o_alvgrid2->set_table_for_first_display
EXPORTING
i_save = c_a
is_layout = p_layout
CHANGING
it_outtab = p_output[]
it_fieldcatalog = p_fieldcat[]
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE i004 WITH text-026.
LEAVE LIST-PROCESSING.
ENDIF.
ENDFORM. " display_data_grid1
*& Module USER_COMMAND_9000 INPUT
PAI
MODULE user_command_9000 INPUT.
CASE ok_code.
WHEN 'EXIT' OR 'CANC'.
PERFORM free_objects:
USING o_alvgrid1 'ALV' text-027,
USING o_alvgrid2 'ALV' text-027,
USING o_dockingcontainer 'DOCKING' text-028.
LEAVE.
WHEN 'BACK'.
PERFORM free_objects:
USING o_alvgrid1 'ALV' text-027,
USING o_alvgrid2 'ALV' text-027,
USING o_dockingcontainer 'DOCKING' text-028.
SET SCREEN '0'.
LEAVE SCREEN.
WHEN OTHERS.
ENDCASE.
ENDMODULE. " USER_COMMAND_9000 INPUT
*& Form free_objects
Free Objects
FORM free_objects USING pobject
value(ptype)
value(ptext).
DATA: l_objectalv TYPE REF TO cl_gui_alv_grid.
CASE ptype.
WHEN 'ALV'.
l_objectalv = pobject.
IF NOT ( l_objectalv IS INITIAL ).
CALL METHOD l_objectalv->free
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
CALL METHOD cl_gui_cfw=>flush.
CLEAR: pobject, l_objectalv.
CHECK NOT sy-subrc EQ 0.
PERFORM error_handle USING ptext.
ENDIF.
WHEN 'DOCKING'.
DATA: lobjectdock TYPE REF TO cl_gui_docking_container.
lobjectdock = pobject.
IF NOT ( lobjectdock IS INITIAL ).
CALL METHOD lobjectdock->free
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
CLEAR: pobject, lobjectdock.
CHECK NOT sy-subrc EQ 0.
PERFORM error_handle USING ptext.
ENDIF.
WHEN OTHERS.
sy-subrc = 1.
PERFORM error_handle
USING text-025.
ENDCASE.
ENDFORM. " free_objects
*& Form error_handle
Error Message
FORM error_handle USING value(ptext).
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = text-021
txt2 = sy-subrc
txt1 = ptext.
ENDFORM. " error_handle
Reward points if this Helps.
Manish
Message was edited by:
Manish Kumar
Similar Messages
-
Hi All,
How can i display Multiple ALV Grids at a time in the output screen ?
I have to create dynamic table structures for each ALV, but all this ALV's has to be displayed at 1 time in the first output screen!
Regards
Rakesh.Have a custom control on the screen.
Create a custom conatiner.
Use EASY splitter container.
Now you have two containers, in which each of the ALV grids can be displayed with the two dynamic tables you have.
Look at the BCALV examples in your system.
Regards,
Ravi
Note - Please mark all the helpful answers -
Multiple ALV Grids on the same window.
Hi,
Can someone tell me if it's possible to display multiple ALV grids on the same window.If so how is it done.Please note that I am talking about Grid Display and not List Display.
Regards,
Swathi BalakrishnanHi,
This can be done even i have done a report.
Its very simple create three containers as below.
Just repeat three times if u need to create three containers.
See this sample code using custom container.
START-OF-SELECTION.
Begin of process logic
CALL SCREEN '0100'.
END-OF-SELECTION.
*& Module STATUS_0100 OUTPUT
text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS01'.
SET TITLEBAR 'SALESTTL'.
A L V G R I D
IF o_grid_container IS INITIAL.
CREATE OBJECT o_grid_container
EXPORTING
container_name = '<b>CCONTAINER1</b>'.
CREATE OBJECT o_grid
EXPORTING
i_appl_events = 'X'
i_parent = o_grid_container.
<b>FOR first A L V G R I D</b>
PERFORM set_grid_field_catalog
CHANGING i_grid_fcat.
PERFORM modify_grid_fcat_predisplay
CHANGING i_grid_fcat.
PERFORM set_grid_layout_set
CHANGING struct_grid_lset.
PERFORM sort_outtable CHANGING i_sort_fcat.
PERFORM populate_grid_data TABLES i_grid_outs i_grid_outs_pro.
SORT i_grid_outs BY year month.
CALL METHOD o_grid->set_table_for_first_display
EXPORTING
i_bypassing_buffer = space
is_variant = ws_f_grid_disvar
i_save = ws_c_grid_save
is_layout = struct_grid_lset
CHANGING
it_outtab = i_grid_outs[]
it_fieldcatalog = i_grid_fcat[]
it_sort = i_sort_fcat. " Period
ENDIF.
IF o_grid1_container IS INITIAL.
CREATE OBJECT o_grid1_container
EXPORTING
container_name = '<b>CCONTAINER2</b>'.
CREATE OBJECT o_grid1
EXPORTING
i_appl_events = 'X'
i_parent = o_grid1_container.
*<b> FOR SECOND ALV GRID</b>
PERFORM set_grid1_field_catalog
CHANGING i_grid1_fcat.
PERFORM modify_grid1_fcat_predisplay
CHANGING i_grid1_fcat.
PERFORM set_grid1_layout_set
CHANGING struct_grid1_lset.
PERFORM sort_outtable1 CHANGING i_sort_fcat1.
PERFORM populate_grid1_data TABLES i_grid1_outs i_grid1_outs_pro.
SORT i_grid1_outs BY year month.
CALL METHOD o_grid1->set_table_for_first_display
EXPORTING
i_bypassing_buffer = space
is_variant = ws_f_grid_disvar
i_save = ws_c_grid_save
is_layout = struct_grid1_lset
CHANGING
it_outtab = i_grid1_outs[]
it_fieldcatalog = i_grid1_fcat[]
it_sort = i_sort_fcat1. " Period
ENDIF.
IF o_grid2_container IS INITIAL.
CREATE OBJECT o_grid2_container
EXPORTING
container_name = '<b>CCONTAINER3</b>'.
CREATE OBJECT o_grid2
EXPORTING
i_appl_events = 'X'
i_parent = o_grid2_container.
<b>FOR THIRD ALV GRID</b>
PERFORM set_grid2_field_catalog
CHANGING i_grid2_fcat.
PERFORM modify_grid2_fcat_predisplay
CHANGING i_grid2_fcat.
PERFORM set_grid2_layout_set
CHANGING struct_grid2_lset.
PERFORM populate_grid2_data TABLES i_grid2_outs i_grid2_outs_pro.
SORT i_grid2_outs BY year month.
PERFORM sort_outtable2 CHANGING i_sort_fcat2.
CALL METHOD o_grid2->set_table_for_first_display
EXPORTING
i_bypassing_buffer = space
is_variant = ws_f_grid_disvar
i_save = ws_c_grid_save
is_layout = struct_grid2_lset
CHANGING
it_outtab = i_grid2_outs[]
it_fieldcatalog = i_grid2_fcat[]
it_sort = i_sort_fcat2. " Period
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
MODULE user_command_0100 INPUT.
As the events are registered as application events, control is first
passed to the program's PAI. The call 'cl_gui_cfw=>dispatch' will
forward control to ABAP object event handling and the appropriate
event handler will be called (if present). This allows the user to
selectively process events.
DATA: i_return_code TYPE i .
CALL METHOD cl_gui_cfw=>dispatch
IMPORTING return_code = i_return_code.
save_ok = ok_code.
CASE save_ok.
WHEN 'BACK' OR 'END' OR 'CANC'.
PERFORM exit_program.
ENDCASE.
CLEAR save_ok.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form EXIT_PROGRAM
text
FORM exit_program.
CALL METHOD o_grid_container->free.
CALL METHOD o_grid1_container->free.
CALL METHOD o_grid2_container->free.
CALL METHOD cl_gui_cfw=>flush.
IF sy-subrc NE 0.
Error in FLush
ENDIF.
LEAVE TO SCREEN 0.
ENDFORM. " EXIT_PROGRAM
If u want get more idea revert back to me.
Thanks & Regards,
Judith. -
Single Printing for Multiple ALVs in Splitter Containers
Hi,
I am creating multiple ALVs (3 to 4) of CL_GUI_ALV_GRID class in my report. The ALVs are being displayed inside the splitter containers of class CL_GUI_SPLITTER_CONTAINER. My question is how to print all the ALVs inside these multiple containers with a single execution? I've found a close answer to this at this thread but it is using the REUSE_ALV... function.
How to print multiple ALV Grids with only one print dialog?
Is there a way to do this by making use of the CL_GUI_ALV_GRID printing functionality, if there is?
Thanks for your kind attention,
Kamal.-found alternative.
-
What's the coolest, slickest way to present multiple ALV reports?
Greetings and good day, everyone.
Okay, I'm working on an update program, and the users have identified at least three different reports they would like coming out of this thing. One report is a list of transactions that fail internal logic checking, the second report is a list of transactions that pass internal logic checking but fail to update via a BAPI, and a third report is a list of transactions that pass checks and process correctly (i.e. update the database) via the BAPI.
At first, still being a newbie, I was wondering how I was going to create multiple ALV reports. I know I could do this using the WRITE statement, writing each report one after the other, but they have asked for the ALV report so they can do all the ad-hoc manipulating, sorting, etc. that ALV provides.
I came up with these options:
1. Instead of filling my single screen with the container control for an ALV report, as I usually do, this time I could put three containers on the screen. However, I know that cramps space, and I don't know if they'll be able to adjust or move things around other than scrolling.
2. Display a single ALV report on the screen, but have buttons somehow on the top that somehow take the user to other screens for the other reports.
3. First give the user a screen with all the buttons for the reports. They choose one, and the ALV report displays. They can click back to return to this screen, then choose a different report.
Nobody else in the office has done anything like this yet using the ALV, so I've got a chance to break some new ground internally and do something slick. Which option is best, and if so, do you have examples or general guidelines of how I do it? I've not had dialog programming, although I do understand the concepts from VB/Delphi experience over 10 years ago. I think I lean toward option 2, but I figured this couldn't be new ground in the SAP world and surely someone's done exactly this sort of thing.
Please help! ALL helpful responses, as always, are awarded points! Thanks so much!
DaveDave,
These are all good suggestions. I would just remember to keep in mind when designing your report two different things.
1. Can your program be run in foreground or background? If it has to be run in background due to data volumes you will lose all interactive capabilities of ALV. You might also not be able to do three different ALVs on the screen in background.
2. I am not sure if I understand your option 3 but if you are talking about the user selecting the options before the load the data, they might have to attempt to load the data multiple times to get all of the report.
My recommendation ( I think somebody already mentioned this) is to have a single ALV with a column on your report that the user can then sort or filter by. This way you are not limited to a program that has to be run in foreground.
Chris -
How can I add a custom title to multiple ALV reports selected by layout?
Greetings and good day, everyone!
Within the past week or so, I posted a question asking the best way to create a program that would generate multiple ALV reports. I got some great ideas, and I've actually coded up a few simple demos based on your feedback -- thank you!
Here's the issue I'm running into: Many of you suggested that I put all report records into one table, and create a field that I could use to filter on later to determine which fields I want to display for the report. For example, if I have 3 different reports, I put all the fields for all 3 reports into a table. I then add a "report key" field. As I put records into the report table for report 1, I code "01" into the "report key" field. I do the same for reports 2 and 3, assigning each a "report key" of "02" and "03", respectively.
I then set up layouts in the ALV for each of the three reports, using the filter option to only pull records with the "report key" value for that particular report. This all works wonderfully! However, I seem to have lost the ability to show a custom title for each layout. I can create a generic TITLEBAR (like "Reporting Center") but I don't know how to reset the grid's title when a layout is selected. I was hoping that SAP might use the layout description as the title on each page, but it doesn't -- it uses the TITLEBAR text.
Any ideas? I think this might be the best way to program multiple ALV reports, but if I can't display the right report title for a particular layout, I'll probably have to go back to my other alternative of putting each report in its own container/screen, and having a button to access each report from the application toolbar.
Thanks,Srikanth,
I don't have any Selection Screen radio buttons for the user to select a particular report; in my case, they specify some needed criteria by the program in the Selection Screen, the program goes off and does a fair bit of processing/updating, and then displays the ALV reports when finished. They don't want to choose one particular report to view ahead of time; they want to have all 3 (in my case) there to see what processed correctly, what was eligible to process but kicked out with errors, and what failed some matching checks done up front (this layout includes additional fields from the input file so they can see what didn't match up against R/3).
So, while I do like the code example you presented, I don't think it's going to help me in my case. -
Multiple ALV GRID reports on a single page
hi all
I have an urgent requirement where I need to show 2-3 alv grids on a single page. Please let me know if it is possible to do so. If yes how. Sample code would be very helpful.
thanks in advance.
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Apr 16, 2008 1:45 PMHI,
Create multiple custom containers and call the method CALL METHOD sap_grid->set_table_for_first_display multiple times.
This will display multiple ALV grids on a single page.
Code Below:
MODULE create_objects OUTPUT.
CREATE OBJECT g_custom_container
EXPORTING
PARENT =
container_name = 'CUST_CRTL'
STYLE =
LIFETIME = lifetime_default
REPID =
DYNNR =
NO_AUTODEF_PROGID_DYNNR =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
OTHERS = 6
IF sy-subrc <> 0.
MESSAGE e143(z1).
ENDIF.
*Create object for sap grid
CREATE OBJECT sap_grid
EXPORTING
I_SHELLSTYLE = 0
I_LIFETIME =
i_parent = g_custom_container
I_APPL_EVENTS = space
I_PARENTDBG =
I_APPLOGPARENT =
I_GRAPHICSPARENT =
I_NAME =
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE e144(z1).
ENDIF.
CREATE OBJECT g_custom_container1
EXPORTING
PARENT =
container_name = 'CUST_CRTL1'
STYLE =
LIFETIME = lifetime_default
REPID =
DYNNR =
NO_AUTODEF_PROGID_DYNNR =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
OTHERS = 6
IF sy-subrc <> 0.
MESSAGE e143(z1).
ENDIF.
*Create object for sap grid
CREATE OBJECT sap_grid1
EXPORTING
I_SHELLSTYLE = 0
I_LIFETIME =
i_parent = g_custom_container1
I_APPL_EVENTS = space
I_PARENTDBG =
I_APPLOGPARENT =
I_GRAPHICSPARENT =
I_NAME =
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE e144(z1).
ENDIF.
CREATE OBJECT g_custom_container2
EXPORTING
PARENT =
container_name = 'CUST_CRTL2'
STYLE =
LIFETIME = lifetime_default
REPID =
DYNNR =
NO_AUTODEF_PROGID_DYNNR =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
OTHERS = 6
IF sy-subrc <> 0.
MESSAGE e143(z1).
ENDIF.
*Create object for sap grid
CREATE OBJECT sap_grid2
EXPORTING
I_SHELLSTYLE = 0
I_LIFETIME =
i_parent = g_custom_container2
I_APPL_EVENTS = space
I_PARENTDBG =
I_APPLOGPARENT =
I_GRAPHICSPARENT =
I_NAME =
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE e144(z1).
ENDIF.
ENDMODULE. " create_objects OUTPUT
*& Module fill_fcat OUTPUT
text
MODULE fill_fcat OUTPUT.
CONSTANTS : lc_x TYPE c VALUE 'X',
lc_a TYPE c VALUE 'D'.
*Prepare field catalog for all Summary Report
wa_field-fieldname = 'BUKRS'.
wa_field-tabname = 'T_BSID_BSAD'.
wa_field-outputlen = '12'.
wa_field-col_pos = '1'.
wa_field-coltext = text-002. "'Company Code'.
APPEND wa_field TO fcat.
CLEAR wa_field.
wa_field-fieldname = 'CURR'.
wa_field-tabname = 'T_BSID_BSAD'.
wa_field-outputlen = '10'.
wa_field-col_pos = '2'.
wa_field-coltext = text-022."'Currency'.
APPEND wa_field TO fcat.
CLEAR wa_field.
wa_field-fieldname = 'KUNNR'.
wa_field-tabname = 'T_BSID_BSAD'.
wa_field-outputlen = '10'.
wa_field-col_pos = '3'.
wa_field-coltext = text-005."'Customer Number'.
APPEND wa_field TO fcat.
CLEAR wa_field.
wa_field-fieldname = 'NAME1'.
wa_field-tabname = 'T_BSID_BSAD'.
wa_field-outputlen = '13'.
wa_field-col_pos = '4'.
wa_field-coltext = text-007."'Customer Name'.
APPEND wa_field TO fcat.
CLEAR wa_field.
wa_field-fieldname = 'KLIMK'.
wa_field-tabname = 'T_BSID_BSAD'.
wa_field-outputlen = '12'.
wa_field-col_pos = '5'.
wa_field-coltext = text-008. " 'Credit Limit'.
APPEND wa_field TO fcat.
CLEAR wa_field.
wa_field-fieldname = 'DMBTR'.
wa_field-tabname = 'T_BSID_BSAD'.
wa_field-outputlen = '16'.
wa_field-col_pos = '6'.
wa_field-coltext = text-009. "'Current Balance Calculated'.
APPEND wa_field TO fcat.
CLEAR wa_field.
CLEAR wa_field.
wa_field-fieldname = 'BLNC'.
wa_field-tabname = 'T_BSID_BSAD'.
wa_field-outputlen = '23'.
wa_field-col_pos = '7'.
wa_field-coltext = g_bal_date. "'Balance b/f @ (Date taken from Z table) '.
wa_field-fix_column = 'X'.
APPEND wa_field TO fcat.
CLEAR wa_field.
CLEAR wa_field.
wa_field-fieldname = 'DATE'.
wa_field-tabname = 'T_BSID_BSAD'.
wa_field-outputlen = '8'.
wa_field-col_pos = '7'.
wa_field-coltext = text-021. "'Balance b/f Date @ Z Table balance'.
APPEND wa_field TO fcat.
CLEAR wa_field.
CLEAR wa_field.
wa_field-fieldname = 'INVOICES'.
wa_field-tabname = 'T_BSID_BSAD'.
wa_field-outputlen = '13'.
wa_field-col_pos = '8'.
wa_field-coltext = text-012. "'Invoices'.
APPEND wa_field TO fcat.
CLEAR wa_field.
CLEAR wa_field.
wa_field-fieldname = 'PAYMENTS'.
wa_field-tabname = 'T_BSID_BSAD'.
wa_field-outputlen = '13'.
wa_field-col_pos = '9'.
wa_field-coltext = text-013. "'Payments'.
APPEND wa_field TO fcat.
CLEAR wa_field.
CLEAR wa_field.
wa_field-fieldname = 'DMBTR'.
wa_field-tabname = 'T_BSID_BSAD'.
wa_field-outputlen = '23'.
wa_field-col_pos = '10'.
wa_field-coltext = g_bal_date1. "'Balance c/f @ (Date of Lodgement from selection screen)'.
APPEND wa_field TO fcat.
CLEAR wa_field.
CLEAR wa_field.
wa_field-fieldname = 'CHECK'.
wa_field-tabname = 'T_BSID_BSAD'.
wa_field-outputlen = '13'.
wa_field-col_pos = '11'.
wa_field-coltext = text-020. "'CHECK'.
APPEND wa_field TO fcat.
CLEAR wa_field.
CLEAR g_layout.
g_layout-zebra = lc_x.
g_layout-sel_mode = lc_a.
*Prepare field catalog for all Invoice Extract
wa_field1-fieldname = 'BUKRS'.
wa_field1-tabname = 'T_INVOICE'.
wa_field1-outputlen = '12'.
wa_field1-col_pos = '1'.
wa_field1-coltext = text-002. "'Company Code'.
APPEND wa_field1 TO fcat1.
CLEAR wa_field1.
wa_field1-fieldname = 'KUNNR'.
wa_field1-tabname = 'T_INVOICE'.
wa_field1-outputlen = '13'.
wa_field1-col_pos = '2'.
wa_field1-coltext = text-005."'Customer Number'.
APPEND wa_field1 TO fcat1.
CLEAR wa_field1.
wa_field1-fieldname = 'NAME1'.
wa_field1-tabname = 'T_INVOICE'.
wa_field1-outputlen = '13'.
wa_field1-col_pos = '3'.
wa_field1-coltext = text-007."'Customer Name'.
APPEND wa_field1 TO fcat1.
CLEAR wa_field1.
wa_field1-fieldname = 'GJAHR'.
wa_field1-tabname = 'T_INVOICE'.
wa_field1-outputlen = '7'.
wa_field1-col_pos = '4'.
wa_field1-coltext = text-015. " 'Fiscal Year'.
APPEND wa_field1 TO fcat1.
CLEAR wa_field1.
wa_field1-fieldname = 'BELNR'.
wa_field1-tabname = 'T_INVOICE'.
wa_field1-outputlen = '10'.
wa_field1-col_pos = '5'.
wa_field1-coltext = text-016. "'Invoice Number'.
APPEND wa_field1 TO fcat1.
CLEAR wa_field1.
CLEAR wa_field1.
wa_field1-fieldname = 'CURR'.
wa_field1-tabname = 'T_INVOICE'.
wa_field1-outputlen = '8'.
wa_field1-col_pos = '6'.
wa_field1-coltext = text-022."'Currency'.
APPEND wa_field1 TO fcat1.
CLEAR wa_field1.
wa_field1-fieldname = 'DMBTR'.
wa_field1-tabname = 'T_INVOICE'.
wa_field1-outputlen = '13'.
wa_field1-col_pos = '7'.
wa_field1-coltext = text-017. "'Invoice Amount '.
APPEND wa_field1 TO fcat1.
CLEAR wa_field1.
CLEAR wa_field1.
wa_field1-fieldname = 'BLDAT'.
wa_field1-tabname = 'T_INVOICE'.
wa_field1-outputlen = '12'.
wa_field1-col_pos = '8'.
wa_field1-coltext = text-018. "'Date of Shipment'.
APPEND wa_field1 TO fcat1.
CLEAR wa_field1.
CLEAR wa_field1.
wa_field1-fieldname = 'DUEDT'.
wa_field1-tabname = 'T_INVOICE'.
wa_field1-outputlen = '13'.
wa_field1-col_pos = '9'.
wa_field1-coltext = text-019. "'Due Date Calculated'.
APPEND wa_field1 TO fcat1.
CLEAR wa_field1.
CLEAR g_layout1.
g_layout1-zebra = lc_x.
g_layout-sel_mode = lc_a.
*Prepare field catalog for all Payment Extract
CLEAR wa_field2.
wa_field2-fieldname = 'BUKRS'.
wa_field2-tabname = 'T_PAYMENT'.
wa_field2-outputlen = '12'.
wa_field2-col_pos = '1'.
wa_field2-coltext = text-002. "'Company Code'.
APPEND wa_field2 TO fcat2.
CLEAR wa_field2.
CLEAR wa_field2.
wa_field2-fieldname = 'KUNNR'.
wa_field2-tabname = 'T_PAYMENT'.
wa_field2-outputlen = '13'.
wa_field2-col_pos = '2'.
wa_field2-coltext = text-005. "'Customer Number'.
APPEND wa_field2 TO fcat2.
CLEAR wa_field2.
CLEAR wa_field2.
wa_field2-fieldname = 'NAME1'.
wa_field2-tabname = 'T_PAYMENT'.
wa_field2-outputlen = '13'.
wa_field2-col_pos = '3'.
wa_field2-coltext = text-007. "'Customer Name'.
APPEND wa_field2 TO fcat2.
CLEAR wa_field2.
CLEAR wa_field2.
wa_field2-fieldname = 'GJAHR'.
wa_field2-tabname = 'T_PAYMENT'.
wa_field2-outputlen = '11'.
wa_field2-col_pos = '4'.
wa_field2-coltext = text-015. "'Fiscal Year'.
APPEND wa_field2 TO fcat2.
CLEAR wa_field2.
CLEAR wa_field2.
wa_field2-fieldname = 'BELNR'.
wa_field2-tabname = 'T_PAYMENT'.
wa_field2-outputlen = '13'.
wa_field2-col_pos = '5'.
wa_field2-coltext = text-016. "'Invoice Number'.
APPEND wa_field2 TO fcat2.
CLEAR wa_field2.
CLEAR wa_field2.
wa_field2-fieldname = 'CURR'.
wa_field2-tabname = 'T_PAYMENT'.
wa_field2-outputlen = '11'.
wa_field2-col_pos = '6'.
wa_field2-coltext = text-022."'Currency'.
APPEND wa_field2 TO fcat2.
CLEAR wa_field2.
wa_field2-fieldname = 'DMBTR'.
wa_field2-tabname = 'T_PAYMENT'.
wa_field2-outputlen = '13'.
wa_field2-col_pos = '7'.
wa_field2-coltext = text-017. "'Invoice Amount'.
APPEND wa_field2 TO fcat2.
CLEAR wa_field2.
CLEAR g_layout2.
g_layout2-zebra = lc_x.
g_layout-sel_mode = lc_a.
ENDMODULE. " fill_fcat OUTPUT
*& Module display_data OUTPUT
text
MODULE display_data OUTPUT.
g_layout3-variant = g_save.
CALL METHOD sap_grid->set_table_for_first_display
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
i_structure_name = 'gt_display'
is_variant = g_layout3
i_save = 'A'
i_default = 'X'
is_layout = g_layout
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
CHANGING
it_outtab = t_bsid_bsad
it_fieldcatalog = fcat
IT_SORT =
IT_FILTER =
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4 .
IF sy-subrc <> 0.
MESSAGE e145(z1).
ENDIF.
g_layout4-variant = g_save1.
CALL METHOD sap_grid1->set_table_for_first_display
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
i_structure_name = 'gt_display1'
is_variant = g_layout4
i_save = 'A'
i_default = 'X'
is_layout = g_layout1
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
CHANGING
it_outtab = t_invoice
it_fieldcatalog = fcat1
IT_SORT =
IT_FILTER =
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4 .
IF sy-subrc <> 0.
MESSAGE e145(z1).
ENDIF.
g_layout5-variant = g_save2.
CALL METHOD sap_grid2->set_table_for_first_display
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
i_structure_name = 'gt_display2'
is_variant = g_layout5
i_save = 'A'
i_default = 'X'
is_layout = g_layout2
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
CHANGING
it_outtab = t_payment
it_fieldcatalog = fcat2
IT_SORT =
IT_FILTER =
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4 .
IF sy-subrc <> 0.
MESSAGE e145(z1).
ENDIF.
ENDMODULE. " display_data OUTPUT
*& Module exit INPUT
text
MODULE exit INPUT.
CALL METHOD g_custom_container->free.
CLEAR t_bsid_bsad[].
CALL METHOD g_custom_container1->free.
CLEAR t_invoice[].
CALL METHOD g_custom_container2->free.
CLEAR t_payment[].
LEAVE PROGRAM.
ENDMODULE. " exit INPUT
*& Module user_command_1100 INPUT
text
MODULE user_command_1100 INPUT.
MOVE g_ok_code TO g_saveok_code.
CLEAR g_ok_code.
CASE g_saveok_code.
*on BACK leave program
WHEN 'BACK'.
CALL METHOD g_custom_container->free.
CALL METHOD g_custom_container1->free.
CALL METHOD g_custom_container2->free.
CLEAR: g_custom_container,
g_custom_container1,
g_custom_container2.
LEAVE PROGRAM.
SET SCREEN 1000.
CALL TRANSACTION 'Z5172'.
CALL SELECTION-SCREEN 1000.
set screen 0.
leave screen.
*on CANCEL leave program
WHEN 'EXIT'.
CALL METHOD g_custom_container->free.
CALL METHOD g_custom_container1->free.
CALL METHOD g_custom_container2->free.
LEAVE PROGRAM.
*on CANCEL leave program
WHEN 'CANCEL'.
CALL METHOD g_custom_container->free.
CALL METHOD g_custom_container1->free.
CALL METHOD g_custom_container2->free.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " user_command_1100 INPUT -
Multiple ALV Objects in one Report
I have multiple ALV ojbects in one ABAP report (one a grid, and one a tree). When selecting the choose display layout for either object - it returns the layouts for BOTH objects. Is there any way of limiting this to only return the layouts for the appropriate object?
Thanks in advance.Hi Heather,
in methode set_table_for_first_display you can use the parameter is_variant of type DISVARIANT. Use the field HANDLE in this structure to distinguish the two ALV Objects. Fill also field REPORT of the same structure with sy-repid.
Regards Florian -
Display Multiple ALV layouts on one screen
Hi,
I have created 4 ALV Catalogues named: ALVCAT1, ALVCAT2, ALVCAT3, ALVCAT4
I have also created the corresponding internal tables with data for each catalogue: ALVITAB1, ALVITAB2, ALVITAB3, ALVITAB4
I have so far used the following function to generate each of the catalogues above:
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = SY-CPROG
I_INTERNAL_TABNAME = 'ALVITAB1'
I_INCLNAME = SY-CPROG
CHANGING
ct_fieldcat = ALVCAT1[].
And I have used the following function module to display the table as ALV:-
*DISPLAYING REPORT AS ALV GRID
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-CPROG
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND'
IT_FIELDCAT = ALVCAT1[]
i_screen_start_column = 10
i_screen_start_line = 15
i_screen_end_column = 200
i_screen_end_line = 20
TABLES
t_outtab = ALVITAB1.
How can I now using the above function modules or similar function modules to DISPLAY multiple ALV layouts on a single SCREEN. Each layout should be treated separately with their own ALV tool bar etc.
In this case i need to display 4 screens but I have scenarios where i need to also display 5.
Would be really grateful for your guidance with source code to achieve this.....
Thnx
Salman
Edited by: Salman Akram on Sep 20, 2010 2:47 PMHi
Try this [Link|http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=61243570] or the below program
BCALV_TEST_GRID_DRAG_DROP
or else
Try to use splitter container to display multiple ALVs on one screen
here is the demo program RSDEMO_SPLITTER_CONTROL
the below code will help you to call grid using splitter control
EXPORTING
container_name = 'CUSTOM'.
CREATE OBJECT splitter
EXPORTING
parent = container
rows = 1
columns = 1
align = 15.
CALL METHOD splitter->set_row_height
EXPORTING
id = 1
height = 1.
CALL METHOD splitter->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = container_1.
CREATE OBJECT grid1
EXPORTING
i_parent = container_1.
CALL METHOD grid1->set_table_for_first_display
EXPORTING
is_layout = gss_layout
is_variant = lwa_variant
i_save = 'A'
CHANGING
it_outtab = gt_report_list
it_fieldcatalog = gtt_fld_cat.
Regards
Edited by: Anesht on Sep 20, 2010 11:49 PM -
Colour a particular cell dynamically in ALV
Hi,
What class and method to be used to colour a particular cell dynamically in ALV?
Thanks,
Ronita.U can use the below class to colour a particular cell dynamically in ALV:
class:cl_gui_alv_grid
See below code. It definitely helps u.
Provide Reward Points...:-)
types : begin of ty. include structure MARA.
types : rowcolor(4) TYPE c,
end of ty.
data : itab type standard table of ty,"Output Internal table
i_fieldcat type standard table of lvc_s_fcat,"Field catalog
wa type ty,
w_variant type disvariant,
w_layout TYPE lvc_s_layo,"Layout structure
o_docking type ref to cl_gui_docking_container,"Docking Container
o_grid type ref to cl_gui_alv_grid."Grid
select * from mara into corresponding fields of table itab up to 10 rows.
call screen 9000.
*& Module STATUS_9000 OUTPUT
text
module STATUS_9000 output. if o_docking is initial.
SET PF-STATUS 'ZSTATUS'. "GUI Status
SET TITLEBAR 'ZTITLE'. "TitleCreating Docking Container
CREATE OBJECT o_docking
EXPORTING
RATIO = '95'.
IF sy-subrc eq 0.Creating Grid
CREATE OBJECT o_grid
EXPORTING
i_parent = o_docking.
ENDIF.Filling the fieldcatalog table
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_STRUCTURE_NAME = 'MARA'
CHANGING
ct_fieldcat = i_fieldcat
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
w_variant-report = sy-repid.Setting layout
w_layout-info_fname = 'ROWCOLOR'."For row coloringColouring a row
CLEAR wa.
READ TABLE itab INTO wa INDEX 3.
IF sy-subrc EQ 0.
wa-rowcolor = 'C311'.
MODIFY itab FROM wa TRANSPORTING rowcolor WHERE matnr = wa-matnr.
ENDIF.Displaying the output
CALL METHOD o_grid->set_table_for_first_display
EXPORTING
IS_VARIANT = w_variant
I_SAVE = 'A'
is_layout = w_layout
CHANGING
it_outtab = itab
IT_FIELDCATALOG = i_fieldcat
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
others = 4.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.endif.endmodule. " STATUS_9000 OUTPUT
*& Module USER_COMMAND_9000 INPUT
PAI
module USER_COMMAND_9000 input.
data lv_ucomm type sy-ucomm.
lv_ucomm = sy-ucomm.
CASE lv_ucomm.
WHEN 'CANCEl' OR 'EXIT'.
perform free_objects.
LEAVE PROGRAM.
when 'BACK'.
perform free_objects.
set screen '0'.
leave screen.
ENDCASE.
endmodule. " USER_COMMAND_9000 INPUT
*& Form free_objects
Free Objects
form free_objects .
CALL METHOD o_grid->free
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_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 METHOD o_docking->free
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_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.
endform. " free_objects
Provide Reward Points...:-) -
How to create Multiple ALV Lists, Each list on one new page
Hi All,
I have a requirement of displayiong data on multiple ALV Lists.
Ex:
I have data in internal table MATNR QTY VALUE
M1 2 3USD
M1 2 3USD
M2 2 3USD
M2 2 3USD
M3 2 3USD
M3 2 3USD
M4 2 3USD
M4 2 3USD
In The above internal table data , i have to displat M1 on one page and M2 on second,M3 on third and M4 on 4th page.....This may go to MN.
I have tried to do this with REUSE_ALV_BLOCK_LIST_APPEND, But if Lists are fixed like 3 or 4 , I can use this method.
Can any one help me on this?
Thanks,
Suresh.Hi Peter,
Yes I think that this is the way we will be probably go but not sure what the correct terms are for what I am looking for. Not sure if you are allowed to post examples of specific commercial plug ins here but if not, what should I search for. I know if sounds daft but it's a real case of not knowing what it is I am looking for. I am a complete InDesign newcomer who uses it at the moment for simple flyers etc so more than happy to find someone who can do the more complex stuff for me. The price lists will need to be done inhouse and on a regular basis.
thanks
Jen -
Multiple ALV display in one screen using SALV(Factory method)...
Hello Experts,
I tried using the old 'REUSE_ALV_BLOCK_LIST_APPEND' but it does not suit my
requirement. So will it be possible to display multiple ALV display(block) using
SALV?check the sample code..
REPORT zsalv_demo_multiple.
DATA: salv1 TYPE REF TO cl_salv_table,
salv2 TYPE REF TO cl_salv_table,
salv3 TYPE REF TO cl_salv_table.
DATA: g_custom TYPE REF TO cl_gui_custom_container,
o_splitter TYPE REF TO cl_gui_splitter_container,
o_grid1 TYPE REF TO cl_gui_container,
o_grid2 TYPE REF TO cl_gui_container,
o_grid3 TYPE REF TO cl_gui_container.
DATA: it_flight TYPE STANDARD TABLE OF sflight,
it_carr TYPE TABLE OF scarr,
it_book TYPE TABLE OF sbook.
START-OF-SELECTION.
SELECT * FROM sflight
INTO TABLE it_flight
UP TO 20 ROWS.
SELECT * FROM scarr
INTO TABLE it_carr
UP TO 20 ROWS.
SELECT * FROM sbook
INTO TABLE it_book
UP TO 20 ROWS.
CALL SCREEN 100.
*& Module STATUS_0100 OUTPUT
* text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'ABC'.
CREATE OBJECT g_custom
EXPORTING container_name = 'CONT'.
CREATE OBJECT o_splitter
EXPORTING parent = g_custom
rows = 3
columns = 1.
CALL METHOD o_splitter->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = o_grid1.
CALL METHOD o_splitter->get_container
EXPORTING
row = 2
column = 1
RECEIVING
container = o_grid2.
CALL METHOD o_splitter->get_container
EXPORTING
row = 3
column = 1
RECEIVING
container = o_grid3.
cl_salv_table=>factory(
EXPORTING
r_container = o_grid1
IMPORTING
r_salv_table = salv1
CHANGING
t_table = it_flight
cl_salv_table=>factory(
EXPORTING
r_container = o_grid2
IMPORTING
r_salv_table = salv2
CHANGING
t_table = it_carr
cl_salv_table=>factory(
EXPORTING
r_container = o_grid3
IMPORTING
r_salv_table = salv3
CHANGING
t_table = it_book
CALL METHOD salv1->display.
CALL METHOD salv2->display.
CALL METHOD salv3->display.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
CASE sy-ucomm.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
Flow Logic..
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
in the Screen i placed a custom control and named it as CONT -
Reg multiple ALV grid in a window
Hi friends,
I have an interesting requirement where i need to have multiple alv grid in my screen, how do i accomplish this, i cannot use containers in my screen as the number of grids in my screen vary.Have a look at standard transaction DWDM.
Regards,
Aparna -
Default Layout for Multiple ALV displays
Hello All,
I have a requirement where I am displaying multiple ALV grid displays on different tabs of a screen.
Now I have to set a default layout for each of the grids separately as they have different fields.
Please let me know how to do it, I am using OO ALV display.
Thanks a lot
RuchiHi,
According to your grid called pass the variant name
gs_variant-report = sy-repid.
gs_variant-username = sy-uname.
gs_variant-variant = v_vari. " Your variant Name
call method grid1->set_table_for_first_display
exporting
is_layout = gs_layout
is_variant = gs_variant "<<<<<<<<<
i_save = 'A'
it_toolbar_excluding = i_exclude[]
changing
it_outtab = i_output[]
it_fieldcatalog = i_fieldcat[]
exceptions
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
others = 4.
a® -
Writing text above multiple ALV list
Hi,
I have multiple ALV lists and want to add a different text above each one. How can this be achieved? I am using sort to separate the lists. thanks
sort-fieldname = 'MATNR'.
sort-up = 'X'.
sort-group = '*'.
APPEND sort TO it_sort.
CLEAR sort.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-repid
it_fieldcat = it_fieldcat
it_sort = it_sort
TABLES
t_outtab = it_data
EXCEPTIONS
program_error = 1.
Edited by: Hin Lai on Jan 7, 2011 9:40 PMWell, why not debug FBL5N and see how that transaction does this?
Hmmm....
Debugging may not help. The separate lists are handled by the display variant. You should be able to do the same thing if all of your lists use the same field catalog and are in the same or can be put in the same table.
Rob
Edited by: Rob Burbank on Jan 7, 2011 5:36 PM
Maybe you are looking for
-
Custom TitleWindow Skin State Problem
Hi everyone, I've got a problem: I have a TitleWindow with a skin made by me. Everything is perfect but when I change to a certain state (in this case is called "AuctionWon"). When I get to that state the skin completely disappear showing a transpar
-
Recently I have resored Every thing enternally in phone. After that the phone only got charging not starting only shows the apple logo...even itune can't detect the phone...so what should i do?....howi recover it?
-
Bgm.ser and jaxb.properties not created
Is there a particular reason to why the bgm.ser and jaxb.properties files are not created when a schema only consists of a simpletype and I run the binding compiler??? The two files seem to be created when I include a 'dummy' complextype in the schem
-
Mac Pro Graphics card and Motion 5
I purchased my Mac Pro in 2007, It is 2x 2.66 GHz dual core with 12 GB 667 MHz DDR2 F8-DIMM My grahpics card is Radeon X1900. Is this sufficient for Motion 5 and will I see a difference in speed, etc from Motion 4. Also, is it possible to upgrade my
-
Could someone explain this tip?
I have been given the following tip from my tutor to make my program: When you open the file for reading (before calling method acceptData), you will/should have created a Scanner object for reading from the file. It is this Scanner reference that sh