cancel
Showing results for 
Search instead for 
Did you mean: 

issues of cross-component programming.??

Former Member
0 Kudos

Hi, all

I was wondering why the following error msg would be raised 'Component Usage READ_SPFLI Does Not Have an Active Component' ?

I am doing a exercise about cross-component programming. I created a webdynpro component named YLC_CROSS_COMPO1 of node NODE_SPFLI, and method GET_SPFLI_DETAILS, which are marked as interface.

then I created another component named YLC_CROSS_COMPO2 that called for the YLC_CROSS_COMPO1,a view of table element was involved. and called up the method of YLC_CROSS_COMPO1 in the hook method WDDOINIT of the view.

just want to display the details in the table of the view.

but error occured.

hope you can help me out..

thanks in advance.

regards,

Nick.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi ,

for component usage

1 in the component B , Double click the component in the object tree and choose the tab Used Components.

2 Define a usage of your component A within this component.

3 Do a mapping between the interface controller of ur MAIN component B & the component controller of

ur SUB component A 4 Before you can call the Interface Controller method of the used component in ur view ,you have to declare that the view controller can use the Interface Controller of the used component. By default only the component controller can access used components directly, view controllers have to specify this explicitly.

5 go to the tab Properties of the B, click the button Create Controller Use and select the INTERFACECONTROLLER of the component A for component use .

6 go to WINDOWS , inside ur View container right clck to select embed view to select the view to be embedded

Refer this article on component usage

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2e71ce83-0b01-0010-11a4-98c28a331...

regards,

amit

Answers (1)

Answers (1)

arjun_thakur
Active Contributor
0 Kudos

Hi,

You have to instantiate the component which you are using.

To do so, Go to the component controller>Properties tab> Click on Create Component Usage button (Just add the component which you are using). Then go to WDDOINIT method. Open code wizard (ctrl + F7), Go to Instantiate Used Component, give the component name. The code will be generated automatically. Activate and test the component.

I hope it helps.

Regards

Arjun