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

Modify Method in Class

Former Member
0 Likes
5,794

Hi All,

In Txn SE24, we entered CL_OIURV01_RD_DRIVER to modify it. In "Attributes" tab we can edit many attributes but few are disabled and cannot be modified. We need to modify attribute "RD_BOOKINGS" but the Modify Button is disabled. Any suggestion how can we edit it ?

Warm Regards,

-N

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,931

Hi

This is standard Class provided by the SAP. you need to take the ACCESS KEY from basis and can modify it.

But it is strongly recommended that you dont change the standard this way

you can copy the class to a Z class then you can modify etc

Regards

Ramc

18 REPLIES 18
Read only

Former Member
0 Likes
3,932

Hi

This is standard Class provided by the SAP. you need to take the ACCESS KEY from basis and can modify it.

But it is strongly recommended that you dont change the standard this way

you can copy the class to a Z class then you can modify etc

Regards

Ramc

Read only

0 Likes
3,931

Thanks Ramchander for a quick response.

I already supplied Access Key which enabled me to modify few attributes but not all attributes are accessible.

I need to edit RD_BOOKINGS attribute or its code but is still not allowing me to modify. The button of edit is disabled when I go into definition of attributes.

Thanks & Regards,

Nayab

Read only

0 Likes
3,931

Most likely RD_BOOKINGS is defined in super class which class CL_OIURV01_RD_DRIVER inherits from or in interface. That's why you can't edit this attribute. You will have to get access key to this super class. Go to class Properties and check field Superclass

Regards

Marcin

Read only

0 Likes
3,931

Thanks Marcin for your quick reply.

Through SE24 I checked properties of class "CL_OIURV01_RD_DRIVER" and found SuperClass, Undo Inheritance and Change Inheritance options disabled.

I've already provided access key to modify it and I'm getting few attributes changeable. You seems right that access key of superclass would be required inorder to modify few attributes that are of type "Direct Type Entry".

But I didnt find what could be its super class. Any suggestions?

Thanks

Read only

0 Likes
3,931

CL_OIURV01_RD_DRIVER does not have a superclass. Which attributes are greyed out?

Read only

0 Likes
3,931

Unfotunatelly I don't have this class in my system, but if it doesn't have superclass then this class might implement some interfaces (check tab Interfaces ). Also notice that if attribute is in blue color this means that it doens't belong to this class, otherwise (if standard black color) it is defined directly in this class.

One more suggestion. When displaying class select FILTER pushbutton placed on application toolbar - > then select Group by Interfaces and Superclasses . Now you will be able to see where the attribute originally comes from.

Regards

Marcin

Read only

0 Likes
3,931

No Interfaces at all. But all attributes not modifiable do not have a typing nor an associated type.

Read only

0 Likes
3,931

Thanks Rainer for your reply.

At class level when I click Edit, I get attributes like "RD_JEINTF" as modifyable but "RD_BOOKINGS" is greyed out. In its definition, when I click seventh column "ATEM", its definition gets opened in which Modify Button is greyed out.

Regarding Interfaces, its blank. In its properties, "Unicode check active" checkbox is also greyed out although I'm in editable mode by providing access key.

Thanks again.

Read only

0 Likes
3,931

Ok, I checked it in another system.

These attributes which don't have typing, have litte green icon on right. When you click on it you will see that this attribute is created not based on Dictionary types but is a structure definition. It has lots of fields.

I think you can't change it because you got acces key to class but there are many dependand objects which are repnsible for accessing its different parts (i.e public section, private etc).

Below a list of objects which you might need access too:


CL_OIURV01_RD_DRIVER==========CCDEF
CL_OIURV01_RD_DRIVER==========CCIMP
CL_OIURV01_RD_DRIVER==========CCMAC
CL_OIURV01_RD_DRIVER==========CI
CL_OIURV01_RD_DRIVER==========CM001
CL_OIURV01_RD_DRIVER==========CM002
CL_OIURV01_RD_DRIVER==========CM003
CL_OIURV01_RD_DRIVER==========CM004
CL_OIURV01_RD_DRIVER==========CM005
CL_OIURV01_RD_DRIVER==========CM006
CL_OIURV01_RD_DRIVER==========CM007
CL_OIURV01_RD_DRIVER==========CM008
CL_OIURV01_RD_DRIVER==========CM009
CL_OIURV01_RD_DRIVER==========CM00A
CL_OIURV01_RD_DRIVER==========CM00B
CL_OIURV01_RD_DRIVER==========CM00C
CL_OIURV01_RD_DRIVER==========CM00D
CL_OIURV01_RD_DRIVER==========CM00E
CL_OIURV01_RD_DRIVER==========CM00F
CL_OIURV01_RD_DRIVER==========CM00G
CL_OIURV01_RD_DRIVER==========CM00H
CL_OIURV01_RD_DRIVER==========CM00I
CL_OIURV01_RD_DRIVER==========CM00J
CL_OIURV01_RD_DRIVER==========CM00K
CL_OIURV01_RD_DRIVER==========CM00L
CL_OIURV01_RD_DRIVER==========CM00M
CL_OIURV01_RD_DRIVER==========CM00N
CL_OIURV01_RD_DRIVER==========CM00O
CL_OIURV01_RD_DRIVER==========CO
CL_OIURV01_RD_DRIVER==========CP   "<- this is private section where RD_BOOKINGS is defined, you may need access to it too
CL_OIURV01_RD_DRIVER==========CT
CL_OIURV01_RD_DRIVER==========CU

