Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Can I calculation values in a select statement ?

Former Member
0 Kudos

Hi friends,

Can I want do calculation in the select statement ? sample

SELECT * FROM VBRP INTO CORRESPONDING FIELDS OF TABLE TEMPTABLE 
   WHERE VBELN = LS_VBRP-VBELN AND 
         MVGR2 = LS_VBRP-MVGR2 AND
        *( KZWI5 / FKIMG )* = BFIYAT.

I want to calculatution process be in a select statement. How its possible ? or not

Regards

İrfan

5 REPLIES 5

b_deterd2
Active Contributor
0 Kudos

No !

JozsefSzikszai
Active Contributor
0 Kudos

I don't think this is possible. Just select everything into an internal table and do the calculation there.

Former Member
0 Kudos

Hi Irfan,

Calculation is not possible in the select statement.

You may avoid the calculation part and do the filtering after selecting the data.


SELECT * FROM VBRP INTO CORRESPONDING FIELDS OF TABLE TEMPTABLE 
   WHERE VBELN = LS_VBRP-VBELN AND 
         MVGR2 = LS_VBRP-MVGR2.

Former Member
0 Kudos

Thanks for all answers ,

I must try filter.

Former Member
0 Kudos

Hi,

Select query written is not possible.....

We can add the numeric values using COLLECT keyword..........

Other calculations are to be done only after the selection of data into an internal table.....'

Regards,

Kunjal