alv con dos listados?

Colapsar
X
 
  • Tiempo
  • Mostrar
Limpiar Todo
nuevos mensajes
  • javigol
    Junior Member
    • nov
    • 11

    #1

    alv con dos listados?

    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?
  • nenuke
    Member
    • sep
    • 87

    #2
    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)

    Código:
    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.
    Archivos Adjuntos

    Comentario

    • Marat
      Junior Member
      • ago
      • 19

      #3
      Muchas gracias por tu ayuda nenuke!!!!!!!!!!
      marat

      Comentario

      Trabajando...