Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Table For Material Document

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

6 REPLIES 6

Former Member
0 Kudos

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

Former Member
0 Kudos

pass mkpf-budat in function

' BAPI_COMPANYCODE_GET_PERIOD ' to get period.

Former Member
0 Kudos

Hi,

MKPF is the table for material document.

Regards,

Sharath

0 Kudos

Hi,

MKPF we have date not the period ( month and year ).

0 Kudos

hi,

check MBEW table.

field : LFMON - Current period (posting period)

reward points if hlpful.

Former Member
0 Kudos

hi,

u can find from table mkpf

fields - mblnr, budat,bldat

Rgds.,

subash