Application Development and Automation 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: 
Read only

CM02 function module/bapi/ run with batch-input or in background task

0 Likes
1,909

Dear Community!

I have got the request, to create a copy of CM02 and CM01, where i add 1 more column, which shows the capacity planning data of specific materials of the list seperately.

I have searched for many ways already to get the data needed, but there doesn't seem a function module, or bapi, which delivers me exactly the same data, CM02 would.

Then i found the option to export an excel from CM02... even with that solution i would be happy, to download the excel and further process that data in a costum program. But i have not found a way to call transactions CM01 & CM02 with batch-input, as the startup screen of those transactions does not seem to have a dynpro number.

I debugged the whole process, copied all CY* function modules called in it into a custom program and made it processable, but those function modules seem to have a complex framework, which only really works within the CM0x reports.

As i am not a PP-specialist, i am really struggling here...

Can anyone help me in one of the folowing problems?:

-     name me a function module, which meets my requirements

-     tell me, how i can start CM01/CM02 with batch-input exporting an excel

-     tell me the order and what it needs to make use of the CY* function modules in a custom report, CM01/CM02 are using

-     tell me how i can get the data directly from the database... i dont know the tables behind the whole capacity thing, nor the logic, how the data has to

      be fetched

-     tell me an alternative to CM02, which maybe can be processed via batch-input

since 13 years of sap, this is my first request for help in a forum at all.... but this time i am really stuck and dont know, how to proceed on ^^

thanks for answers and best regards

Mark

5 REPLIES 5
Read only

Rushikesh_Yeole
Contributor
0 Likes
1,176

I will suggest:

Take the trace ST05 for CM02 tcodes; FInd the function modules

And check where used for them and try to find standard reorts R*

Or create a custom reports; Use KBKO,KBED table for process order hours and CY*CAPACITY* FM for work centers capacity/Mater data

Read only

0 Likes
1,176

Hi,

Thanks for your reply, but i already was that far...

In order to make use of database tables and function modules, i would need some example coding, as i dont know any references within the capacity topic.

thanks and best regards

Mark

Read only

0 Likes
1,176

Every work center has its own capacity maintained in master data. FOr every production unit (Through Planned/Process/Production order)
Work center and duration required is assigned/calculated based on quantity to be produced.

Just we need to link that.

CRHH: Hiearchy Table OBJTY = H and Plant (If work center hiearchy/Pooled work center is used )

CRHS: Relation between Polled and child work center

CRHD: Work Center Header

Identify the documents affecting capacity (Planned order/Process /Production orders) in system
For every document, Get the data from KBKO you will get BEDID
Take the data from KBED table with ref to BEDID

KBED will contain hours required for every transaction

'CR_CAPACITIES_OF_WORKCENTER / CLOI_WC_CAPACITY_READ: WOrk center master data

Read only

0 Likes
1,176

Hi Rushikesh!

thanks for the summary, i understand the connections now.

what i dont really understand => don't i have to drill down on routing level in order to get all the operations and following the capacity of one specific work center?

i am a little confused right now.

thanks in advance

Mark

Read only

0 Likes
1,176

Yes...

Open transaction MD13 and check detailed scheduling Or COR3 and check operations tab

You will get work centers required and their start date and start time . (PLAF/AFKO)

Lets Say;

For X material, I have created 4 planned and 3 process orders in month with different quantities.

Based on quantity and materials and dates planned, workcenters requirement is determined.

{Refer KBKO, KBED table}

As a planner, I need to find out wheather I have sufficient work centers are available to produce?

Open any work centers through CRC3 tcode; you will get idea about capacity.

I have used FM only to find out capacity of workcenters or any master data for better accuracy.