Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

PRODUCTION ORDER DETAILS ON THE BASIS OF WORK CENTER

Hi,

I have to create a custom report In which selection criteria are Work Center and material.

On the basis of  work center and material I have to get details of all production order for that material.

Is their and table relations.

pls help.

thanks.

Tags:
Former Member
Former Member replied

Thanks every one.

Now I got it.

******get objid on the basis of work center***********
   SELECT  * FROM crhd INTO TABLE it_crhd WHERE arbpl IN s_arbpl.

   IF it_crhd IS NOT INITIAL.
***********************get Aufpl from AFVC table************************************
     SELECT  * FROM afvc INTO TABLE it_afvc FOR ALL ENTRIES IN it_crhd
                                            WHERE arbid EQ it_crhd-objid.
********************get Aufnr (production order ) on the basis of Aufpl**********************************
     SELECT * FROM afko INTO TABLE it_afko FOR ALL ENTRIES IN it_afvc
                                           WHERE aufpl EQ it_afvc-aufpl.
   ENDIF.





Second Answer


SELECT aufnr INTO v_aufnr

                        FROM afko INNER JOIN afvc

                        ON afko-aufpl = afvc-aufpl

                        INNER JOIN crhd

                        ON afvc-arbid = crhd-objid

                        WHERE crhd~OBJTY = 'A' .

table used AFKO, AFVC & CRHD





1 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question