De antemano Gracias por responder al post.
Te explico, hace poco me encomendaron el requerimiento de una empresa. Se trataba sobre un reporte alv_grid_diplay(código que envié en el post anterior) no mostraba los botones de pagina siguiente,anterior,inicial y final.
Lo primero que hice fue copiar un Status "standar" para solucionar el problema, pero se soluciono a medias porque dado que ya se mustraban los botones sin embargo no funcionan. He estado buscando como loco la funcionalidad de avance de pagina y nada.(Adjunto un programa parecido al que tengo de la empresa con el mismo problema), gracias por la ayuda.
REPORT ZALV_MT NO STANDARD PAGE HEADING MESSAGE-ID ZFI
*DEL FHM20110203 LINE-SIZE 120
* LINE-SIZE 144 "ADD FHM20110203
LINE-COUNT 27(2).
*LINE-COUNT 65 LINE-SIZE 80.
*DATA
DATA: NUM_PAGES_C(10) TYPE C.
*CONTROLS flights TYPE TABLEVIEW USING SCREEN.
TYPES: BEGIN OF ed,
check(1),
kunnr TYPE kna1-kunnr,
name1 TYPE kna1-name1,
desc TYPE string,
END OF ed.
DATA: itab TYPE TABLE OF ed WITH HEADER LINE,
line LIKE LINE OF itab,
st_diario TYPE TABLE OF ed WITH HEADER LINE.
*PARAMETROS DE SELECCION
DATA: cli TYPE kna1-kunnr.
DATA: lines TYPE i,
limit TYPE i,
fill TYPE i.
DATA DYNMAX LIKE SY-TABIX.
SELECT-OPTIONS: clientes FOR cli.
********** DATA ALV *******************************************************************************
*Type Pool donde vienen definidas todas las estructuras y tablas
TYPE-POOLS: slis.
*Estructura de parámetros
DATA: LF_SP_GROUP TYPE SLIS_T_SP_GROUP_ALV,"Manejar grupos de campos
LF_LAYOUT TYPE SLIS_LAYOUT_ALV, "Manejar diseño de layout
IT_TOPHEADER TYPE SLIS_T_LISTHEADER, "Manejar cabecera del rep
WA_TOP LIKE LINE OF IT_TOPHEADER. "Línea para cabecera
DATA:
*INI ADD JCP20110801
st_fieldcat TYPE slis_fieldcat_alv,
ti_fieldcat LIKE STANDARD TABLE OF st_fieldcat,
st_layout TYPE slis_layout_alv,
st_events TYPE slis_alv_event,
ti_events LIKE STANDARD TABLE OF st_events,
st_sort TYPE slis_sortinfo_alv,
ti_sort LIKE STANDARD TABLE OF st_sort,
st_comment TYPE slis_listheader,
ti_comment LIKE STANDARD TABLE OF st_comment,
st_header TYPE slis_listheader,
ti_header LIKE STANDARD TABLE OF st_header,
lrow type REF TO cl_gui_alv_grid.
*Tablas. Catálogo de campos
DATA: alv_git_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
"manejar catálogo de parámetros
*Seleccion de datos
SELECT kunnr name1
INTO CORRESPONDING FIELDS OF TABLE itab
FROM kna1
WHERE kunnr IN clientes.
PERFORM imprime_alv.
*FORM ALV_INI_FIELDCAT para crear el catálogo de campos con sus propiedades.
FORM fieldcat_initialization.
*Check
CLEAR st_fieldcat.
st_fieldcat-fieldname = 'CHECK'.
st_fieldcat-key = 'X'.
st_fieldcat-seltext_m = ' '.
st_fieldcat-seltext_l = ' '.
st_fieldcat-col_pos = 0.
st_fieldcat-sp_group = 'A'.
st_fieldcat-outputlen = '3'.
APPEND st_fieldcat TO ti_fieldcat.
*Cliente
CLEAR st_fieldcat.
st_fieldcat-fieldname = 'KUNNR'.
st_fieldcat-key = 'X'.
st_fieldcat-seltext_m = 'Cliente'.
st_fieldcat-seltext_l = 'Cliente'.
st_fieldcat-col_pos = 0.
st_fieldcat-sp_group = 'A'.
st_fieldcat-outputlen = '10'.
APPEND st_fieldcat TO ti_fieldcat.
*Nombre
CLEAR st_fieldcat.
st_fieldcat-fieldname = 'NAME1'.
st_fieldcat-seltext_m = 'Nombre'.
st_fieldcat-seltext_l = 'Nombre'.
st_fieldcat-col_pos = 0.
st_fieldcat-sp_group = 'A'.
st_fieldcat-outputlen = '20'.
APPEND st_fieldcat TO ti_fieldcat.
*Descripción
CLEAR st_fieldcat.
st_fieldcat-fieldname = 'DESC'.
st_fieldcat-seltext_m = 'Descripción'.
st_fieldcat-seltext_l = 'Descripción'.
st_fieldcat-col_pos = 0.
st_fieldcat-sp_group = 'A'.
st_fieldcat-outputlen = '20'.
APPEND st_fieldcat TO ti_fieldcat.
* CLEAR st_fieldcat.
* st_fieldcat-SP_GROUP = 'A'.
* MODIFY st_fieldcat FROM st_fieldcat
* TRANSPORTING SP_GROUP WHERE FIELDNAME = 'VBTYP'.
ENDFORM. " ALV_INI_FIELDCAT
* FORM LAYOUT_BUILD para diseñar el Layout de salida del ALV
FORM LAYOUT_BUILD USING U_LF_LAYOUT TYPE SLIS_LAYOUT_ALV.
U_LF_LAYOUT-BOX_FIELDNAME = 'CHECK'. " Checkbox
U_LF_LAYOUT-ZEBRA = 'X'. " Streifenmuster
U_LF_LAYOUT-GET_SELINFOS = 'X'.
U_LF_LAYOUT-F2CODE = 'BEAN' . " Doppelklickfunktion
U_LF_LAYOUT-CONFIRMATION_PROMPT = 'X'. "Sicherheitsabfrage
U_LF_LAYOUT-KEY_HOTSPOT = 'X'. "Schlüssel als Hotspot
U_LF_LAYOUT-INFO_FIELDNAME = 'COL'. "Zeilenfarbe
ENDFORM. " LAYOUT_BUILD
FORM pf_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'ZSTATUS2_STANDARD'.
ENDFORM.
FORM alv_initialization .
DATA: wl_repid LIKE sy-repid.
wl_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = wl_repid
I_CALLBACK_PF_STATUS_SET = 'PF_STATUS'
i_callback_user_command = 'USER_COMMAND_FB03'
* i_structure_name = 'TI_DIARIO'
is_layout = st_layout
it_fieldcat = ti_fieldcat[]
it_sort = ti_sort[]
i_default = 'X'
i_save = 'A'
it_events = ti_events[]
i_callback_html_top_of_page = ''
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM. " alv_initialization
FORM user_command_fb03 USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.
READ TABLE itab INTO st_diario INDEX selfield-tabindex.
CHECK sy-subrc = 0.
CASE ucomm.
* Doble Click
WHEN '&IC1'.
* CASE selfield-fieldname.
* WHEN 'BELNR'.
* SET PARAMETER ID 'BUK' FIELD st_diario-bukrs.
* SET PARAMETER ID 'BLN' FIELD st_diario-belnr.
* SET PARAMETER ID 'GJA' FIELD st_diario-gjahr.
* CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.
* WHEN OTHERS.
when 'P- '.
selfield-refresh = 'X'.
selfield-col_stable = 'X'.
selfield-row_stable = 'X'.
when 'P+ '.
selfield-refresh = 'X'.
selfield-col_stable = 'X'.
selfield-row_stable = 'X'.
when 'P++ '.
selfield-refresh = 'X'.
selfield-col_stable = 'X'.
selfield-row_stable = 'X'.
when 'P-- '.
selfield-refresh = 'X'.
selfield-col_stable = 'X'.
selfield-row_stable = 'X'.
ENDCASE.
ENDFORM.
FORM imprime_alv .
PERFORM fieldcat_initialization.
PERFORM layout_initialization.
* PERFORM sort_initialization.
PERFORM alv_events.
PERFORM alv_initialization.
ENDFORM.
FORM layout_initialization .
CLEAR st_layout.
st_layout-colwidth_optimize = 'X'.
st_layout-zebra = 'X'.
ENDFORM. " layout_initialization
FORM alv_events .
REFRESH ti_events.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = ti_events.
READ TABLE ti_events INTO st_events
WITH KEY name = slis_ev_top_of_page.
IF sy-subrc EQ 0.
MOVE 'F_TOP_OF_PAGE' TO st_events-form.
MODIFY ti_events FROM st_events INDEX sy-tabix.
ENDIF.
ENDFORM. " alv_events
FORM f_top_of_page.
REFRESH ti_comment.
* H = Header, S = Selection, A = Action
CLEAR st_comment.
st_comment-typ = 'H'.
st_comment-info = 'Libro Diario'.
APPEND st_comment TO ti_comment.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = ti_comment.
write: / SY-PAGNO LEFT-JUSTIFIED.
SKIP.
ENDFORM. " F_TOP_OF_PAGE