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: 

How to get material's last posting date of issuing to production order?

Former Member
0 Kudos

Hi,

In my scenario, I need to get material's last posting date of issuing to production order (e.g. mov. typ. 261).

I tried to select the material documents whose movement type is 261, and restrict the posting date from month to month each time, until the first material document is selected.

But this method seems quite inefficient.

What kind of algorithm is more effient to do this?

Thanks

Wesley

2 REPLIES 2

Former Member
0 Kudos

Hi,

select max( budat )

from mkpf

into gv_budat

where mblnr in ( select mblnr

from aufm

where aufnr = gv_aufnr "(Prod. Order)

and matnr = gv_matnr "(Issued Material)

and bwart = '261' ).

Edited by: Azeem Ahmed Matte on Mar 12, 2010 12:33 PM

Former Member
0 Kudos

Thanks, Azeem.

Our users only enter material no. instead of production order no.

But the 'MAX' function is quite useful.

Now I can set the code.