Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Arithmatic Operation within Select Query

Posted on 2004-09-08
3
271 Views
Last Modified: 2013-12-08
Hi abapers,
            I want to write a query like this.
 
data: pday type i. *(contains some day value).
*AB contains date value
Select AB from tabname where sy-datum - AB >= pday.

but system is not allowing me to subtract AB from sy-datum within the Select statement.

I don't want to write a subquery..

Please help me it is urgent..
0
Comment
Question by:yuve
3 Comments
 
LVL 1

Accepted Solution

by:
iamderek earned 125 total points
ID: 12065961
Rephase your code like this:

data: pday type i. *(contains some day value)
data pdate type d.

*AB contains date value
pdate = sy-datum - pday.
Select AB from tabname where AB <= pdate.

Derek
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Cognos 10 copy report page 2 788
Full list of TCodes in SAP ABAP 2 194
Current Enterprise solutions aginst Ransomware 4 200
CRM 2011 Deployment Package 2 160
Salesforce.com’s Console is a great tool to view activities, leads, contacts, accounts and opportunities all in one screen. It is particularly effective during call blocks and working numerous activities at a time in a quick, repetitive fashion (suc…
Messaging apps are amazing tools with the power to do a lot of good, but the truth is the process of collaborating with coworkers requires relationships established through meaningful communication - the kind of communication that only happens face-…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question