Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
nickjose7
Creator
Creator

How to write an OpenSQL statement in QlikView?

mbaeyenskush141087its.anandrjsantoniotimanloveisfailserj_shu

Hi All,

Can someone please help me create a single query using sub select etc to fetch data from SAP tables as per below logic:

Step  1 - Extract EBELN (Purchase Orders) and LIFNR (Vendor Number) from EKKO Table

Where

'BSART'= 'ZILP' and KDATB <=Today and KDATE >=Today

Step 2 - Pass PO (EBELN) from step no. 1 in table EKPO and fetch PO (EBELN), MATNR (Material Number), item number (EBELP) and MEINS (Order Unit)

where LOKEZ >< 'L' or 'S'  and  ELIKZ >< 'X'

Step 3 - Use Table MAKT and pass the Material Number (MATNR) from step  2, to fetch MAKTX (Material description)

where SPRAS = "EN"

Step 4 - Use Table EKET and pass PO (EBELN) and  item number (EBELP) from step 2 to extract Delivery date (EINDT) and Scheduled Quantity (MENGE)

Why I want a single query - because if run separately there is huge data in these tables which is not required in the report and reload time is approx 1 hour if all 4 run in parallel.

Have seen sub select but not able to make it work in my case for a single query. Would request if you can create an optimised query for this.

Thanks

Nick

Labels (1)
1 Reply
nickjose7
Creator
Creator
Author

hicswr

Hi Henric/Stefan,

Since I couldn't get any response on my query, would you mind sharing a solution for my problem listed above.

Thanks

Nick