06-18-2008 11:45 AM
Hi Guru,
My requirement is that I have to fetch Dmbtr field from MSEG table for the current period and movement type. But I dont have filed perios in MSEG table. But I have documnet number (MBLNR ) in MSEG. So is there any link so that I can fetch DMBTR for the particular period and movement type.
Maximum pts will be rewarded.
Thanks,
Sandeep Garg
06-18-2008 11:50 AM
Hi
Before reading the items (table MSEG) u should extract the header (MKPF) selecting for posting date: MKPF-BUDAT.
If you need to know which documents are posted in a certain period, it means to extract all documents posted in a certain range of day.
So u need to calculate the first and last day of the current period: these usually are the first and last day of the months.
So u can create a join beetween MKPF and MSEG in order to extract all items of a certain moviment type and posted in a certain period.
Max
06-18-2008 11:50 AM
Hi
Before reading the items (table MSEG) u should extract the header (MKPF) selecting for posting date: MKPF-BUDAT.
If you need to know which documents are posted in a certain period, it means to extract all documents posted in a certain range of day.
So u need to calculate the first and last day of the current period: these usually are the first and last day of the months.
So u can create a join beetween MKPF and MSEG in order to extract all items of a certain moviment type and posted in a certain period.
Max
06-18-2008 11:53 AM
pass mkpf-budat in function
' BAPI_COMPANYCODE_GET_PERIOD ' to get period.
06-18-2008 11:55 AM
06-18-2008 11:57 AM
06-18-2008 12:01 PM
hi,
check MBEW table.
field : LFMON - Current period (posting period)
reward points if hlpful.
06-18-2008 12:00 PM
hi,
u can find from table mkpf
fields - mblnr, budat,bldat
Rgds.,
subash