Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
MattNatz
Contributor
Contributor

Prefilter SAP BexConnector in Load Script

I have recently connected to our SAP system and am using the BexConnector for one of the first times, the issue I am running into is that when I am trying to pull from a query it is trying to pull to much data and it errors out. 

Is there a way in the loading script below that I could preset a filter to a "Where AS" the calendar/monthyear is set to a specific timeframe?

Any insight or help on this would be greatly appreciated.

Thank you,

Matt

 

LIB CONNECT TO 'SapBEx_SAPP92ASXXXXX;

[P_VKASLNM02_Q0001]:
LOAD
[MATNR_APP] as [Product],
[ZAP_SHT] as [Customer (Ship-to)],
[ZAP_WSP1] as [WH Ship-to],
[ZASL_DINF] as [Direct/Indirect],
[ZCR_CNTRT] as [Contract GPO],
[0CALMONTH] as [Calendar Year/Month],
[6H8F1RDH7OGDTT3576KZI36QP] as [Contract Sales],
[70EYDR0TK44F4CQ743YP2ZZ6P] as [Unit Sales],
[CURRENCY005] as [CURRENCY005 Contract Sales],
[UNIT005] as [UNIT005 Contract Sales],
[CURRENCY014] as [CURRENCY014 Unit Sales],
[UNIT014] as [UNIT014 Unit Sales],
[MATNR_APP__TEXT] as [Product TEXT],
[ZAP_SHT__TEXT] as [Customer (Ship-to) TEXT],
[ZAP_WSP1__TEXT] as [WH Ship-to TEXT],
[ZASL_DINF__TEXT] as [Direct/Indirect TEXT],
[ZCR_CNTRT__TEXT] as [Contract GPO TEXT],
[0CALMONTH__TEXT] as [Calendar Year/Month TEXT];

SELECT [P_VKASLNM02_Q0001]
DIMENSIONS (
[MATNR_APP], //Product
[ZAP_SHT], //Customer (Ship-to)
[ZAP_WSP1], //WH Ship-to
[ZASL_DINF], //Direct/Indirect
[ZCR_CNTRT], //Contract GPO
[0CALMONTH], //Calendar Year/Month
)
MEASURES (
[6H8F1RDH7OGDTT3576KZI36QP], //Contract Sales
[70EYDR0TK44F4CQ743YP2ZZ6P], //Unit Sales
)
UNITS (
[CURRENCY005.6H8F1RDH7OGDTT3576KZI36QP], //CURRENCY005 Contract Sales
[UNIT005.6H8F1RDH7OGDTT3576KZI36QP], //UNIT005 Contract Sales
[CURRENCY014.70EYDR0TK44F4CQ743YP2ZZ6P], //CURRENCY014 Unit Sales
[UNIT014.70EYDR0TK44F4CQ743YP2ZZ6P], //UNIT014 Unit Sales
)

FROM [VKASLNM02];
// STORE * FROM [P_VKASLNM02_Q0001] INTO [LIB://FolderConnection/P_VKASLNM02_Q0001.qvd];
// DROP TABLE [P_VKASLNM02_Q0001];

Store IDNData into [Lib://QVD Storage (kabi_skirer)/IDN_SAP_Data.QVD] (qvd);

Labels (6)
0 Replies