cancel
Showing results for 
Search instead for 
Did you mean: 

PRODUCTION ORDER DETAILS ON THE BASIS OF WORK CENTER

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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





Answers (2)

Answers (2)

Former Member
0 Kudos

hi,

Tables : CRHD-ARBID,

             AFVC-AUFPL

             AFKO-MATNR,AFKO-AUFNR.

Former Member
0 Kudos

Hello Dhivya,

There is no field in CRHD like ARBID.

Former Member
0 Kudos

Take ARBID from table afvc and pass it to crhd-objid.

Caetano
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello

Why do you need to create a custom report? Try transaction COOIS which can show production orders using the work center and material as a selection criteria.

Regards

Caetano

Former Member
0 Kudos

Hi Caetano,

There is a requirement for some specific client because there is some custom development needed.

so, I do not have to use COOIS.

is there any table relationship between both the fields.

pls help.

Caetano
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Vinay

With a quick search on google I could find the following document:

Here, the relationship of all the PP-SFC tables is described. I suggest you to make a more detailed research before opening a thread here in the future.

See the following blog for more details:

Regards

Caetnao