cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the Base quantity for a given production orders?

Former Member
0 Kudos

Hi ALL,

From the production order t-code CO02/CO03, I have a requirement to pull the base quantity from the

Operations details screen. Any ideas how to pull this value? My requirement is to pull this Base quantity value for a given order number and put it in a separate flat file and download the file to local disk. I am writing a new program to do this.

Here is the path:

T-code : co02/co03 Enter production order number . This will take to the header screen

Then click on the operation overview icon on the toolbar.

Then double click on one of the line items. This will take to the operations details screen.

Then click on standardVals tab. There is a base quantity.

Thanks for all the great help,

Sobhan.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sobhan,

AFVV is a transparent table with description "DB structure of the quantities/dates/values in the operation" with key field as AUFPL (Routing number for operations in the order). SO once you have the routing #(AUFPL) from table AFKO (Order header data PP orders), retrieve AFVV-BMSCH field from AFVV tbl based on AFKO-AUFPL field value. Both AFKO and AFVV are transparent tables.

Hope it clarifies.

Do let me know in case of any concern

Cheers,

Vikram

Pls reward helpful answers!!

Former Member
0 Kudos

Hi Vikram,

You are correct. Thanks a lot for the great help.

Thanks,

Sobhan.

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Here is a code sample.



report zrich_0002 no standard page heading.

data: begin of iaf occurs 0,
      aufnr type afko-aufnr,
      aufpl type afvv-aufpl,
      bmsch type afvv-bmsch,
      end of iaf.

parameters: p_aufnr type afko-aufnr.

select afko~aufnr afvv~aufpl afvv~bmsch
         into corresponding fields of table iaf
               from afko
                   inner join afvv
                       on afko~aufpl = afvv~aufpl
                              where aufnr = p_aufnr.

loop at iaf.
  write:/ iaf-aufnr, iaf-aufpl, iaf-bmsch.
endloop.

Regards,

RIch Heilman

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sobhan,

You have Production Order #(Field AUFNR).Search in Table AFKO for value of the field Routing # (AUFPL). Now Search in table AFW for field Base value (BMSCH) based on AFKO-AUFPL field.

Hope your query is answered.

Cheers,

Vikram

Pls reward points for helpful replies.

Former Member
0 Kudos

hi Sobhan,

the below mentioned ones are the tables associated with the same

<b>AFKO</b> Production Order Header

<b>AFPO</b> Production Order Position (details)

<b>MAST</b> Material BOM

<b>STKO</b> BOM Header

<b>STPO</b> BOM Positions (detail)

<b>MAPL</b> Assignment fo Task Lists to Materials

<b>PLKO</b> Routing Group Header

<b>PLSO</b> Routing Group Sequence

<b>PLPO</b> Routing Group Operations

Regards,

Santosh

Former Member
0 Kudos

Hi Vikram,

Thanks for your solution. AFVV is a structure not a table. I am writing a small new program. I am not sure how I can get BMSCH from AFVV based on routing #(AUFPL) from table AFKL. Can you tell me how I can get BMSCH from AFVV?

Thanks,

Sobhan.

former_member181966
Active Contributor
0 Kudos

You need to read table :CAUFV,AFPO, AFKO ,afru....

Also check the tables link:

http://www.sapgenie.com/abap/tables_pp.htm

Hope this’ll give you idea!!

<b>P.S award the points.</b>

Good luck

Thanks

Saquib Khan

"Some are wise and some are otherwise"