‎2008 Jun 18 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
‎2008 Jun 18 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
‎2008 Jun 18 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
‎2008 Jun 18 11:53 AM
pass mkpf-budat in function
' BAPI_COMPANYCODE_GET_PERIOD ' to get period.
‎2008 Jun 18 11:55 AM
‎2008 Jun 18 11:57 AM
‎2008 Jun 18 12:01 PM
hi,
check MBEW table.
field : LFMON - Current period (posting period)
reward points if hlpful.
‎2008 Jun 18 12:00 PM
hi,
u can find from table mkpf
fields - mblnr, budat,bldat
Rgds.,
subash