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 know Production Order Confirmation Date?

Former Member
0 Kudos

Hi Gurus,

I have a requirement to get all the production orders that were confirmed or partically confirmed in between a date range.

How can I get them?

Please help me in this regard.

Thanks in advance.

Sankar.

1 ACCEPTED SOLUTION

former_member181962
Active Contributor
0 Kudos

Check the table AFRU field ERSDA.

the field AUERU = space for Partial confirmation

and X for Final confirmation.

Regards,

Ravi

3 REPLIES 3

Former Member
0 Kudos

Hi,

Check this sample code , hope this may be helpfull.

SELECT

a~plnbez

a~werks

a~gamng

a~gltrp

a~objnr

a~kdauf

a~kdpos

a~igmng

c~pgroup

d~land1

INTO CORRESPONDING FIELDS OF TABLE itab_orders

FROM caufv AS a

INNER JOIN mara AS b ON bmatnr = aplnbez

INNER JOIN vbpa AS d ON dvbeln = akdauf

WHERE a~gltrp IN BETWEEN s_date-low AND

s_date-high AND

d~parvw = 'WE'.

SORT itab_orders.

-


PERFORM check_status_pncf2 TABLES itab_orders.

form check_status_pncf2 tables p_itab_orders

STRUCTURE itab_orders .

DATA : w_index LIKE sy-index.

DATA : BEGIN OF itab_objnr OCCURS 0,

objnr LIKE jsto-objnr,

assb(1),

END OF itab_objnr.

DATA: itab_status LIKE jstat OCCURS 0 WITH HEADER LINE.

DATA : crs_objnr LIKE jsto-objnr.

DATA: crs_status LIKE jstat OCCURS 0 WITH HEADER LINE.

CLEAR : crs_objnr , crs_status , itab_objnr.

REFRESH : crs_status , itab_objnr.

LOOP AT p_itab_orders.

itab_objnr-objnr = p_itab_orders-objnr.

APPEND itab_objnr.

  • itab_test2-w_objnr = crs_objnr.

  • MODIFY itab_test2.

*

ENDLOOP.

<b>use : I0009 – CNF (Confirmed)

I0010 – PCNF (Partially confirmed)</b>

  • only take release production orders

CALL FUNCTION 'STATUS_CHECK_MULTI'

EXPORTING

bypass_buffer = 'X'

client = sy-mandt

status = 'I0010'

flg_exclude = space

  • IMPORTING

  • OBJECTS_DELETED =

TABLES

objects = itab_objnr.

  • itab_objnr just contains the PCNF orders now

LOOP AT itab_objnr.

READ TABLE p_itab_orders WITH KEY objnr = itab_objnr-objnr.

w_index = sy-tabix.

p_itab_orders-gamng = p_itab_orders-gamng - p_itab_orders-igmng.

MODIFY p_itab_orders INDEX w_index.

ENDLOOP.

Do the same thing for confirmed orders as well ..

Regards,

Vind.

former_member181962
Active Contributor
0 Kudos

Check the table AFRU field ERSDA.

the field AUERU = space for Partial confirmation

and X for Final confirmation.

Regards,

Ravi

Former Member
0 Kudos

Thanks Ravi for the information. My Problem is solved.