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: 

material change price

Former Member
0 Kudos
92

hi all.

im facing a problem related to montly price.

i have to get the details material, plant, val class, mrp controller, profit center and 12 months price with respect to period.

i m giving the selecion screen values as 09.2005 09.2006(spmon).

i have to calculate price for 12 months (mbewh-verpr)

im passing the values to fieldcat with respect to the given period.

but im getting nil values in field cat.

how to convert the period and get the values corresponding to montly price.

also we have to check mbewh-lfmon(month) and mbewh-lfgja(year).

plz give logic or code.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
58

DATA: mon_low LIKE marv-lfmon,

yr_low LIKE marv-lfgja,

mon_high LIKE marv-lfmon,

yr_high LIKE marv-lfgja.

Kindly check the Standard program : RM07KOHDEL2

SELECT * FROM (tab_name) INTO TABLE it_mbewh "n828058

WHERE matnr IN r_matnr

AND bwkey IN r_bwkey

AND lfgja >= yr_low

AND lfgja <= yr_high

AND ( ( lfmon >= mon_low AND lfgja = yr_low ) OR

( lfmon <= 12 AND lfgja > yr_low AND lfgja < yr_high ) OR

( lfmon <= mon_high AND lfgja = yr_high ) )

ORDER BY matnr bwkey.

I hope it would solve the problem.

3 REPLIES 3

Former Member
0 Kudos
58

Hi Jay,

can u paste the code

pankaj

Former Member
0 Kudos
59

DATA: mon_low LIKE marv-lfmon,

yr_low LIKE marv-lfgja,

mon_high LIKE marv-lfmon,

yr_high LIKE marv-lfgja.

Kindly check the Standard program : RM07KOHDEL2

SELECT * FROM (tab_name) INTO TABLE it_mbewh "n828058

WHERE matnr IN r_matnr

AND bwkey IN r_bwkey

AND lfgja >= yr_low

AND lfgja <= yr_high

AND ( ( lfmon >= mon_low AND lfgja = yr_low ) OR

( lfmon <= 12 AND lfgja > yr_low AND lfgja < yr_high ) OR

( lfmon <= mon_high AND lfgja = yr_high ) )

ORDER BY matnr bwkey.

I hope it would solve the problem.

0 Kudos
58

Thks