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: 

BAPI for CA02

Former Member
0 Kudos
4,583

Hi Everyone,

Please suggest a BAPI/FM for the transaction CA02 that can update/create/delete the operations, sequences, OD rule and PRT for the given material and plant combination.

13 REPLIES 13

SwadhinGhatuary
Active Contributor
0 Kudos
2,001

Hi Praveen,

check BAPI_ROUTING_CHANGE.

0 Kudos
2,001

Hi Swadhin,

The BAPI 'BAPI_ROUTING_CHANGE' is not available in the system.

Ankit_Maskara
Product and Topic Expert
Product and Topic Expert
0 Kudos
2,001

Hello Praveen,

The general way to find BAPI for any transaction code is -

1. Run the T-code. In menu, Go to System->Status.

2. Copy the Standard Program name(here SAPLCPDI)

3. Open this program in SE80 and get the Pacakge(here CP)

4. Go to SE37 and Press F4 on Function Module Name(Enter the package CP and function module name as BAPI*).

Result is you will get a list of BAPIs. Now read their documentation and test and use.

BR.

0 Kudos
2,001

Hi Ankit,

Thanks for the information but unfortunately this will not serve my purpose. I need a BAPI/FM that cann update change delete the operations, sequences, OD rules and PRT's. I have nothing to do with the routing, I will not be making any changes at the routing level.

0 Kudos
2,001

Hi,

I was trying to change the same using EWB programming getting the help from SCN but was unsuccessful, and due to time constraints went back to the BDC program.

There are standard programs RCPTRA01 , which can help you, or do the recording using SHDB as per your requirement.

Hope this helps.

Ankit_Maskara
Product and Topic Expert
Product and Topic Expert
0 Kudos
2,001

Hello Praveen,

In that case, give me some time and meanwhile let's wait for input from other experts.

BR.

0 Kudos
2,001

Hi Praveen,

Try to solve doing BDC CA02.

Regards,

0 Kudos
2,001

EWB or CEWB function modules are very powerful, but you always need some time at the beginning to figure how they are working, sometimes debugging CEWB is very helpful here. But for sure it will take longer to create what Praveen need if you don't know them than using BDC.

0 Kudos
2,001

Hi Lukasz,

I saw your code on ABAPBLOG I understood a little bit of it but I am still not that clear on using the EWB FM's. can you please give me an example of deleting the operation in the sequence

2,001

Sorry but I don't have running example at the moment but for deleting I'd use CP_CC_S_DELETE_BY_OPR, but firstly as in my examples you need to load task list to memory using CP_CC_S_LOAD_COMPLEX_BY_TSK , then you need to get operation data using  CP_CC_S_PROVIDE_COM_BY_OPR and then loop on the result table and delete operation(s). At the end CP_CC_S_SAVE.

Flavio
Active Contributor
0 Kudos
2,001

Hi Praveen,

Please have a look at SAP Note 488765  'Do-it-yourself EWB programming'.

It's very useful and comes with very clear code examples.

Hope this could help.

Thanks and bye,

Flavio

Former Member
0 Kudos
2,001

Hello Everyone,

Thank you all for the helpful tips. Finally I fixed it by myself using EWB FM's.

Thank you,

Praveen kumar.

0 Kudos
2,001

How did you solved it. Do you have any working example