08-05-2005 11:06 PM
Hi Experts,
Currently my ABAP query is pulling data from the tables EKPO and MARA using JOIN. The requirement is to select rows only within a PARTICULAR date range. The date range I have to enter on the selection screen of the query.
I have to add the date range field on the selection screen also.
Is it possible to do it in the ABAP query? If so how can we do that?
Thanks for the great help,
Sobhan.
08-05-2005 11:24 PM
Hi
YOu mean SAP Query?? i.e. SQ01 transaction..
if yes then create a query in SQ01 and mapp the fields for selection...during mapping you need to select the date which you want on selection screen of query report..
Thanks
balu
08-06-2005 1:21 AM
If by query, you mean, an SQ01 query, then refer to the above post. It is very easy to include your date into the selection screen.
If by query, you mean an ABAP report which you are coding in SE38. All you need to do is to create you selection screen by using the SELECT-OPTIONS statement.
SELECT-OPTIONS: s_datum for sy-datum.
Then in your where clause of your select statement say...
WHERE SOME_DATE in s_datum.
Regards,
Rich Heilman
08-06-2005 1:05 PM
Balu,
Yes, it is SAP Query. Thanks for the help. Can you point me to some documentation for SAP Query SQ01? As you know this tool is used by functional consultants. I dont know how to map also. I am working on 4.6c.
Thanks,
Sobhan.
08-07-2005 8:53 AM
08-08-2005 4:53 AM
08-06-2005 11:49 AM
Yes sobhan,
You can do that by using select options statement in the ABAP.
For example
You can use the select options statement for date range as
SELECT-OPTIONS: v_date for SY-DATUM.
And the about variable v_date can be used as
SELECT <some fields>
FROM (EKKO AS A INNER JOIN EKPO AS B
ON AEBELN = BEBELN)
INNER JOIN EKET AS C
ON AEBELN = CEBELN
AND BEBELP = CEBELP
INTO TABLE ITAB
WHERE <date field> in v_date.
Here I have used inner join to join 3 table. You can use simple join statement to join 2 tables.
Hope it helps
Regards,
Prasasd.
08-19-2005 10:50 AM
Dear ABAPers ,
I am Chandra shekar I newly joined into this SDNetwork,
I am working On Automation employ vendor creation.Means if they create employ in employ master automatically it has to create vendor throw FK01 with same employ number.
I am using Standard tcode PRAA But it is creating using XK01. So plz can you help me
with regards
Chandru
08-19-2005 11:47 AM
Hi,
In SQ01 change mode you can see the title, format... Press next button (Select Field Group) -> Next (select field ) - > NEXT ( Selection fields ) . In this screen select the data range ( for example select ERSDA - material creation date ) then it will come come automatically to the selection screen.
One more method also , in the infoset we can define the date range and the relevant coding in the extras.
Hope this will work.
Cheers
Sasi