‎2006 Apr 13 12:46 PM
Hi All,
I am looking for a table which is having
AUFNR (Order Number ) & CHARG (Batch Number)...
Please suggest!
With regards,
Pravin
‎2006 Apr 13 12:52 PM
1. Open up another SAP Session
2. Execute transaction ST05
3. Activate SQL Trace
4. In other session lauch KO03 and go to investment tab
5. Go back to deactivate and display the SQL Trace.
All tables that the transaction has accessed should be displayed in order that they were accessed. Therefore the table you need should be close to the end. Start looking through this table list to find the correct table.
check aufk table
‎2006 Apr 13 1:05 PM
Hi Kishan,
Thanks for your valuable information.
my problem is that i know the tables but i am unable to find a perfact table in which there is data is populated related with Order and Batch number. I tried with rseb, afpo, mcha, mch1.
If you have any other idea please suggest me.
With regards,
Pravin
‎2006 Apr 13 2:28 PM
Hi Pravin,
The production order item table AFPO will have the batch number in case if it is already assigned in the order when it is created OR changed (CO01/CO02).
But in case if you are looking for what batches have been used against which production order confirmations say transactions co11 or co19, then, you can have a look at table AFRU. This table will hold the confirmations that are complete in terms of date time and confirmed and scrap quantities. The batch, components and the movement types etc. which will have the details of the articles consumed and the batch and quantity etc. is AUFM. So there will be a link between AFRU and AUFM
This will exclude all the confirmations which are failed i.e. what you find in the transaction code COGI.
For that you will have to link tables AFVV, AFWI & MSEG to get the details of the batches for the failed goods movement(s).
Hope this is what you are looking for and it helps you.
regards,
Satya
‎2006 Apr 13 1:22 PM
Hi Pravin,
You need to join this tables <b>MSEG</b> and <b>AFPO</b> on field AUFNR, MATNR and WERK. Then you will get field AUFNR and CHARG from MSEG.
You can code something like this.
select * from mseg
into corresponding fields of table i_mseg
where mseg~aufnr = afpo-aufnr
and mseg~matnr = afpo-matnr
and mseg~werks = afpo-dwerk.
Hope this will help.
Regards,
Ferry Lianto