05-03-2010 10:16 AM
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.
05-03-2010 10:49 AM
Can u give me ur program or internal table structure.
Thanks & Regards,
Vallamuthu.M
05-03-2010 10:56 AM
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.