MUNDOSAP

Regresar   MUNDOSAP > DESARROLLO > Programación ABAP IV
Nombre de Usuario
Contraseña
Home Descargas Registrar FAQ Miembros Calendario Buscar Temas de Hoy Marcar Foros Como Leídos




 
Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Viejo 27/04/12, 23:09:25
Avatar de DCErick
DCErick DCErick is offline
Moderator
 
Fecha de Ingreso: mar 2006
Localización: Monterrey
Mensajes: 1,090
mmm sabes, no tengo forma de probarlo ahorita con el user_command

Yo lo puse en el top_of_page y me jala bien....
__________________
-------------------
¿Dudas para descargar manuales? Ver este tema ->
Responder Con Cita
  #2  
Viejo 30/04/12, 14:37:43
Eduesqueda Eduesqueda is offline
Senior Member
 
Fecha de Ingreso: dic 2008
Localización: San Nicolás, México
Mensajes: 103
____________________________________________________________

Buen día, DERICK y hola: disculpa esta forma que me dijistes al final me debe actualizar los totales de mi alv en pantalla autómaticamente? Será que a mi no me funcionó porque estoy usando funciones estandar de sap para desplegar mi alv?

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

mi tabla al alv se llama i_alv. y solo contiene los registros a sumarizar.

saludos
__________________
Saludos
Alabado Seas Yhavé.
-Hay Un Mundo Mejor Cuando Aprendes a AMAR
Responder Con Cita
  #3  
Viejo 30/04/12, 15:13:29
Avatar de DCErick
DCErick DCErick is offline
Moderator
 
Fecha de Ingreso: mar 2006
Localización: Monterrey
Mensajes: 1,090

Asi es, eso te coloca los totales en tu ALV, ah yo tambien lo hice con REUSE_ALV_GRID_DISPLAY, recuerda agregar el evento yo lo hice desde el parametro i_callback_top_of_page


'SUB_ALV_TOP_OF_PAGE' <- Nombre del form donde coloqué el código que te mandé xD.
__________________
-------------------
¿Dudas para descargar manuales? Ver este tema ->
Responder Con Cita
  #4  
Viejo 30/04/12, 16:33:38
Eduesqueda Eduesqueda is offline
Senior Member
 
Fecha de Ingreso: dic 2008
Localización: San Nicolás, México
Mensajes: 103


________________________________________________________

YA LO HICE TAMBIEN ASI Y NO ME FUNCIONO, NI MODO...GRACIAS DERICK.
__________________
Saludos
Alabado Seas Yhavé.
-Hay Un Mundo Mejor Cuando Aprendes a AMAR
Responder Con Cita
  #5  
Viejo 30/04/12, 16:46:21
Avatar de DCErick
DCErick DCErick is offline
Moderator
 
Fecha de Ingreso: mar 2006
Localización: Monterrey
Mensajes: 1,090


Algo te debe estar faltando....
Que versión de SAP tienes?
¿Puedes compartir tu programa para ver como le estas haciendo?
__________________
-------------------
¿Dudas para descargar manuales? Ver este tema ->
Responder Con Cita
  #6  
Viejo 30/04/12, 20:20:24
Eduesqueda Eduesqueda is offline
Senior Member
 
Fecha de Ingreso: dic 2008
Localización: San Nicolás, México
Mensajes: 103
_____________________________________________________________
VERSION 6.4 (COMO COMPARTO EL PGMA Y SUS INCLUDES? ESQUE NO ME DEJA ATACHARLOS TODOS PERO HAY VAN SOLO 3 RUTINAS)

PROGRAME LO QUE ME DIJISTES EN LA RUTINA DEL TOP ANTES DEL ENDFORM

_____________________________________________________________
ESTA ES LA RUTINA DEL DISPLAY ALV
_____________________________________________________________

*&---------------------------------------------------------------------*
*& Form F_DISPLAY_ALV_REPORT *
*&---------------------------------------------------------------------*
* Display alv report on output screen *
*----------------------------------------------------------------------*

FORM f_display_alv_report .

* Local variables------------------------------------------------------*
DATA: lv_program TYPE sy-repid,
i_lvc_s_glay LIKE lvc_s_glay.

i_lvc_s_glay-edt_cll_cb = 'X'.

CLEAR w_variant.

lv_program = sy-repid.

* Variant for ALV.
w_variant-report = lv_program.
w_variant-variant = p_vari.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = lv_program
i_callback_pf_status_set = 'C'
i_callback_user_command = 'USER_COMMAND'
i_callback_top_of_page = 'F_ALV_TOP'
i_structure_name = 'I_ALV'
i_grid_settings = i_lvc_s_glay
is_layout = w_layout
it_fieldcat = i_fieldcat
it_sort = it_sortCat
i_default = c_x
i_save = c_a
is_variant = w_variant
it_events = i_events
TABLES
t_outtab = i_alv
EXCEPTIONS
program_error = 1
OTHERS = 2.

IF sy-subrc <> c_zeros.

MESSAGE ID sy-msgid
TYPE sy-msgty
NUMBER sy-msgno
WITH sy-msgv1
sy-msgv2
sy-msgv3
sy-msgv4.
ENDIF.

