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

Unable to Reassign Function Module to New Function Group

Former Member
0 Likes
7,280

Dear All,

I am trying to reassign my Z Function Module to a Z Function Group. Both are activated in SAP.

However whenever i try to reassign it, i am getting the error i.e.

"Object component locked in different tasks" or "The requested object is locked by another transaction"

Please help me to resolve this issue. What should i do extra to avoid this and will be able to successfully reassign my ZFM to another ZFG.

I dont want to delete my FM and redevelop it again.

Dear All,

I am trying to reassign my Z Function Module to a Z Function Group. Both are activated in SAP.

However whenever i try to reassign it, i am getting the error i.e.

"Object component locked in different tasks" or "The requested object is locked by another transaction"

Please help me to resolve this issue. What should i do extra to avoid this and will be able to successfully reassign my ZFM to another ZFG.

I dont want to delete my FM and redevelop it again.

29 REPLIES 29
Read only

Former Member
0 Likes
6,391

Hi ,

Pls try to remove transport request and assign it to other function group.

Thanks,

Chandra

Read only

0 Likes
6,391

I did that too... i.e. removed the object from transport request... then  when i try to reassign the FM again, it asks me a new request but again throws that error.

Read only

0 Likes
6,391

Hi,

Pls copy function module local function module and delete original and again create from local to original for different function group .

Thanks,

Chandra

Read only

0 Likes
6,391

Hi Suruchi,

First check the list of dependencies of the FM. That means you need to use the 'Where Used List' option and check out the programs in which the FM is called.

Then remove the linkages from all the corresponding programs i.e. comment this FM temporarily.

Finally, check the versions of the FM to get a list of the Transport requests associated with the FM.

Hope this helps.

Regards,

Pranav.

Read only

0 Likes
6,391

I just created a new FG and a new FM for it.... when i tried to assign this FM to new FG, i still got the error i.e. the Object is locked by another transaction.

I removed it from transport request too but again the same error

Read only

0 Likes
6,391

it is not a transport issue, the function module needs to be disconnected from the function group and connected to another.

Read only

matt
Active Contributor
0 Likes
6,391

You are wrong. It is EXACTLY a transport issue. The word "task" in message

Object component locked in different tasks

means a CTS transport request task. The problem the OP is having is that because his source or destination function group are locked against a different transport.

Read only

Former Member
0 Likes
6,391

HI

This could easily happen if the function group already existed before you created the function module. You could create a function module and add it to a transport request, someone else could modify another function module in the same function group and add that change into another transport request. This is why you get the "objects locked in another task" message.

Your FG  is locked by any transport Request thats why you are getting this error.

Find out the modifiable requests of the tasks locking parts of this FG and merge them in SE10. You have to become owner of all of them for that.

Read only

0 Likes
6,391

I just created a new FG and a new FM for it.... when i tried to assign this FM to new FG, i still got the error i.e. the Object is locked by another transaction.

I removed it from transport request too but again the same error

Read only

Former Member
0 Likes
6,391

Hi Suruchi,

First you check that Object component locked in which task  , get that TR and include same TR to your FM TR .

Then try to check TR  , then u can release.

Otherwise U can do 1 more thing go to function group make some changes to text and when its ask for TR give ur TR which u have use for function module .

then activate FM and FG.

Hope this will help you ....

Regards,

Yukti

Read only

Former Member
0 Likes
6,391

Can you paste ur error screen ... May be it will help us to identify the issue

Read only

0 Likes
6,391

I am sharing 2 errors on 2 different SAP Servers

Read only

0 Likes
6,391

Hi Suruchi,

Just wanted you to check.

Please create 1 new FG and New FM.

Manual Copy paste the code of FM to new FM.

Now try to activate .... Pls use manual creation of FM and FG don't use copy .

Let me know .

Waiting for your input .

Yukti

Read only

0 Likes
6,391

Yes i did that. I created a New FG say ztest_sur and a new FM in it i.e. ztest and activated it.

Now i need to assign this FM ztest to another FG suppose z_test_sur1(This Fg already exists).

And it is throwing which i shared earlier

Read only

0 Likes
6,391

Suruchi .... can u please check Both FG is activated ? source and target Coz i just checked and traced it might be ur main program is not activated .

Check both FG for activation (Main program ), I doubt any of include is not activated or partial activated.

