cancel
Showing results for 
Search instead for 
Did you mean: 

Component Usage DEMO Does Not Have an Active Component

Former Member
0 Kudos

Hi all,

I am getting the following error while accessing a method from one component to another..

ERROR : Component Usage DEMO Does Not Have an Active Component

In the component1 of a method i am having a success message .. i am calling that method from another component Component2..

While executing the component2 I am getting this error.

Can anyone help me out of this error.

Ragards,

Susil.

Accepted Solutions (0)

Answers (5)

Answers (5)

satish_kumar106
Explorer
0 Kudos

Hi,

Create instance for the component using pattern. Instance for the used component is NA.

Regards,

Satish S.

former_member206454
Participant
0 Kudos

Hi,

you are getting this problem because,you might not have the active component that is reused...This means the second component from which you are calling the method....it should be in the running mode.....

Former Member
0 Kudos

hi,guy

you must create a IF_WD_COMPONENT_USAGE.

LO_INTERFACCONTROLLER TYPE REF TO IF_WD_COMPONENT_USAGE,

LO_INTERFACECONTROLLER TYPE REF TO ZIWCI_DYLAN_SUBCOMPONENT(called component interface name)

LO_INTERFACCONTROLLER = WD_THIS->WD_CPUSE_ZDYLAN_SUBCOMPONENT( ).

IF LO_INTERFACCONTROLLER->HAS_ACTIVE_COMPONENT( ) IS INITIAL.

LO_INTERFACCONTROLLER->CREATE_COMPONENT( ).

ENDIF.

Former Member
0 Kudos

hi Lekha,

I have done every thing perfectly..

When i call the method in WDDOINIT i am getting this error and when i call the method in an action button and when the action got triggered its working perfectly..

What is the problem?

Regards,

Susil.

Former Member
0 Kudos

HI,

calling the method in action handler, wdodoinit how does it differ...are you passing any thing to teh plugs..while navigation

Regards,

Lekha.

Former Member
0 Kudos

No, I have not used any plugs since I am not calling any views from that component1.

I am just calling a method from that component1 to component2. I am accessing a node from that component1 and using that node in component2.

Regards,

Susil.

Former Member
0 Kudos

Have you tested the comp1 independetnly

check if there are any errors in it at design or at runtime..

Former Member
0 Kudos

Ya Its working perfectly. If there is any error in component1 how will it work when i call the method in my action button..

Regards.

Susil

Former Member
0 Kudos

after doing all the usages addeed try to save the applciation..then check for error...somewhere you might be doing wrong as it is not a runtime error right..

Former Member
0 Kudos

have you isntantiated the used compoenent...

Wehn added as a usage under properties tab of component then you must also have it under the properties fo both the component controller and in the view whtere you are trying to access the methods...

I guess you might have not done this...