Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
mbaeyens kush141087 its.anandrjs antoniotiman loveisfail serj_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