cancel
Showing results for 
Search instead for 
Did you mean: 

component

Former Member
0 Kudos

hi,,,

    i have two components: compA and compB.

compA-standard component.

CompB-custom component.

how can i transfer data from compA to CompB.

thanks&regards,

suresh babu

Accepted Solutions (0)

Answers (3)

Answers (3)

Nigel_James
Active Contributor
0 Kudos

I am not sure that this is the complete picture. Certainly the advise above is good but in component A you need a component usage of component B and in component B you need to add the context node under the component interface -> context in the runtime repository.

Otherwise when you do a binding you will get error:

The view controller or custom controller "" was implemented incorrectly

with error class CX_BSP_WD_INCORRECT_IMPLEMENT

Hope this helps the person reading this right now

Former Member
0 Kudos

Hi Suresh Babu,

        In Order to transfer data from CompA to CompB or accessing data in CompB of CompA, you use the concept of Component Usage,

In Order to achieve this follow these steps,

Go to CompB --> in CompB go to runtime repository,--> in Rub time Repository below we have Component Usage Bar --> Right click to add new component --> Enter any ID (ex: ZBP) --> Enter Used Component (EX: CompA) -->Enter Interface View (Ex: Main Window).-->SAVE Runtime Repository.

Now in the component Structure Browser --> go to component controller --> go to context node and create a Model Node ( which context node you have your data attributes).--> once context node is created----> in component Controller implementation class (_IMPL) --> go to method WD_USAGE_INITIALIZE ( ) and redefine it and write the code given by .

Regards

Former Member
0 Kudos

Hi Suresh,

  • Make context node in CompB as interface node in runtime repository
  • Create same kind of context node in CompA component controller
  • Bind both context node in WD_USAGE_INITIALIZE of CompA component controller.


   CASE iv_usage->usage_name.
     WHEN 'usage_name'.

   iv_usage->bind_context_node( iv_controller_type  = cl_bsp_wd_controller=>co_type_component

                                    iv_name             = iv_usage->usage_name

                                    iv_target_node_name = 'BTADMINH'
                                    iv_node_2_bind      = '
BTADMINH' ).

  ENDCASE.

Regards

Rajarama U