Application Development and Automation 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: 
Read only

Can I calculation values in a select statement ?

Former Member
0 Likes
958

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

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
Read only

b_deterd2
Active Contributor
0 Likes
914

No !

Read only

JozsefSzikszai
Active Contributor
0 Likes
914

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

Read only

Former Member
0 Likes
914

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.

Read only

Former Member
0 Likes
914

Thanks for all answers ,

I must try filter.

Read only

Former Member
0 Likes
914

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