Hi Folks,
In my selection screen iam selecting range of posting period(YYYYMM).i want to fetch the document no(belnr) from bkpf, in bkpf v dnt have posting period field so v have to take year in gjahr and month in monat.so for year and month im taking range tables and the my code is as follows..
{
IF NOT s_period[] IS INITIAL.
LOOP AT s_period.
*Year
r_gjahr-sign = s_period-sign.
r_gjahr-option = s_period-option.
r_gjahr-low = s_period-low+0(4).
r_gjahr-high = s_period-high+0(4).
APPEND r_gjahr. CLEAR r_gjahr.
Month
r_monat-sign = s_period-sign.
r_monat-option = s_period-option.
r_monat-low = s_period-low+4(2).
r_monat-high = s_period-high+4(2).
APPEND r_monat. CLEAR r_monat.
CLEAR s_period.
ENDLOOP.
ENDIF.
Get the Accounting Doc
SELECT belnr FROM bkpf INTO TABLE gt_bkpf WHERE bukrs = p_bukrs AND
gjahr IN r_gjahr AND
monat IN r_monat.
}
but i want as for example in selection screen if 200904 201002
it has to fetch the document numbers between apr01 2009 to feb 28 2010.
how can i achieve this please give some inputs <removed by moderator>
Thanks
Edited by: Thomas Zloch on May 11, 2010 7:49 AM