Application Development 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: 

BAPI/Function Module for CA02 - Change Routing

Former Member
0 Kudos

Dear Experts,

I have an requirement to do material assignment for an existing Group Number like we do manually with t-code CA02.

Can anybody know any BAPI/FM that can do Material Assignment in CA02 transaction?

Regards,

Rick

26 REPLIES 26

Flavio
Active Contributor
0 Kudos

Hi Rick,

To change a Routing, just give a look at the following, very interesting, note: 488765 - 'Do it yourself EWB programming'.

It allows routing update, adding / changing data where needed.

Hope this could help. If you need any further hint, feel free to ask.

Bye,

Flavio

Former Member
0 Kudos

Hi Flavio,

Thanks for your response.

Just need one clarification, i went through the note & found the sample program Z_SIMPLE_EWB in the correction instruction.

Do I have to implement the note in SNOTE T-CODE or

Can I only create my program by referring to the demo program.

Please clarify this doubt.

Flavio
Active Contributor
0 Kudos

Hi Rick,

Just write your own program, based on your actual needs, having as reference the sample program contained in the note.

Good luck!

Bye,

Flavio

Former Member
0 Kudos

Thanks a lot. I created my own program for material allocation in CA02 & its working fine........

That note was very helpful.....

Regards,

Rick

VijayasekarK
Active Participant
0 Kudos

HI Manoj,

We are also looking for a solution to mass change of PP routing via program.

Good to know that you have done it using EWB.

Let me try.....

Thanks,

Vijay

Former Member
0 Kudos

Hi Vijay,

You just read the correction instructions of the sap note 488765.

SAP has provided one reference program. As per your requirement, you need to call the proper APIs in your program.

If need any clarifications, plz contact me.

Regards,

Manoj

Former Member
0 Kudos

Hi Manoj,

my requirement is to re-assign BOM components to operations of routings. The Z_SIMPLE_EWB does not show how to to load the internal EWB buffer for that. I had attempts over days without success. Do you have any experience on that?

I don't know how to contact you.

Thanks

Werner 

Former Member
0 Kudos

Hi Guys,

             I want change  Component Allocation that assign each component by operation through EWB Workbench, Does anyone have sample code for Material Allocation change ?

Former Member
0 Kudos

Hi Manoj,

I recently got a similar kind of requirement but in component allocation.

my requirement is:

go to operation

then click on compAlloc

Then add operation for a particular component. I tried passing component value in 'CP_CL_S_OPR_CHANGE' followed by CP_CC_S_SAVE but its not getting updated in CA02. Can you please help me on this.

0 Kudos

Hi Nabanita ,

                    Plz send me a message, I have the Soln ... with EWB reg component allocaction.


0 Kudos

Hi Ritesh,

I'm on the same way. I implemented a couple of functions using EWB BAPIs, such as adding and deleting operations in routings. Even deleting component assignments to operations works fine.

But I'm not able to assign components to specific operations. I tried BAPIs CM_CL_S_COM_CHANGE as well as CP_CC_S_CREATE_COM, having prepared the storage environment by CP_CC_S_COMPLEX_OPR.

Could you help me on this? Thanks a lot in advance.

0 Kudos

This message was moderated.

0 Kudos

Hi Ritesh,

thank you so much. This was one of the most beautiful recommendations, I ever got. I will get a prophet for using those EWB function groups. But I also will urge to be too early too optimistic in succeeding with that.

Thanks again.

Werner

0 Kudos

To Everyone who wants to assign components to operations using FM:

Please follow Ritesh's recommendation. It works fine for components of the unexploded BOM.

Now I have to assign subsequent components of phantom assemblies within the routing (as CA02 works). I did not succeed on Ritesh's great suggestion until now. Perhaps anyone has a way to solve that. But I have a new idea how it could work:

Ritesh's calls of CZ_CL_S_MTK_PROVIDE and CP_CC_S_PROVIDE_COM_BY_OPR may be replaced by calling CM_CL_S_COM_HANDLE_PROVIDE, which seems to provide all handles (incl. P-A assignments) of a routing's component allocation. In a subsequent loop I will try to collect the COM allocations themselves by CM_CL_S_COM_PROVIDE_BY_HANDLE.

If this works (I will do that within the next 2 weeks) we should be able to reassign on basis of Ritesh's solution.

Werner

0 Kudos

Hi Werner,

Did you try it? I have same scenario like yours and can't use BAPI_ROUTING_PROCESS.

Cenk

0 Kudos

Why Moderator has hidden MY Post !!! Why ??

Thanks,

Ritesh

matt
Active Contributor
0 Kudos

Presumably a moderator found something amiss with it. Or someone reported it, and a moderator agreed.

You will have received notification in your communication stream, which should explain what the issue was.

Things don't get rejected for no reason. However, I note that this was a while ago, so it'll be kind of difficult to find out now. Do you remember the content?

0 Kudos

I'm curious about Ritesh's reply.

0 Kudos

I don't know what Ritesh has posted here but I have done the components allocation using EWB FMs. I'll try to post link to the solution today but I need to do some comments before to give clear info what is happenning there.


Regards

Lukasz


0 Kudos

Hi Cenk,

no, I didn't succeed in that. Finally the customer abstained from that function.

Werner

0 Kudos

Yes, I ask too: Why did they remove Ritesh's posting? It was really helpful in many ways for everyone who uses EWB development objects. SAP propagates this package and I wonder why helpful hints disappear.

If a moderator found something, he should offer an alternative. This is important stuff. Each hint is helpful - in particular that which Ritesh provided.

Werner

0 Kudos

As promised, here is the link to the example code. You can find there a nugg file also.

ABAP Blog - EWB Components allocation to routing operation (multilevel BOM)

If you'll find any error there please let me know.

Regards

Lukasz

0 Kudos

Thank you very much. That was really good.

matt
Active Contributor
0 Kudos

As  said, Ritesh should have received notification of the issue. Only he and the moderator who rejected it know why it was rejected.

Former Member
0 Kudos

This message was moderated.

former_member814779
Discoverer
0 Kudos

How did you solve it? Do you have any working example?