Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

INCREMENTAL LOAD FROM EBAN SAP.

Hi everyone

I want to do a incremental load from the EBAN table but when i want to peek the maxdate number send a null value some one can explain me why?

This is my script.

LIB CONNECT TO 'SAP_SQL';

[EBAN]:

LOAD

    EBELN as 'SOLPED_Pedido',

    BANFN as 'SOLPED_NumSOLPED',//NUMERO SOLPED

    BNFPO as 'SOLPED_PosSOLPED',

    BSART as 'SOLPED_ClaseDoc',

    BSTYP as 'SOLPED_TipoDoc',

    LOEKZ as 'SOLPED_IndicaBorrado',

    STATU as 'SOLPED_StatusTratamiento',

    ESTKZ as 'SOLPED_IndicaCreacion',

    FRGKZ as 'SOLPED_IndicaLiberacion',

    FRGZU as 'SOLPED_EstadoLiberacion',

    FRGGR as 'SOLPED_GpoLiberacion',

    FRGST as 'SOLPED_EstratLiberacion',

    EKGRP as 'SOLPED_GpoCompras',

    ERNAM as 'SOLPED_CreadoPor', //QUIEN CREO SOLPED

    BADAT as 'SOLPED_FechaSolicitud',

    ERDAT as 'SOLPED_FechaUltimaModificacion',

    AFNAM as 'SOLPED_Solicitante',//QUIEN SOLICITO MATERIAL

    TXZ01 as 'SOLPED_TextoBreve',

    MENGE as 'SOLPED_CantSOLPED',//CANTIDAD DE SOLICITUD PEDIDO

    MEINS as 'SOLPED_UnidadMedida',

    PREIS as 'SOLPED_PrecioValor',

    BSMNG as 'SOLPED_CantPedido',//CANTIDAD PEDIDO

    RLWRT as 'SOLPED_ValorTotalLib',

    WAERS as 'SOLPED_Moneda',

    EBELP as 'SOLPED_PosPed',

    num (LIFNR) as 'SOLPED_ProvDeseado',

    MATNR as 'SOLPED_Material',

    WERKS as 'SOLPED_Centro',

    LGORT as 'SOLPED_Almacen',

    MATKL as 'SOLPED_GrupoArt',  

    LFDAT as 'SOLPED_FechaEntrega',

    FRGDT as 'SOLPED_FechaLiberacion',

    TWRKZ as 'SOLPED_FacturaParcial',

    WEPOS as 'SOLPED_EntradaMerca',

    WEUNB as 'SOLPED_EntradaMercanciaNoVal',

    REPOS as 'SOLPED_RecepcionFactura',

    EKORG as 'SOLPED_OrgCompras',

    ADRN2 as 'SOLPED_Direccion';

   

SELECT

    BANFN,

    BNFPO,

    BSART,

    BSTYP,

    LOEKZ,

    STATU,

    ESTKZ,

    FRGKZ,

    FRGZU,

    FRGST,

    EKGRP,

    ERNAM,

    ERDAT,

    AFNAM,

    TXZ01,

    MATNR,

    WERKS,

    LGORT,

    MATKL,

    MENGE,

    MEINS,

    BADAT,

    LFDAT,

    FRGDT,

    PREIS,

    TWRKZ,

    WEPOS,

    WEUNB,

    REPOS,

    LIFNR,

    EKORG,

    EBELN,

    EBELP,

    BSMNG,

    FRGGR,

    ADRN2,

    WAERS,

    RLWRT

FROM EBAN;

STORE * FROM [EBAN] INTO [LIB://DEV-QVD (prolamsa_mty_qsensespt)/EBAN.qvd];

DROP TABLE [EBAN];

MaxKeyLoad:

LOAD MAX(Num('SOLPED_FechaUltimaModificacion')) AS MaxFechaModificacion

From [LIB://DEV-QVD/EBAN.qvd];

LET MaxFechaModificacion = Peek('MaxFechaModificacion',0,MaxKeyLoad);

I need that value to do the WHERE conditional in my next script where I compare my QVD file and my SAP DB

0 Replies