cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Component Usage

Former Member
0 Kudos

Hi All,

Now Im working in Dynamic Component Usage. For that I refered Help.SAP document.

From that Document I got the code for Ceating group.

data: L_CMP_API                 type ref to IF_WD_COMPONENT,

L_CMP_USAGE_GROUP         type ref to IF_WD_COMPONENT_USAGE_GROUP.

L_CMP_API = WD_THIS->WD_GET_API( ).

if L_CMP_API->HAS_CMP_USAGE_GROUP( ‘TESTGROUP’ ) is initial.

WD_THIS->CMP_USAGE_GROUP = L_CMP_API->CREATE_CMP_USAGE_GROUP(

NAME            = ‘TESTGROUP’

USED_COMPONENT  = ‘<name used component>’).

endif.

But it shows the Error like,

*Method MY_CONTROLLER_METHOD *

*Field "‘TESTGROUP’" is unknown. It is neither in one of the specified *

tables nor defined by a "DATA" statement . . . . . . . . . .

Can any one help me on this issue.

Thanks and Points assured.

Edited by: Jasmine on Jan 30, 2008 1:05 PM

Accepted Solutions (1)

Accepted Solutions (1)

Yashpal
Active Contributor
0 Kudos

Hi ,

I think u have replaced the code this

WD_THIS->CMP_USAGE_GROUP = L_CMP_API->CREATE_CMP_USAGE_GROUP(

NAME = ‘TESTGROUP’

USED_COMPONENT = ‘<name used component>’).

by ...

WD_THIS->TESTGROUP = L_CMP_API->CREATE_CMP_USAGE_GROUP(

NAME = ‘TESTGROUP’

USED_COMPONENT = ‘<name used component>’).

so u have forgotten to create TESTGROUP variable in the controller class of the desired type....

Regards

Yash

Former Member
0 Kudos

Hi Guptha,

Thanks for your reply.

I tried as you told.

But it gives the same error even I declared the TEMPGROUP as type of String.

Thanks.

Yashpal
Active Contributor
0 Kudos

it should be of type IF_WD_COMPONENT_USAGE_GROUP ,

and also check the name u have used....

Former Member
0 Kudos

Sorry sir, I tried but it gives the same error.

Thanks..

russell_day2
Participant
0 Kudos

Double-click the error message to see where it takes you. This code is not generating the message. Perhaps you have used TESTGROUP as a field elsewhere in the program?

Answers (0)