Quantcast
Channel: SCN : Unanswered Discussions - SAP HANA and In-Memory Computing
Viewing all articles
Browse latest Browse all 4343

How to loop over HANA view result and modify values of some column

$
0
0

Dear All, Could anybody help this? we have our Good movement data in standard table MSEG/MKPF, we created ANA view "P1"."ZMSEG" to get our field, such as Material document number, material, quantity from MSEG, and posting date from MKPF. Now we have to get standard price(at the posting date) of the related material from MBEW/MBEWH, data like below, "P1"."ZMSEG" -------------------------------------------------- doc.no.  material  quantity month( from posting date) 1            MM01    10        201501 2            MM02    11        201501 3            MM03      12       201501 MBEW----latest price since last change -------------------------------------------------- Material    standard price MM01      10.23                                MM02      17.99 MM03      18.99 --------------------------------------------------- MBEW----change history MM01    201502    11.12                ----price at change time                                MM01    201501    12.45 MM02    201412    20.44 MM03    201504    15.00 MM03    201412    12.00 for MM01, since there is an entry in MBEWH, we can use it directly, for MM02, last change is 201412, 201501 price is in MBEW, for MM03, last change happened in 201504, since 201501 less than 201504 and bigger than 201412, price is 15.00. the expect result is like below, doc.no.  material  quantity month    standard price 1            MM01    10        201501  12.45 2            MM02    11        201501  17.99 3            MM03    12        201501  15.00 How to achieve this in CAL View? Regards, Shidong


Viewing all articles
Browse latest Browse all 4343

Trending Articles