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: 

inner join and sum menge (mseg,mkpf)

Former Member
0 Kudos

hi,

select mseg~mblnr mseg~mjahr sum( mseg~menge ) mkpf~budat from mseg inner join mkpf
  ON mseg~MBLNR EQ mkpf~MBLNR and mseg~MJAHR EQ mkpf~MJAHR into corresponding
  fields of table it_mseg1 where matnr eq it_final-idnrk
                             and lifnr in s_lifnr and werks in s_werks
                             and budat in s_budat group by mkpf~mjahr.

The above query is not working.

suggest some ideas.

with regards,

Bathri..

2 REPLIES 2

Former Member
0 Kudos

Instead of using inner join on mkpf and mseg u can use the view WB2_V_MKPF_MSEG2.

check the data u r making the selection on whether it exists or not.

Former Member
0 Kudos

answered