Check your FM for activation .

Its nothing to do with TR as i seen .

yukti

Read only

0 Likes
6,391

yes both r activated... it is something related to unlock them. do anyone knows any t-code to unlock them ???

Read only

0 Likes
6,391

Hi Suruchi,

Can you check if your FM is used in any other program or what does the Where Used List option show?

Regards,

Pranav.

Read only

matt
Active Contributor
0 Likes
6,391

There are far too many people replying to this thread who really don't know what they are doing. Please be careful before actioning any suggestions.

Now, to your problem:

You have one transport with R3TR FUGR z_test_sur1 locked in it. If you try to remove or add or insert a function module to this group, you must use the same transport. You must merge the transport containing your FM with the transport containing the function group.

Unlocking the object is bad idea. When you transport you risk syntax errors on import. You cannot transport a new function module without transporting the function group at the same time.

Read only

0 Likes
6,391

One suggestion to see lock objects and unlock...

Go to transaction SE01 -> current transport number -> enter -> menu Request -> object lost -> lock objects

It will try to lock all objects under that request if it can not it will give message with transport number where object is locked

Please try

Read only

0 Likes
6,391

No i mentioned that i created a new FM as well as FG

Read only

0 Likes
6,391

Hi
SM12 is the Transaction Code  where you can see all locked objects and release them..

Thanks

Read only

matt
Active Contributor
0 Likes
6,391

Sumit Kumar wrote:

Hi
SM12 is the Transaction Code  where you can see all locked objects and release them..

Thanks

True. But irrelevant. These are TRANSPORT locks. Not enqueue locks.

Read only

former_member16553
Active Participant
0 Likes
6,391

Hi

    When you are assigning your FM to the FG , Is your is previous FG is open in change mode ?

  If yes then first change  your first FG in display mode then reassign your FM.

Read only

0 Likes
6,391

Irrelevant. These are TRANSPORT locks. Not enqueue locks

Read only

0 Likes
6,391

I have tried all the things which have been mentioned in the above posts... nothing worked...

Read only

gaurab_banerji
Active Participant
0 Likes
6,391

i hope you have not used any global variables while creating the function module, in case you did, you need to remove them from the previous function group as well. .. open FM > Goto > Global Data (or something similar, i am not in front of my system but i guess its the first one)..

You may copy your FM to the new FG (using copy paste method) name it like ZFM_1 since you cannot have 2 FM of the same name. You can of course rename it back once you have deleted the previous one.

try deleting the old FM, if it doesnt work, undo the changes in the FG and all its includes, should serve the same purpose.

you also need to open the function group and check what has changed (version history) and undo them. Probably you need to activate a previous version of the function group SAPLZTEST_SUR. So open it in se38 and check version history for modifications made in the FG due to your changes. Undo all these changes, delete includes (if created) and also check all the includes of the FG for changes by looking into your transport.

Read only

matt
Active Contributor
0 Likes
6,391

The error you are getting means that objects of your source and destination are in different transport requests. Let's try to resolve step by step.

  1. Go to SE03
  2. Choose "Search for Objects in Requests/Tasks".
  3. Put a checkbox against R3TR FUGR, and put your source function group in the field to the right.
  4. Choose status "modifiable"
  5. Execute.

What results do you get? You should have a transport listed. If you don't, type FUNC underneath the field containing "DTEL". Press enter. Put a checkbox next to the FUNC field, and enter your function module name.

Do steps 1 to 5 with the destination function group. You should now know the number of two transports.

When you've got to this stage, let me know what you have, and then I can guide you as to what to do next. I've dealt with these issues many times in the past 15 years...

Read only

Former Member
0 Likes
6,391

I just found a new thing.

When i am trying to reassign my FM from user 1, it is throwing me the error as mentioned above.

But when i try to do in the same SAP server from user2, My FM can be reassigned to new FG.

Does anyone knows what could be the the issue in case of rights for this prob???

Read only

Former Member
0 Likes
6,391

Okay do one thing suppose the func grp is fg1 and it has fm1 the function module u want to move to fg2.

goto se10, select the CTS and task with fg1, delete it. next create a new fgrp, fg2, activate and assign it to CTS, next go to se80 and u select function group and click on it.

right click on the fm1 and select reassign. it will get reassigned. I am assuming its in ur CTS and task.

have fun !!