cancel
Showing results for 
Search instead for 
Did you mean: 

Can not save changed Macro

Former Member
0 Kudos

Hi SAP Gurus,

I am trying to change a macro in a workbook which has 2 queries in it and when I insert the new macro code its not allowing me to save it with the same name. The workbook says its a read only copy and save it with a different name, but this workbook was already in QA and Production and I dont want to create a new workbook with this changed macro. Please give me some suggestions here.

These are the steps I have done to change macro:

Open Bex Analyzer, Workbook and ran the workbook

Deleted all the data and then opened VB Editor, changed macro with the new macro, tried to save it and it says read only. I have installed the digital certificate and Signature key to edit the excel macros. Dont know what I am missing here.

Thanks in advance.

Vinay

Message was edited by: Vinay Madhuri

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vinay

If you change the Macro and try to save it in editor it will be save locally ..

Don't save the Macro ..After change made run the macro from from the tool bar ..it will atomatically save the macro changes..

Hope the above answer helps you..

bye

Shu Moh.

Answers (3)

Answers (3)

Former Member
0 Kudos

This is not an authorization issue. BW does not have any mechanisms for securing workbooks, let alone the VBA macro embedded in excel. The issue is what Shu has described. You do not have to save the macro, it is automatically saved when you close the editor. If you want to save it off locally, export the macro and save it.

thanks,

Jeff

Former Member
0 Kudos

Hi Jeff,

I wouldn’t be so thetic.

BW DOES HAVE mechanisms for securing workbooks.

Look for example, at these authorization objects:

S_GUI: Authorization for GUI activities

S_BDS_DS: Authorizations for document set

These auth objects are needed in order to save a workbook at all.

S_USER_AGR: Authorizations: Role check

S_USER_TCD: Transactions in roles

These ones required for saving workbooks to roles

If a user wants to save a workbook to a location where it can be easily accessed by

others, he needs to save it to a Role rather than saving the workbook in his own

Favorites folder. Saving to a Role means saving to a security role.

You may want to set up roles specifically for saving workbooks. You can then

assign the role to all parties who need to share workbooks.

Another option is only allowing power users to save workbooks to maintain the

roles and ensure that the workbooks remain manageable. This also prevents

users from changing workbooks saved by other users.

And here might be a misinterpreting of term “Macro”. Macros as subroutines in VBA modules are saved in the workbook. And if a workbook is saved on a server, it is not saved locally. You may even include some code into a permanent workbook template and use it during the wb refresh.

From the Vinay’s description it is not clear whether he tried to save a macro or a workbook with the macro.

Best regards,

Eugene

Former Member
0 Kudos

Eugene,

You are absolutley correct with what you are stating, what I meant it that BW does not allow you to authorize workbooks like queries where you can secure access to workbooks of other people.

Thanks,

Jeff

Former Member
0 Kudos

Hi Guys,

Thank you all for the prompt replies, some of the suggestions solved the problem and some of them were new information for me. Shu Moh's solution worked, I imported the changes and closed the VB editor and refreshed the query, then all the changes were saved.

Eugene and Jeff's suggestions about the authorization also was very useful.

A new issue is I was unable to move these changes to CRM, when I refresh BW Metadata in smobilebw t-code in CRM, it says "Workbook can not be saved, change the name to save" any thoughts on this???

I am adding points to everyone for your help.

Vinay

Former Member
0 Kudos

Hi Vinay,

As I stated before, it looks like an authorization problem. The security is set up to prevent saving the workbook created by another user.

Best regards,

Eugene

Former Member
0 Kudos

Try removing the existing macro, then create the new one with the same name. This should solve your problem.

Thanks,

Jeff

Former Member
0 Kudos

Hi Vinay,

I believe, it's an authorization issue.

Guess it is set up that only the creator of the workbook (you are not the creator, aren't you?) can change it and save under the same name.

Consult with the admin guy.

Best regards,

Eugene

Former Member
0 Kudos

Eugene,

I am not the creator of this macro but I have all the authorizations currently, where can i check this option "only creator of the workbook can change" I contacted the security admin and they said its not an authorizations issue.

Regards,

Vinay

Former Member
0 Kudos

Vinay,

This limitation might be set up with using less transparent restrictions in authorization.

I doubt that it is not an auth issue.

I remember from my experience that if I created a workbook, the other guy worked with it had to save the changed version under the new name (the authorization was in effect).

If you have an access to some t-codes, I'd do the following.

T-code SU01, your user ID. Check wich roles are assigned to your user.

T-code PFCG, enter one by one roles you find in SU01 and look at the authorization granted to the role.

Best regards,

Eugene

Former Member
0 Kudos

Eugene,

Currently, I have SAP_ALL in the development system.

Regards,

Vinay

Former Member
0 Kudos

What about SAP_NEW?