Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 9057

dynamic select

$
0
0

hi expert.

i have one big problem.

i want to get sum from table cosp by some strange statement.

when my perdio is 1 i want to get sum from wtg001

when period is 2 i want to get sum from wtg002

.....wtg012.

is it possible to have dynamic select  like this:

SELECT

SUM( distinct wtg0xy )   as ZWTG001_110010

cosp~kstar as kstar csku~ltext as ltext

INTO

   corresponding fields of tABLE IT_TMP?????

thanks for your advise


Viewing all articles
Browse latest Browse all 9057