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: 

Difference between two spmon ( ie. bw two month/ year )

Former Member
0 Kudos

Dear Experts,

Please advice me how to find out difference between two SPMON ( month / year ).

I have SPMON in my selection-screen and

My requirement is :

select * from mara into table itab matnr where mtart in s_mtart.

I need to display my matnr on the basis of month and year

ie:: at new spmon display material list., so for every single month and year I need to display the entire material.

if User enter 01.2009 in spmon-low and 06.2009 in spmon-high.

I need to get : 01.2009 , 02.2009, 03.2009, 04.2009, 05.2009. these values into my internal table.

Also please advice : How to loop these material on the basis of month.

2 REPLIES 2

vallamuthu_madheswaran2
Active Contributor
0 Kudos

Can u give me ur program or internal table structure.

Thanks & Regards,

Vallamuthu.M

Former Member
0 Kudos

hi,

If your requirement is to display the materials based on their creation date, then use the field ERSDA in MARA.Based on your selection screen date fetch the entries from table MARA i.e ERSDA>=s_date-low AND ERSDA<=s_date-high.Now sort all the records based on creation date and display the materials.