ENDFORM. " F_DISPLAY_ALV_REPORT
_____________________________________________________________

ESTA ES LA RUTINA DEL TOP
_____________________________________________________________


*&---------------------------------------------------------------------*
*& Form f_alv_top *
*&---------------------------------------------------------------------*
* Routine To generate the headed one of the ALV *
*----------------------------------------------------------------------*
FORM f_alv_top.

* Local Variables------------------------------------------------------*
DATA: lv_date(10) TYPE c,
lv_layout(50) TYPE c,
lv_textvar LIKE varit-vtext,
lv_variant(50) TYPE c.

* to verify that the Head does not have data.
REFRESH i_list_top.
* CHECK i_list_top[] IS INITIAL.

* Change Sy-Datum by Sy-Datlo.
WRITE sy-datlo TO lv_date DD/MM/YYYY.

* Create the name of the file to be generated.
CLEAR: i_gs_line.
i_gs_line-typ = c_s.
i_gs_line-key = text-t03. "File
i_gs_line-info = p_displ.
APPEND i_gs_line TO i_list_top.

* Create Date
CLEAR: i_gs_line.
i_gs_line-typ = c_s.
i_gs_line-key = text-t01. "Date
i_gs_line-info = lv_date.
APPEND i_gs_line TO i_list_top.

* Create User
CLEAR: i_gs_line.
i_gs_line-typ = c_s. "Line type [H]eader
i_gs_line-key = text-t02. "User
i_gs_line-info = sy-uname.
APPEND i_gs_line TO i_list_top.
CLEAR: i_gs_line.

* Create Total Records
CLEAR: i_gs_line.
i_gs_line-typ = c_s. "Line type [H]eader
i_gs_line-key = text-t04. "Total records
i_gs_line-info = v_tot_reg_t.
APPEND i_gs_line TO i_list_top.

CALL FUNCTION 'RS_VARIANT_TEXT'
EXPORTING
curr_report = sy-cprog
langu = sy-langu
variant = sy-slset
IMPORTING
v_text = lv_textvar
EXCEPTIONS
no_text = 1.
IF sy-subrc EQ c_zeros.
CONCATENATE sy-slset
lv_textvar
INTO lv_variant
SEPARATED BY space.
ENDIF.

* i_gs_line-typ = c_s. " Line type [H]eader
* i_gs_line-key = text-t05. " Variant
* i_gs_line-info = lv_variant.
* APPEND i_gs_line TO i_list_top.

* Create the Third label of Title
CLEAR: i_gs_line.

CONCATENATE p_vari
v_text_lay
INTO lv_layout
SEPARATED BY space.

CLEAR: i_gs_line.
i_gs_line-typ = c_s. " Line type [H]eader
i_gs_line-key = text-t06. " Layout
i_gs_line-info = lv_layout.
APPEND i_gs_line TO i_list_top.

* Write the Headed
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = i_list_top.

ENDFORM. " f_alv_top
_____________________________________________________________

ESTA ES LA RUTINA DE DATA_CHANGED
_____________________________________________________________


*&---------------------------------------------------------------------*
*& Form DATA_CHANGED
*&---------------------------------------------------------------------*
* Modifies the CheckBox in the ALV Report
*----------------------------------------------------------------------*
* <--P_I_EXTAB text
*----------------------------------------------------------------------*
FORM data_changed
USING rr_data TYPE REF TO cl_alv_changed_data_protocol.

DATA : ls_mod_cell TYPE lvc_s_modi,
lv_value TYPE lvc_value.

SORT rr_data->mt_mod_cells BY row_id .
LOOP AT rr_data->mt_mod_cells INTO ls_mod_cell.
IF ls_mod_cell-fieldname = 'DESPU'.
READ TABLE i_alv index ls_mod_cell-row_id .
IF sy-subrc = 0.
i_alv-despu = ls_mod_cell-value.
MODIFY i_alv index ls_mod_cell-row_id.
CALL METHOD rr_data->MODIFY_CELL
EXPORTING
i_row_id = ls_mod_cell-row_id
i_fieldname = 'DESPU'
i_value = ls_mod_cell-value.
ENDIF.
ENDIF.
ENDLOOP.

ENDFORM.
__________________
Saludos
Alabado Seas Yhavé.
-Hay Un Mundo Mejor Cuando Aprendes a AMAR
Responder Con Cita
  #7  
Viejo 30/04/12, 20:39:14
Avatar de DCErick
DCErick DCErick is offline
Moderator
 
Fecha de Ingreso: mar 2006
Localización: Monterrey
Mensajes: 1,090
mmm

No veo nada en el f_alv_top no está el código que te pase.
__________________
-------------------
¿Dudas para descargar manuales? Ver este tema ->
Responder Con Cita
Respuesta


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Reglas de Mensajes
no puedes crear nuevos temas
no puedes responder temas
no puedes adjuntar archivos
no puedes editar tus mensajes

El código vB está On
Las caritas están On
Código [IMG] está On
Código HTML está Off
Saltar a Foro


Husos Horarios son GMT. La hora en este momento es 22:42:59.


www.mundosap.com 2006 - Spain
software crm, crm on demand, software call center, crm act, crm solutions, crm gratis, crm web