Application Development and Automation 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: 
Read only

Production Orders

Former Member
0 Likes
504

How do I get the latest production orders for the whole work week except for the current week. I'm looking at table afpo, afko, mseg and mkpf.

How do I get the latest production orders for the whole work week except for the current week. I'm looking at table afpo, afko, mseg and mkpf.

2 REPLIES 2
Read only

Former Member
0 Likes
465

put like this

  select afru~wablnr as mblnr          "Material Doc. no.
         afru~werks                    "Plant
         afru~aufnr                    "Order no.
         afru~iedd  as budat           "Order Posting Date
         afru~budat                    "Order Posting Date
         afru~lmnga
         afru~stokz
         afru~vornr
         afpo~matnr                    "Material no.
         afpo~wemng                    "Net.QTY "Prabhu 5.5.5.
    into corresponding fields of table t_fert
    from afru
    inner join afpo
      on   afru~aufnr = afpo~aufnr
    where  afru~budat  in s_budat
    and    afru~werks  in r_werks
    and    afru~wablnr ne space
    and    afru~stokz  ne 'X'           "Document not cancelled
    and    afru~stzhl  = '00000000'
    and    afpo~matnr  in s_matnr
    and    afpo~pwerk  in r_werks. "Prabhu On 1.1.2005

Regards

Prabhu

Read only

Former Member
0 Likes
465

You can get the confirmed latest orders in AFRU table.Sort the resuts by RMZHL descending.