cancel
Showing results for 
Search instead for 
Did you mean: 

CL_WDR_VIEW

anand_nidamanuru
Active Participant
0 Kudos

Hi All,

Is there any way I can get the reference to the CL_WDR_VIEW inside VIEW methods like WDDOINIT or WDDOMODIFYVIEW etc.

Thanks,

Anand

Accepted Solutions (0)

Answers (2)

Answers (2)

anand_nidamanuru
Active Participant
0 Kudos

Anuj,

It was a mistake I have done earlier. Narrow casting is working fine.

former_member196517
Contributor
0 Kudos

i was sure that it will work but was little busy so unable to perform and see myself.. anyhows thats gr8 ..

former_member196517
Contributor
0 Kudos

Hi Anand,

this is a abstract class and may i know the need why you want to do this .. you can achive all thru interfaces of this class

IF_WDR_CONTEXT

IF_WD_CONTEXT

IF_WD_CONTROLLER

IF_WD_NAVIGATION_SERVICES

IF_WD_NAVIGATION_SERVICES_NEW

IF_WD_VIEW

IF_WD_VIEW_CONTROLLER

Regards

Anuj Goyal

anand_nidamanuru
Active Participant
0 Kudos

Hi Anuj,

I have a strange requirement.

In our application, when we navigate from one view/window to other, we need to prompt user for "Save Changes".

When any data is being set using Set Attribute, the change log of the node is not being updated esp. when using OVS and Pop up's. So we are not able to track these changes.

We found that we can add to the log using the method "add_context_attribute_change" of the context.

But in the mean time I found the class CL_WDR_VIEW_DIRTY_STATE that provides an OBSERVER for changes in VIEW. This observer needs the CL_WDR_VIEW reference.

So I am looking for a way to get this reference.

Thanks,

Anand

former_member196517
Contributor
0 Kudos

Hi Anand ,

can you try passing a reference of if_wd_view if it allows, you can try some typecasting and narrow (?) operators..

Regards

Anuj

anand_nidamanuru
Active Participant
0 Kudos

I have tried Anuj, in the WDDOMODIFY method, but it gave me a dump. It is not able to convert IF_WD_VIEW to CL_WDR_VIEW

Thanks,

Anand

Former Member
0 Kudos

Hi,

I think there is a huge difference between a class and an interface.

A class implements an interface. An Interface has no coding.

You can't "convert" it.

Regards

anand_nidamanuru
Active Participant
0 Kudos

Hello Michael,

The CL_WDR_VIEW implements the interface IF_WD_VIEW. So we are trying to narrow cast (?= operator) the IF_WD_VIEW reference to CL_WDR_VIEW.

Just checked it now, the narrow casting is working and I am able to create the OBSERVER.

Thanks,

Anand