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




 
 
 
Herramientas Buscar en Tema Desplegado
Prev Mensaje Previo   Próximo Mensaje Próx
  #1  
Viejo 05/12/07, 09:02:40
tate tate is offline
Senior Member
 
Fecha de Ingreso: feb 2007
Mensajes: 106
insertar variables al final de la alv

Hola, tengo una alv, y kiero que alfina de la alv, me muestre en otras filas, o aparte de la alv, me daria igual, una serie de varibles que e calculado, son:
total
total_urgente.
porcent_urg
cont_urg .
sy-dbcnt
porcent_imp


*******este es el report
REPORT ZPEDIDOS_URGENTES .

TYPE-POOLS: SLIS.
***************************TABLES***************************************
tables: ekko, ekpo, lfa1.

***********************TABLA INTERNA************************************
DATA: begin of t_urgente occurs 0.
include structure ekko.
DATA: ebelp like ekpo-ebelp. "Num de posición del documento de compras
DATA: netpr like ekpo-netpr. "Precio neto en doc.compras moneda docum
DATA: name1 like lfa1-name1.
DATA: end of t_urgente.

DATA: total like ekpo-netpr. "Total de precio neto
DATA: total_urgente like ekpo-netpr. "Total de precio neto urgentes
DATA: cont_urg type i. "Contador de urgentes
DATA: porcent_urg type p DECIMALS 2. "Porcentaje de urgentes
DATA: porcent_imp type p DECIMALS 2. "Porcen. de precio neto de urgent

DATA:
*Program identificator
gf_repid LIKE sy-repid,
*ALV layout
gf_layout TYPE slis_layout_alv,
*ALV field catalog
gt_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.


**********************PARAMETERS****************************************
SELECT-OPTIONS:aedat FOR ekko-aedat,
bsart FOR ekko-bsart,
ERNAM FOR ekko-ERNAM,
name1 FOR lfa1-name1.
PARAMETERS: detalle AS CHECKBOX.



initialization.

start-of-selection.

SELECT * INTO CORRESPONDING FIELDS OF TABLE t_urgente
FROM ekko AS k INNER JOIN ekpo AS p ON k~ebeln = p~ebeln
JOIN lfa1 AS l ON k~lifnr = l~lifnr
WHERE k~aedat IN aedat
AND k~bsart IN bsart
AND k~ERNAM IN ERNAM
AND l~name1 IN name1
ORDER BY k~ebeln.


loop at t_urgente.
if t_urgente-zz_urgente EQ 'X'.
cont_urg = cont_urg + 1.
total_urgente = total_urgente +
t_urgente-netpr.
else.
total = total + t_urgente-netpr.
endif.
endloop.

total = total + total_urgente.
porcent_urg = cont_urg * 100.
porcent_urg = porcent_urg / sy-dbcnt.

porcent_imp = total_urgente * 100.
porcent_imp = porcent_imp / total.

gf_repid = sy-repid.
gt_fieldcat-just = 'C'.
CLEAR gt_fieldcat.

gt_fieldcat-tabname = 'T_URGENTE'.
gt_fieldcat-fieldname = 'EBELN'.
gt_fieldcat-seltext_l = 'Número del documento'.
gt_fieldcat-outputlen = '25'.
gt_fieldcat-just = 'C'.
APPEND gt_fieldcat.
* CLEAR gt_fieldcat-outputlen.
CLEAR gt_fieldcat.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gf_repid
i_save = 'A'
is_layout = gf_layout
it_fieldcat = gt_fieldcat[]
TABLES
t_outtab = t_urgente
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Responder Con Cita
 


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 11:57:55.


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