#1
|
|||
|
|||
Mis primeros pininos y no funciona. ayuda :(
se queda en el mesage select3 y ya no sale el ALV. ya no se que hacer. sin embargo se ve estupidamente sencillo.
data: begin of gt_ca occurs 0, ocpedido type EKKO-EBELN, fecha type EKKO-AEDAT, moneda type EKKO-WAERS, end of gt_ca. data: begin of gt_fin occurs 0, ocpedido1 type EKKO-EBELN, fecha1 type EKKO-AEDAT, moneda1 type EKKO-WAERS, numpro1 type EKKO-LIFNR, end of gt_fin. DATA :gt_cat TYPE slis_t_fieldcat_alv, gs_cat LIKE LINE OF gt_cat. *&---------------------------------------------------------------------* *& Form ZTE_SELECCION1 *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-- p2 text *----------------------------------------------------------------------* FORM ZTE_SELECCION1. message 'select' type 'I' . select a~EBELN a~AEDAT a~WAERS from EKKO as a into table gt_ca where a~AEDAT BETWEEN '01012010' AND '02022016'. REfresh gt_fin. if sy-subrc EQ 0. message 'select2' type 'I' . LOOP at gt_ca. "clear gt_fin. message 'select3' type 'I' . gt_fin-ocpedido1 = gt_ca-ocpedido. gt_fin-fecha1 = gt_ca-fecha. gt_fin-moneda1 = gt_ca-moneda. write: / 'DATOS ',gt_fin-ocpedido1 ,gt_fin-fecha1 ,gt_fin-moneda1. APPEND gt_fin. "inserta en la tabla ENDLOOP. * else. * write: / 'no '. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. endif. ENDFORM. " ZTE_SELECCION1 *&---------------------------------------------------------------------* *& Form ZTE_ALV1 *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-- p2 text *----------------------------------------------------------------------* FORM ZTE_ALV1 . CHECK gt_fin IS NOT INITIAL. REFRESH gt_cat. CLEAR gs_cat. gs_cat-fieldname = 'OC'. gs_cat-ref_fieldname ='EBELN'. gs_cat-ref_tabname ='EKKO'. gs_cat-emphasize = 'C411'. ADD 1 TO gs_cat-col_pos. APPEND gs_cat TO gt_cat. CLEAR gs_cat. gs_cat-fieldname = 'FECHA'. gs_cat-ref_fieldname ='AEDAT'. gs_cat-ref_tabname ='EKKO'. gs_cat-emphasize = 'C601'. ADD 1 TO gs_cat-col_pos. APPEND gs_cat TO gt_cat. CLEAR gs_cat. gs_cat-fieldname = 'MONEDA'. gs_cat-ref_fieldname ='WAERS'. gs_cat-ref_tabname ='EKKO'. gs_cat-emphasize = 'C600'. ADD 1 TO gs_cat-col_pos. APPEND gs_cat TO gt_cat. CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' "llamado a la tabla de creacion en pantalla EXPORTING I_CALLBACK_PROGRAM = sy-repid IT_FIELDCAT = gt_cat TABLES T_OUTTAB = gt_fin[] EXCEPTIONS PROGRAM_ERROR = 1 OTHERS = 2. ENDFORM. " ZTE_ALV1 |
Herramientas | Buscar en Tema |
Desplegado | |
|
|