cancel
Showing results for 
Search instead for 
Did you mean: 

Help required in getting Attribute value in CC

Former Member
0 Kudos

Hi Experts,

Let me first explain the scenario.

I want two user defined search helps. Say SH1 and SH2. In the main view ( of Component Controller CC)user will select the value ( say for example HBKID )from SH1 and I need to pass this value to the other search help based on which the value shall be populated.

Now Let me explain what I did.

Created a View and created one search help ( SH1) and I am able to get the values on the nmain View. Now I created the second SH2 now I am facing the problem of passing the value populated in the view to this SH2.

What I tried is, created a Method in main view (with HBKID as export parameter )of CC and made it as an interface, then I called this method from SH2 View. During debug I can see the control is coming up to the method since I could not able to populate the HBKID value it is returning empty values.

Main view context is same as CC context. ( i.e drag and dropped the CC context into Main View context)

To over come this I tried the following ways.

1. Created an Event in CC with HBKID as import parameter. Then triggered this event from the interface method. Created an event handler in the main view of CC. Then populated the HBKID value. However this did not give me the output.

2. Created a public attribute in the CC. Tried to populate this in WDDOMODIFYVIEW with the following code

wd_comp_controller->gv_hbkid = lv_hbkid.

before populating in the debug mode ensured that lv_hbkid is populated.

and in the CC interface method simply I wrote

hbkid = wd_this->gv_hbkid.

This also did not yield the result.

I request all of you to guide me in this regard.

Regards

Venkatesh

Accepted Solutions (0)

Answers (1)

Answers (1)

abhimanyu_lagishetti7
Active Contributor
0 Kudos

is SH1 and SH2 are dictionary search helps?

Abhi

Former Member
0 Kudos

Hi,

As I explained both SH are freely programmed one.

Former Member
0 Kudos

hi,

If Your first Search help is working fine, then you can map the attribute binded to your search help to the Component Controller and in Second Help you can get the value of First help from Component controller. This way you can proceed and define your search help for second field too.

Thanx.

abhimanyu_lagishetti7
Active Contributor
0 Kudos

If the HBKID field is part of a same node as other attribute for which SH2 is designed.

You can access in SET_VALUE_HELP_LISTENER method the Listener parameter

LISTENER->F4_CONTEXT_ELEMENT->get_attribute( exporting name = 'HBKID' importing value = <variable> ).

Abhi

Former Member
0 Kudos

Hi Saurao,

Could you please explian me little bit more regarding

Regards

Venkatesh

Former Member
0 Kudos

hi,

what i mean is :

->Your SH1 is working fine then you can read the Context Which is binded to this Input Field.

->For that, Map SH1's Context with the similar Context in Comp Controller.

->Now when the SH2 is triggered , you can also get the Value of SH1 and using this value you can filter the values for SH2.

Thanx.

Former Member
0 Kudos

hi,

Do the following steps :

1. Make the Context Node as Interface Node for SH1.

2. Now use this Component in your Freehelp Comp for SH2. Suppose in SH2, you are using FH2. So in FH2 , you have to use the Interface Node of SH1.

3. When your second Help is triggered, you will be in your component FH2.

4. Just read the Interface Node for getting the value of SH1.

5. Now in the Wddoint , you can write your logic to have data according to your req as now you have value of SH1 also.

I hope it is clear.

Thanx.