1
« en: Viernes 21 de Julio de 2017, 22:27 »
HOLA NECESITO AYUDA CON MIS CONSULTAS NO TRAEN DATOS GRACIAS.
*&---------------------------------------------------------------------*
REPORT ZSDP_GASTOS_TRANSPORTES.
TABLES VFKP.
DATA: BEGIN OF LT_INTERNA OCCURS 0,
BUDAT TYPE VFKP-BUDAT,
BUKRS TYPE VFKP-BUKRS,
FKNUM TYPE VFKP-FKNUM,
NETWR TYPE VFKP-NETWR,
EBELN TYPE VFKP-EBELN,
TDLNR TYPE VFKP-TDLNR,
REBEL TYPE VFKP-REBEL,
ERNAM TYPE VFKP-ERNAM,
POSTX TYPE VFKP-POSTX.
DATA: END OF LT_INTERNA.
"Estructura para archivo plano
DATA: BEGIN OF TITULOS OCCURS 0,
TEXT(20) TYPE C.
DATA: END OF TITULOS.
DATA: NAME_FILE TYPE RLGRAP-FILENAME,
MODE LIKE RLGRAP-FILEMODE.
PERFORM GRABAR_ARCHIVO.
PERFORM DATOS.
SELECTION-SCREEN BEGIN OF BLOCK TEXT-000 WITH FRAME TITLE TEXT-001.
PARAMETERS: BUKRS TYPE VFKP-BUKRS DEFAULT '0100'.
SELECT-OPTIONS: BUDAT FOR VFKP-BUDAT.
SELECTION-SCREEN END OF BLOCK TEXT-000.
*&---------------------------------------------------------------------*
*& Form DATOS
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM DATOS.
SELECT SINGLE FKNUM ERNAM NETWR EBELN TDLNR REBEL POSTX
INTO (VFKP-FKNUM,VFKP-ERNAM,VFKP-NETWR,VFKP-EBELN,VFKP-TDLNR,VFKP-REBEL,VFKP-POSTX)
FROM VFKP
WHERE BUKRS EQ '0100'
AND BUDAT IN BUDAT
AND FKNUM EQ VFKP-FKNUM.
LT_INTERNA-FKNUM = VFKP-FKNUM.
LT_INTERNA-ERNAM = VFKP-ERNAM.
LT_INTERNA-NETWR = VFKP-NETWR.
LT_INTERNA-EBELN = VFKP-EBELN.
LT_INTERNA-TDLNR = VFKP-TDLNR.
LT_INTERNA-REBEL = VFKP-REBEL.
LT_INTERNA-POSTX = VFKP-POSTX.
APPEND LT_INTERNA.
CLEAR LT_INTERNA.
ENDFORM. "DATOS