?
Solved

Arithmatic Operation within Select Query

Posted on 2004-09-08
3
Medium Priority
?
275 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
[X]
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
3 Comments
 
LVL 1

Accepted Solution

by:
iamderek earned 500 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Read about achieving the basic levels of HRIS security in the workplace.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

752 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