Regards

Marcin

Read only

0 Likes
3,931

Hi Rainer and Marcin,

Thank you again for your responses.

Yes, you're right about CL_OIURV01_RD_DRIVER==========CP. But how can we edit it? When I open it through SE38 it directs me to the same screen.

Actually I need to edit length of few fields defined in "RD_BOOKINGS" structure. I can have access key but where to put that is the query to enable edit version.

Kindly suggest on how can we edit such disabled fields.

Looking forward for your response.

Thanks again.

Regards,

Nayab

Read only

0 Likes
3,931

Hi Marcin, absolutely right. So you mean this structure definition can't be changed?

I'm getting the editable button disabled in ECC6 while edit button enabled in 4.6c.

Is such restriction for higher versions only?? There must be some way either to modify the structure or to make class' properties checkbox "unicode check field" enabled to disable checking unicoder conversions.

Thanks again

Warm Regards,

Nayab

Read only

0 Likes
3,931

You can get to its definition in two ways

- click next to RD_BOOKINGS this litte green icon I mentioned about

- from menu choose GoTo->Private section -> then CTRL+F and find definition for RD_BOOKINGS

If you can edit private section for this class (meaning chanign object CL_OIURV01_RD_DRIVER==========CP) then you will be able to change attributes definition.

Regards

Marcin

PS: As for your last post

"Unicode check" has to be checked, beacuse you are in ECC 6.0 and here all objects MUST be created Unicode enabled. You can't change it and even if you could, syntax check would not allow you to leave it unchecked.

Edited by: Marcin Pciak on Aug 5, 2009 3:00 PM

Read only

0 Likes
3,931

Thanks again Marcin for really quick help.

By changing object CL_OIURV01_RD_DRIVER==========CP you mean

- to goto SE24 and edit this object, (Object is not found)

- to goto SE38 and edit this program (It opens the same screen, i.e. SE24 and change CL_OIURV01_RD_DRIVER)

When I click Green filled button in row RD_BOOKINGS, it directs me to its structure level definition. But at that particular screen the edit button is disabled.

I'm really very sorry if not getting you correctly but i'm confused in where to put access key to enable CL_OIURV01_RD_DRIVER==========CP object or CL_OIURV01_RD_DRIVER to modify structure definition.

Thanks again Marcin for being so cooperative.

Warm Regards,

Nayab

Read only

0 Likes
3,931

Hi Marcin,

No workaround to change private/public/protected sections of a class?

Thank you very much for all of your cooperation.

Warm Regards,

N

Read only

0 Likes
3,931

No problem.

This object CL_OIURV01_RD_DRIVER==========CP is only internal one, you can't directly display it.

But now I am trying to understand why EDIT option is disabled in these sections. I tried by enhancing by selecting option Enhance (the WHIRL icon) but then I can't create/replace any line. As the Modification Assistant would not work here. There has to be some reason behind this. I neither can't find any note desrcibing this. Therefore for this moment I can't help you but I will keep looking for solution or at least explanation

Sorry:(

Marcin

Read only

0 Likes
3,931

Thanks again Marcin,

Yes, activate Enhance, goto menubar -> Utilities -> More Utilities -> Upload/Download -> Select Upload -> Browse the newer structure and your are done.

But how can we activate the new program ?

I tried activating it but on rechecking its definition, it shows me the previous code rather than the uploaded one.

Thanks again. Looking forward for some nice feedback

Warm Regards,

Nayab

Read only

0 Likes
3,931

We can modify such classes by switching off the Check Modifications. After that SAP is not responsible for that part of code if any error occurs later.

Regards,

Nab

Read only

0 Likes
3,931

Thank you Marcin for all of your help!