Ver la Versión Completa : alv con dos listados?
javigol
18/12/07, 09:43:33
hola, alguien sabe como se pueden mostrar dos listados en una misma pantalla (es el contenido de una tabla en dos listados separados)? mediante un alv?
Hola,
debes crearte una scrren con dos(o los que necesites) custom container y llamar a los ALV en el orden que necesites así:
(Adjunto otro ejemplo más completo)
REPORT zrich_0001.
data: ispfli type table of spfli.
data: isflight type table of sflight.
data: alv1_cont type ref to cl_gui_custom_container.
data: alv2_cont type ref to cl_gui_custom_container.
data: gr_alv1 type ref to cl_salv_table.
data: gr_alv2 type ref to cl_salv_table.
start-of-selection.
select * into table ispfli from spfli.
select * into table isflight from sflight.
call screen 100.
\*&---------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
\*&---------------------------------------------------------------------*
\* text
\*----------------------------------------------------------------------*
module STATUS_0100 output.
\* SET PF-STATUS 'xxxxxxxx'.
* SET TITLEBAR 'xxx'.
create object alv1_cont
exporting
container_name = 'ALV1_CONT'.
CALL METHOD cl_salv_table=>factory
EXPORTING
\* list_display = if_salv_c_bool_sap=>false
r_container = alv1_cont
\* container_name =
IMPORTING
r_salv_table = gr_alv1
CHANGING
t_table = ispfli.
gr_alv1->display( ).
create object alv2_cont
exporting
container_name = 'ALV2_CONT'.
CALL METHOD cl_salv_table=>factory
EXPORTING
\* list_display = if_salv_c_bool_sap=>false
r_container = alv2_cont
\* container_name =
IMPORTING
r_salv_table = gr_alv2
CHANGING
t_table = isflight.
gr_alv2->display( ).
endmodule. " STATUS_0100 OUTPUT
Saludos.
Muchas gracias por tu ayuda nenuke!!!!!!!!!!
www.mundosap.com 2006 - Spain
software crm, crm on demand, software call center, crm act, crm solutions, crm gratis, crm web