Skip to Content
Former Member
May 15, 2007 at 05:12 PM

extracting data for particular month



i had a requirement where the date range was a selection parameter and accordingly i was pulling sales order using vbrk-fkdate field. this was the code i had written.

SELECT-options: p_fkdat for vbrk-fkdat obligatory ,

p_kunag for vbrk-kunag no-extension no intervals,

p_matnr for vbrp-matnr no-extension no intervals,

p_augru for vbrp-augru_auft no-extension no intervals,

p_vbeln for vbrk-vbeln no-extension no intervals.


FROM vbrk

INNER JOIN vbrp ON vbrkvbeln = vbrpvbeln

INNER JOIN kna1 ON vbrkkunag = kna1kunnr

INTO corresponding fields of TABLE itab


vbrkvbeln in p_vbeln and vbrkkunag in p_kunag and vbrpmatnr in p_matnr and vbrpaugru_auft in p_augru and vbrk~fkdat in P_fkdat .


now the functional guy needs only the month and year to be entered in selection screen, and i need to get sales order data for the months entered. ( eg aug 06 - sep 06 )

how should i modify the code.