|
#1
|
|||
|
|||
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. |
#2
|
||||
|
||||
Por que no pruebas ya que acabes de imprimir, el alv en la tabla interna manda esas variables a la tabla interna
__________________
Un Huevon No Inútil Solo di lo que piensas, a la mejor tienes la mejor respuesta.... Si alguien ya lo hizo, copialo y cambiale las variables total es un codigo nuevo..... Si SAP lo hace se puede hacer, no me pidas hacer algo que SAP no ha hecho..... Consultor FI jr/ABAP Sr. |
#3
|
||||
|
||||
Podrías usar los ALV OO, así no te ocuparía toda la pantalla el alv y tendrías espacio para poner las variables que quieras.
Saludos, David. |
#4
|
|||
|
|||
No te entiendo.
Ya e metido los datos en la tabla interna, pero no se como hacer para que me aparezcan |
#5
|
|||
|
|||
puedes hacer lo siguiente prueba con esto
*----------------------------------------------------------------------- *Start of selection *----------------------------------------------------------------------- Start-of-selection. perform.. tus performs... *----------------------------------------------------------------------* * END-OF-SELECTION * *----------------------------------------------------------------------* END-OF-SELECTION. write: /1 'DATO ', 11 VARIABLE, 70 VARIABLE1 , 197 'DATO2:', 204 VARIABLE 2 . |
#6
|
|||
|
|||
ibecerra, no entiendo muy bien lo que dices con ese codigo
|
#7
|
|||
|
|||
haber.. deseas que aparezca en tu alv lo siguiente
alv1 cololumna1 cololumna 2 cololumna 3 xxxxxxxxxx xxxxxxxxxxx xxxxxxxxxxx xxxxxxxxx xxxxxxxxxxx xxxxxxxxxxxx . . . al final 'DATO' VARIABLE 'DATO2' XXXXXXXXX |
Herramientas | Buscar en Tema |
Desplegado | |
|
|