|
#1
|
|||
|
|||
Mis primeras lineas de un ALV
Hola, gracias por el apoyo esta algo complicado, pero nada imposible... estuve haciendo un ALV con ayuda de una buena persona de aqui mas o menos me guie... y llevo esto, ojala me puedan decir donde esta el error solo es mostrar los datos... gracias y linda semana a todos:
*&---------------------------------------------------------------------* *& Report Z_REPORT *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* report z_report. include z_report_top. include z_report_rut. start-of-selection. perform selecciona_informacion. if z_report[] is not initial. perform report. else. endif. *&---------------------------------------------------------------------* *& Include Z_REPORT_TOP *&--------------------------------------------------------------------* TYPE-POOLS: slis. form genera_titulos . data: I_fieldcat type slis_fieldcat_vbrk. data w_fieldcat like line of I_fieldcat. TABLES: vbrk. TYPES: BEGIN OF report, vbeln TYPE vbeln, fkart TYPE fkart, fktyp TYPE fktyp, vbtyp TYPE vbtyp, waers TYPE waerk, vkorg type vkorg, vtweg type vtweg, kalsm type kalms, knumv type knumv, vsbed type vsbed. types end of report. data it_report type standard table of t_report. data w_report like line of it_report. data vbrk like line of vbrk. *&---------------------------------------------------------------------* *& Include Z_REPORT_RUT *&---------------------------------------------------------------------* form procesa. select VBELN FKART FKTYP VBTYP WAERK VKORG VTWEG KALSM KNUMV VSBED into table vbkr from z_report. endform. Form report. data: l_fieldcat type slis_fieldcat_alv. data w_fieldcat like line of i_fieldcat. loop at i_fieldcat into w_fieldcat. case w_fieldcat-fieldname. when 'VBELN'. w_fieldcat-reptext_ddic = 'FACTURA'. when 'FKART'. w_fieldcat-reptext_ddic = 'CLASE FACTURA'. when 'FKTYP'. w_fieldcat-reptext_ddic = 'TIPO FACTURA'. when 'VBTYP'. w_fieldcat-reptext_ddic = 'TIPO DOC.COM.'. when 'WAERK'. w_fieldcat-reptext_ddic = 'MONEDA DOC.'. when 'VKORG'. w_fieldcat-reptext_ddic = 'ORGANIZ.VENTAS'. when 'VTWEG'. w_fieldcat-reptext_ddic = 'CANAL DISTRIB.'. when 'KALSM'. w_fieldcat-reptext_ddic = 'ESQUEMA CALCULO'. when 'KNUMV'. w_fieldcat-reptext_ddic = 'CONDICION DOC'. when 'VSBED'. w_fieldcat-reptext_ddic = 'CONDIC.EXPED.'. ENDCASE. modify i_fieldcat from w_fieldcat. endloop. Ah i me manda un error en esta parte... I_fieldcat Úlima edición por Dany24 fecha: 24/04/12 a las 22:01:35. |
#2
|
|||
|
|||
Si alguien me pudiera explicar si esta bien lo que hice o esta mal se los agradeceria chicos, jejejeje gracias... quiero ver si entendi y porque me sale ese mensaje de error en i_fielcat... :P
|
#3
|
||||
|
||||
la verdad que veo varios problemas en el código (a mi parecer...)
cual es el mensaje de error que te da? copialo completo para poder ayudarte... slds, |
#4
|
|||
|
|||
Hola,
Este es parte de código que utilizo y a mi me funciona. TYPE-POOLS: slis. DATA : gt_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE, gs_layout TYPE slis_layout_alv. gt_fieldcat-fieldname = 'VBELN'. gt_fieldcat-ref_fieldname = 'VBELN'. gt_fieldcat-reptext_ddic = 'FACTURA'. gt_fieldcat-seltext_l = 'FACTURA'. gt_fieldcat-seltext_m = 'FACTURA'. gt_fieldcat-seltext_s = 'FACTURA'. gt_fieldcat-ddictxt(1) = 'L'. gt_fieldcat-ref_tabname = 'VBRK'. APPEND gt_fieldcat . CLEAR gt_fieldcat. Saludos.
__________________
Conchis |
#5
|
|||
|
|||
Hola si como le comentaba a Hugo, le doy en guardar y luego activar pero me sale error y bueno es una prueba pero me guié con el ejemplo que me mandaste y de otros programas de los consultores, pero son woow mounstruos de programas... me refiero que los admiro woow tanto codigo ojala pronto pueda estar haciendo algo como ustedes... el mensaje es este... Error en sintaxis Descripción Linea Clase Include Z_REPORT_TOP 10 (botón rojo) "I_FIELDCAT" is not an internal table Include Z_REPORT_TOP 7 (BOTÓN AMARILLO) There should only be definitions in the TOP include (or nested includes within it). This means that all kinds of implementation (CLASS... IMPLEMENTATION, not meaningful. is not meaningful. *&---------------------------------------------------------------------* *& Report Z_REPORT *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* report z_report. include z_report_top. include z_report_rut. start-of-selection. perform selecciona_informacion. if z_report[] is not initial. perform report. else. endif. |
#6
|
|||
|
|||
Respecto del mensaje original.
Tienes declarado l_fieldcat como data: l_fieldcat type slis_fieldcat_alv deberia ser data: l_fieldcat type table of slis_fieldcat_alv Saludos |
#7
|
|||
|
|||
Hola... :D
Hola Hugito, mira le doy guardar y luego activar y me manda error y dice Error en sintaxis Descripción Linea Clase Include Z_REPORT_TOP 10 (botón rojo) "I_FIELDCAT" is not an internal table Include Z_REPORT_TOP 7 (BOTÓN AMARILLO) There should only be definitions in the TOP include (or nested includes within it). This means that all kinds of implementation (CLASS... IMPLEMENTATION, not meaningful. is not meaningful. *&---------------------------------------------------------------------* *& Report Z_REPORT *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* report z_report. include z_report_top. include z_report_rut. start-of-selection. perform selecciona_informacion. if z_report[] is not initial. perform report. else. endif. |
Herramientas | Buscar en Tema |
Desplegado | |
|
|